I try to build a project through gradle. The project runs with gradle 8.1.1 and java open jdk 17 and i take this error:
(Execution failed for task ':extensions:policies:javadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/home/datamiteedc/Desktop/Dataspace/MinimumViableDataspace/extensions/policies/build/tmp/javadoc/javadoc.options').
Is there a solution to this? propably some conflict with gradle and jdk? or something else? is there a code to put into javadoc.options file to prevent this error?
You do not put anything into that file.
Gradle generates this file.
You can look at it to see what might be the problem.
Can you share a build --scan?
Maybe also --info or --debug could give further insight.
Cannot run program “/usr/lib/jvm/java-17-openjdk-amd64/bin/javadoc” (in directory “/home/datamiteedc/Desktop/Dataspace/MinimumViableDataspace/extensions/policies”): error=2, No such file or directory
The build scan shows, that you run Gradle with Java 21.
As Java 17 is used to produce the JavaDoc, there is a toolchain of Java 17 configured.
The Java 17 toolchain found on your system is only a JRE though, not a JDK and so the javadoc tool is not found.
Install the openjdk-17-jdk-headless package, then your JRE is expanded to a JDK and the build should continue.
also i changed the gradle version through properties file to 8.5 from 8.1.1 but nothing changed. same error.
When running on 8.1.1, you must not use Java 21 to execute Gradle anyway. Gradle 8.5 is the first version to officially support running on Java 21: Compatibility Matrix
i typed sudo apt install openjdk-17-jdk-headless and then i typed java -version and didnt tell something about headless as you see in the screen. how can i know if headless its installed?
so last runs was in my laptop. and now i update the gradle and in my laptop and its passed successfully. tomorow that i make the same process in the virtual machine i will tell you if i will get any error. thanks for now. i think that the difference with virtual machine is that in my laptop i have openjdk17 and on my laptop have openjdk17-headless. whats the difference of two?
Shouldn’t be much difference. headless means no GUI. openjdk-17-jdk Ubuntu package depends on openjdk-17-jdk-headless actually.
It additionally depends for example on visualvm which is a GUI tool and thus is not available on a headless system.
I don’t know.
As I said, headless or not headless shouldn’t make a difference.
It is the same.
Probably some other problem why it didn’t work on one but work on the other.
ok this one passed. i have one last command that doesn’t pass. “./gradlew :system-tests:test -DincludeTags=“ComponentTest,EndToEndTest””. I take this error on the link (Build Scan® | Gradle Cloud Services ). can you tell me what is this error about so i can solve it because i don’t understand? thanks