Reputation: 2111
When building my Jenkins job I get the following error message:
[ERROR] Failed to execute goal on project data-script-tests: Could not resolve dependencies for project com.arkana:data-script-tests:jar:0.0.2: Could not find artifact com.sun:tools:jar:1.8.0 at specified path C:\Program Files\Java\jre1.8.0_251/../lib/tools.jar
I verified that C:\Program Files\Java\jre1.8.0_251/ do exist on build machine.
However, tools.jar is really missing.
What's the reason? How can I solve this?
Upvotes: 1
Views: 7923
Reputation: 2111
Well, the Jenkins configuration setting was to use the System JDK which was 8. However, I should have set the JDK setting to 15. Once I did that, everything worked.
Upvotes: 0
Reputation: 35853
As Thorbjørn Ravn Andersen said, you need a JDK instead of a JRE.
JREs cannot be used to build a Java project, only to run it.
Upvotes: 2