简体   繁体   English

在指定路径找不到工件 com.sun:tools:jar:1.8.0

[英]Could not find artifact com.sun:tools:jar:1.8.0 at specified path

When building my Jenkins job I get the following error message:在构建我的 Jenkins 作业时,我收到以下错误消息:

[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 [错误] 无法在项目数据脚本测试上执行目标:无法解析项目 com.arkana:data-script-tests:jar:0.0.2 的依赖关系:找不到工件 com.sun:tools:jar:1.8 .0 在指定路径 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.我验证了 C:\\Program Files\\Java\\jre1.8.0_251/ 确实存在于构建机器上。

However, tools.jar is really missing.但是,tools.jar 真的不见了。

What's the reason?什么原因? How can I solve this?我该如何解决这个问题?

As Thorbjørn Ravn Andersen said, you need a JDK instead of a JRE.正如 Thorbjørn Ravn Andersen 所说,您需要 JDK 而不是 JRE。

JREs cannot be used to build a Java project, only to run it. JRE 不能用于构建 Java 项目,只能用于运行它。

嗯,Jenkins 配置设置是使用系统 JDK,它是 8。但是,我应该将 JDK 设置设置为 15。一旦我这样做了,一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到工件 com.sun:tools:jar:0 - Could not find artifact com.sun:tools:jar:0 找不到工件 com.sun:tools:jar:14.0.1 - Could not find artifact com.sun:tools:jar:14.0.1 cxf-codegen-plugin could not find artifact com.sun:tools:jar:1.8.0 from C:\Program Files\Java\jre1.8.0_251/../lib/tools.jar - cxf-codegen-plugin could not find artifact com.sun:tools:jar:1.8.0 from C:\Program Files\Java\jre1.8.0_251/../lib/tools.jar 缺少工件 com.sun:tools:jar - Missing artifact com.sun:tools:jar 构建错误:缺少工件 com.sun:tools:jar:1.6 - Build error: missing artifact com.sun:tools:jar:1.6 com.sun:tools:jar 的 dependency.systemPath' 必须指定绝对路径,但为 ${tools.jar} - dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${tools.jar} Struts2是否需要com.sun:tools:jar:1.5.0? - Struts2 exclude com.sun:tools:jar:1.5.0 required? com.sun:tools:jar:在roo中运行“perform eclipse”时缺少1.4.2 - com.sun:tools:jar:1.4.2 missing when running “perform eclipse” in roo 我不断收到错误无法在指定路径 /usr/lib/jvm/java-8-openjdk-amd64/jre/../lib/jconsole.jar 处找到工件 sun.jdk:jconsole:jar:jdk” - I keep getting the error Could not find artifact sun.jdk:jconsole:jar:jdk at specified path /usr/lib/jvm/java-8-openjdk-amd64/jre/../lib/jconsole.jar" 在中央找不到工件com.sun.xml.bind:jaxb-impl:jar:2.0EA3 - Could not find artifact com.sun.xml.bind:jaxb-impl:jar:2.0EA3 in central
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM