解決在pom.xml文件中出現的Missing artifact jdk.tools:jdk.tools:jar:1.6問題,
<dependency> <groupId>jdk.tools</groupId> <artifactId>jdk.tools</artifactId> <version>1.7</version> <scope>system</scope> <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath> </dependency>
在maven官方文檔有提到這個問題,詳見Maven FAQ for adding dependencies to tools.jar
除此之外,可以手動這個tools到本地倉庫,詳情看這里-》http://www.cnblogs.com/gyjx2016/p/5888912.html
然后直接,在引入即可
<dependency> <groupId>jdk.tools</groupId> <artifactId>jdk.tools</artifactId> <version>1.7</version> </dependency>