Eclipse Maven Engineering Missing Artifact Com.sun:tools:jar:1.5.0:system workaround

Source: Internet
Author: User

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
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.