首页 > 代码库 > 解决eclipse下maven工程报错:Missing artifact jdk.tools:jdk

解决eclipse下maven工程报错:Missing artifact jdk.tools:jdk

1.进入jdk/lib目录,执行:

mvn install:install-file -DgroupId=jdk.tools -DartifactId=jdk.tools -Dpackaging=jar -Dversion=1.7 -Dfile=tools.jar -DgeneratePom=true

2.加入依赖

<dependency>

    <groupId>jdk.tools</groupId>

    <artifactId>jdk.tools</artifactId>

    <version>1.7</version>

</dependency>

参考资料:

http://stackoverflow.com/questions/11118070/buiding-hadoop-with-eclipse-maven-missing-artifact-jdk-toolsjdk-toolsjar1