Today colleagues are using eclipse to introduce a new MAVEN engineering times error:
Missing Artifact Com.sun:tools:jar:1.6.0:system
The problem is strange, the same code, when running into my local eclipse, did not find the problem, it should be the environment configuration problem. (JDK?) Maven,eclipse? )
From the Internet to find a lot of information, found that most of us only gave the solution, did not give the cause of this problem.
Read from MAVEN's official web: http://maven.apache.org/general.html#tools-jar-dependency
There is no clear cause of the problem, only the solution is given after this problem has occurred:
<Profiles> < Profile> <ID>Default-tools.jar</ID> <activation> < Property> <name>Java.vendor</name> <value>Sun Microsystems INC.</value> </ Property> </activation> <Dependencies> <Dependency> <groupId>Com.sun</groupId> <Artifactid>Tools</Artifactid> <version>1.4.2</version> <Scope>System</Scope> <Systempath>${java.home}/. /lib/tools.jar</Systempath> </Dependency> </Dependencies> </ Profile> </Profiles>
Experimenting in a colleague's environment does solve the problem, but it's unclear what is causing the problem.
Personal suspicion:
1.JDK problem, the colleague machine has JDK8,JDK7, the default javahome is JDK8.
2.maven Path: Colleagues put local repository on the E: disk, not using the default C:\Users\Administrator\.m2\repository
But there is no verification, want to know a friend can leave a message to tell.
Sdjnzqr
Source: http://www.cnblogs.com/sdjnzqr/
Copyright: This article is owned by the author and the blog Park
Reprint: Welcome reprint, but without the consent of the author, this paragraph must be retained; The original link must be given in the article; otherwise, legal liability