[英]Pom.xml project build error
I have imported maven projects in my eclipse, but I am getting the following error in pom.xml-我在 Eclipse 中导入了 Maven 项目,但是在 pom.xml- 中出现以下错误
Project build error: 'dependencyManagement.dependencies.dependency.systemPath' for jdk.tools:jdk.tools:jar must specify an absolute path but is ${JAVA_HOME}/lib/tools.jar项目构建错误:'dependencyManagement.dependencies.dependency.systemPath' for jdk.tools:jdk.tools:jar 必须指定绝对路径,但为 ${JAVA_HOME}/lib/tools.jar
I am kind of new to maven, any help will be appreciated.我对 maven 有点陌生,任何帮助将不胜感激。
You've specified a dependency on jdk.tools:jdk.tools:jar
with a <systemPath>
of ${JAVA_HOME}/lib/tools.jar
.您已指定对jdk.tools:jdk.tools:jar
的依赖jdk.tools:jdk.tools:jar
,其中<systemPath>
为${JAVA_HOME}/lib/tools.jar
。 ${JAVA_HOME}
is not a valid Maven property . ${JAVA_HOME}
不是有效的Maven 属性。 The syntax to read the environment variable JAVA_HOME
is ${env.JAVA_HOME}
.读取环境变量JAVA_HOME
的语法是${env.JAVA_HOME}
。 However, the same information is exposed as a system property named java.home
, so ${java.home}
is the best solution.但是,相同的信息作为名为java.home
的系统属性公开,因此${java.home}
是最佳解决方案。
Look for tools.jar
which should be in jdk/lib
, if not mean download latest jdk or add tools.jar
to this location.查找应该在jdk/lib
tools.jar
,如果不是,则表示下载最新的 jdk 或将tools.jar
添加到该位置。 This should fix the issue.这应该可以解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.