scenerygraphics / sciview

sciview is a tool for visualization and interaction with ND image and mesh data
BSD 2-Clause "Simplified" License
67 stars 17 forks source link

Fix Maven release issues #545

Closed skalarproduktraum closed 9 months ago

skalarproduktraum commented 9 months ago

This PR fixes some issues related to versions not declared correctly in Maven publications. Furthermore:

kephale commented 9 months ago

@skalarproduktraum is this expected to fix the missing JAWT issue? I still get that after doing a gradle clean, manually emptying sciview from .m2/repository/, and then using gradle to publishToLocal:

> jgo -m -v sc.iview:sciview:0.2.0-SNAPSHOT:sc.iview.ImageJMain                ~/git/scenerygraphics/sciview
DEBUG 2023-12-12 10:50:32,531: Using settings:     {'m2repo': '/Users/kharrington/.m2/repository', 'cachedir': '/Users/kharrington/micromamba/envs/nesoi/jgo', 'links': 'auto'}
DEBUG 2023-12-12 10:50:32,531: Using repositories: {'scijava.public': 'https://maven.scijava.org/content/groups/public', 'jitpack.io': 'https://jitpack.io'}
DEBUG 2023-12-12 10:50:32,532: Using shortcuts:    {}
DEBUG 2023-12-12 10:50:32,532: Returning expanded coordinate sc.iview:sciview:0.2.0-SNAPSHOT:sc.iview.ImageJMain.
DEBUG 2023-12-12 10:50:32,532: class path: /Users/kharrington/micromamba/envs/nesoi/jgo/sc.iview/sciview/0.2.0-SNAPSHOT/3ed89cff0c818aa1f1bb8be11b2a51b2c0c60fd427cc7fef34ac3aafc624e6fe/*
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.imagej.patcher.LegacyInjector (file:/Users/kharrington/micromamba/envs/nesoi/jgo/sc.iview/sciview/0.2.0-SNAPSHOT/3ed89cff0c818aa1f1bb8be11b2a51b2c0c60fd427cc7fef34ac3aafc624e6fe/ij1-patcher-1.2.6.jar) to method java.lang.ClassLoader.findLoadedClass(java.lang.String)
WARNING: Please consider reporting this to the maintainers of net.imagej.patcher.LegacyInjector
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[SciJava-4c905037-Thread-1] INFO SciView - Started application as PID 94923 on MACOSX/ARM64
[SciJava-4c905037-Thread-1] INFO graphics.scenery.utils.LogbackUtils - Logback is not in the classpath!
[AWT-EventQueue-0] INFO SciView - This is sciview / scenery, development version ( /  (055400))
[AWT-EventQueue-0] INFO VulkanRenderer - Loaded Deferred Shading (Deferred Shading, with HDR postprocessing and FXAA)
[AWT-EventQueue-0] INFO VulkanRenderer - Creating Vulkan instance with extensions VK_MVK_macos_surface,VK_KHR_surface,VK_KHR_surface,VK_EXT_metal_surface and layers 
[AWT-EventQueue-0] INFO VulkanRenderer - Available special-purpose swapchains are: SwingSwapchain, HeadlessSwapchain, OpenGLSwapchain
[AWT-EventQueue-0] INFO Companion - Physical devices: 
[AWT-EventQueue-0] INFO Companion -   0: 🍎 Apple M1 Pro (IntegratedGPU, driver version 0.2.2011, Vulkan API 1.2.243) (selected)
[AWT-EventQueue-0] INFO VulkanDevice - Creating 1 distinct queue groups
[AWT-EventQueue-0] INFO VulkanRenderer - Using swapchain SwingSwapchain
Exception in thread "main" java.util.concurrent.ExecutionException: java.lang.reflect.InvocationTargetException
    at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
    at sc.iview.DefaultSciViewService.makeSciView(DefaultSciViewService.java:127)
    at sc.iview.DefaultSciViewService.getOrCreateActiveSciView(DefaultSciViewService.java:175)
    at sc.iview.SciView$Companion.create(SciView.kt:1891)
    at sc.iview.ImageJMain.main(ImageJMain.kt:9)
Caused by: java.lang.reflect.InvocationTargetException
    at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1367)
    at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1342)
    at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1480)
    at sc.iview.ui.SwingMainWindow.<init>(SwingMainWindow.kt:295)
    at sc.iview.SciView.init(SciView.kt:405)
    at graphics.scenery.SceneryBase.main(SceneryBase.kt:485)
    at sc.iview.DefaultSciViewService.lambda$makeSciView$0(DefaultSciViewService.java:114)
    at org.scijava.thread.DefaultThreadService.lambda$wrap$1(DefaultThreadService.java:233)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NoClassDefFoundError: org/lwjgl/system/jawt/JAWT
    at org.lwjgl.awt.AWT.<init>(AWT.java:74)
    at org.lwjgl.vulkan.awt.PlatformMacOSXVKCanvas.create(PlatformMacOSXVKCanvas.java:171)
    at org.lwjgl.vulkan.awt.AWTVK.create(AWTVK.java:55)
    at graphics.scenery.backends.vulkan.SwingSwapchain.createWindow$lambda$0(SwingSwapchain.kt:67)
    at graphics.scenery.backends.vulkan.SwingSwapchain.createWindow(SwingSwapchain.kt:111)
    at graphics.scenery.backends.vulkan.VulkanRenderer.<init>(VulkanRenderer.kt:647)
    at graphics.scenery.backends.Renderer$Companion.createRenderer(Renderer.kt:276)
    at graphics.scenery.backends.Renderer$Companion.createRenderer$default(Renderer.kt:248)
    at sc.iview.ui.SwingMainWindow._init_$lambda$1(SwingMainWindow.kt:246)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.system.jawt.JAWT
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
    ... 22 more
skalarproduktraum commented 9 months ago

Yes, this is supposed to fix this error and actually does it for me 😅 Did you purge scenery as well? The jawt-related fix is actually in scenery.

skalarproduktraum commented 9 months ago

And yeah, this looks like it. The scenery version in your log (055400) is older than the one used in this PR (de3897c)

kephale commented 9 months ago

Ok, got it. Repeating what I said in zulip for posterity:

i found the issue. i'm using jgo from a conda environment, which puts the jgo path in the conda environment (this is good but i kept looking at the .jgo dir in my home directory). since i was using a snapshot versions of sciview it needed to be manually be removed before the deployment to local maven would overwrite