简体   繁体   中英

Pom.xml project build error

I have imported maven projects in my eclipse, but I am getting the following error in 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

I am kind of new to maven, any help will be appreciated.

You've specified a dependency on jdk.tools:jdk.tools:jar with a <systemPath> of ${JAVA_HOME}/lib/tools.jar . ${JAVA_HOME} is not a valid Maven property . The syntax to read the environment variable JAVA_HOME is ${env.JAVA_HOME} . However, the same information is exposed as a system property named java.home , so ${java.home} is the best solution.

Look for tools.jar which should be in jdk/lib , if not mean download latest jdk or add tools.jar to this location. This should fix the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM