Closed cheginit closed 3 years ago
@cheginit thanks for reporting this issue. It looks like it's related to the recent update I made adding a publishing task to the vortex-api build script. I'll try to update the publish process so that the maven credentials are passed on the command line rather than specified in the publish task. If you want to work around you can include a gradle.properties
file in the usr/.gradle directory that includes mavenUser=
and mavenPassword=
. It's not necessary to provide an actual username and password.
I don't currently have linux and macOS packaging logic in the gradle builds scripts. You can build the java libraries on linux and macOS but the distribution packages won't include launch scripts or native binaries (GDAL). I'll try to add linux and macOS logic soon, and comment when done.
Thanks, appreciate it. Vortex is a very handy package and can help speed up the HEC workflow quite a bit, so thanks for all the hard work.
Update: I moved the maven credentials specification out of the build script so the reported issue should no longer be a problem. @nickvan612 added logic for a linux build in the main build script so you should be able to build a linux distribution package from source. I'll add the linux distribution as a release asset the next time I release a new version. We're waiting for an update to GDAL on the macOS platform. Once that update is released, we'll add macOS build logic to the build script.
Another note: I'm guessing you won't be able to get the LFS objects that are used for testing. If that's the case, use gradlew build -x test
to build.
That's great news! Thanks for the update.
I just built Vortex on my Linux machine with ./gradlew build -x test
and it finished successfully.
./gradlew build -x test
> Configure project :
Inferred project: vortex, version: 0.11.0-dev.17.uncommitted+5f83f0e
> Task :vortex-api:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
BUILD SUCCESSFUL in 11s
59 actionable tasks: 59 executed
But when I tried to run it I got the following error:
./gradlew importer:run
> Configure project :
Inferred project: vortex, version: 0.11.0-dev.17.uncommitted+5f83f0e
> Task :importer:run FAILED
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.UnsupportedOperationException: Unable to open DISPLAY
at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$new$6(GtkApplication.java:173)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:171)
at javafx.graphics/com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41)
at javafx.graphics/com.sun.glass.ui.Application.run(Application.java:144)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:279)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:269)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
... 5 more
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':importer:run'.
> Process 'command '/usr/lib/jvm/java-11-openjdk-amd64/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 825ms
6 actionable tasks: 2 executed, 4 up-to-date
Probably this line is an issue?:
Caused by: java.lang.UnsupportedOperationException: Unable to open DISPLAY
Let me know if you want me to run it with --stacktrace
.
@cheginit I'm able to reproduce, but am not sure of the solution. I was able to launch the build version via the shell script but can't launch from source via the gradle run task. I don't do too much dev on the linux platform - the primary platform of our agency is Windows. If you're able to find a solution, please let me know.
I understand. Thanks, will let you know.
I tried building the project with
./gradlew build
on Ubuntu and MacOS, and both failed with the same error. I have JDK11 installed on both systems.Here's the output with
--stacktrace
: