【Maven】Missing artifact com.sun:tools:jar:1.5.0

来源:互联网 发布:新网互联域名证书下载 编辑:程序博客网 时间:2024/06/09 22:53

Eclipse maven has following error:
Missing artifact com.sun:tools:jar:1.5.0


Solution:
Xml代码 复制代码 收藏代码
  1. <properties>
  2. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  3. <java.home>D:\Soft\Java\jdk1.6.0_29</java.home>
  4. </properties>
  5. <profiles>
  6. <profile>
  7. <id>default-tools.jar</id>
  8. <activation>
  9. <property>
  10. <name>java.vendor</name>
  11. <values>Sun.Microsystems Inc.</values>
  12. </property>
  13. </activation>
  14. </profile>
  15. </profiles>
  16. <dependencies>
  17. <dependency>
  18. <groupId>com.sun</groupId>
  19. <artifactId>tools</artifactId>
  20. <version>1.5.0</version>
  21. <scope>system</scope>
  22. <systemPath>${java.home}/lib/tools.jar</systemPath>
  23. </dependency>
  24. </dependencies>


PS: here, <profiles> and <dependencies> must be sepreated, or it cant solve the problem. 

原创粉丝点击