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

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. 

posted on 2013-02-20 20:21  蜜雪薇琪  阅读(327)  评论(0编辑  收藏  举报