在源码调试flume的时候,遇到如下问题:
maven Missing artifact jdk.tools:jdk.tools:jar:1.6
- 方法一
<!-- 在pom.xml中添加: -->
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<version>1.6</version>
<scope>system</scope>
<systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
</dependency>
Maven FAQ for adding dependencies to tools.jar
- 方法二
可以在本地仓库中手动安装tools.jar
mvn install:install-file -DgroupId=jdk.tools -DartifactId=jdk.tools -Dpackaging=jar -Dversion=1.6 -Dfile=tools.jar -DgeneratePom=true
<!-- 在pom.xml中添加: -->
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<version>1.6</version>
</dependency>