Can't compile easy installer

I am having issues when trying to compile easy installer from source:

./gradlew dist

[...]

> Task :prepareMergedJarsDir FAILED
:prepareMergedJarsDir (Thread[Task worker for ':',5,main]) completed. Took 0.0 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':prepareMergedJarsDir'.
> No value has been specified for this provider.

Am I missing something?

OS: archlinux
Java: java-11-openjdk

I can’t reproduce this problem on opensuse linux and openjdk 11.

Can you run

./gradlew dist --debug

and paste the full log at https://pastebin.com/ then share a link here?

1 Like

This post was flagged by the community and is temporarily hidden.

Unfortunately I don’t see anything useful in the output and the error message is quite generic :frowning:

Can you run again with these flags and share the output?

./gradlew dist --debug --stacktrace

Edit: something you could try and see if it helps: edit the file easy-installer/gradle/wrapper/gradle-wrapper.properties to contain

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

Then try again and see if this higher version of the build tool gradle either fixes the issue or at least gives a more meaningful error message.

Thank you for having a look into this!

I changed the gradle version as suggested and called gradlew with debug and stacktrage flags. Unfortunately, still no luck, but maybe the log in more meaningful now: https://tinyurl.com/TerrorUnlike

(By the way: this forum did not permit me to “post a link to that host” when trying to post a pastebin link. In the preview of this post it says: " It looks like your link to pastebin dot com was already posted in the topic by @amo in a reply on Nov 11, '20 – are you sure you want to post it again?" but I can’t confirm that I am sure. Same for paste dot c-net dot org. )

I think the relevant lines are

Caused by: java.lang.IllegalStateException: No value has been specified for this provider.
...
at org.beryx.jlink.PrepareMergedJarsDirTask.getJavaHome(PrepareMergedJarsDirTask.groovy:49)

That looks like you haven’t set $JAVA_HOME
Maybe this topic about archlinux can help you: https://bbs.archlinux.org/viewtopic.php?id=222751

2 Likes

Thank you a lot!
You are right about the environment variable, it was not set, and I could probably have guessed that…
Now that it is set correctly, I am somehow missing the javac binary which is present in the jdk 14 but not in the jdk 11. Anyway, this is definitely not related to the easy installer.
Closing for now.
I appreciate your help.

1 Like

Funny enough, I thought I have to use my system JDK, but I needed to set the JAVA_HOME to the jdk11 subfolder of easy-installer. So for whomever might have the same problem, this is what worked for me:
JAVA_HOME=buildSrc/linux/jdk-11.0.2 ./gradlew dist