Missing Artifact Com.sun:tools:jar 1.5.0

Source: Internet
Author: User

February 20, 2013 21:19:26Hits: 46090

When you use the M2eclipse plug-in, you need to rely on the Tools.jar of the Java runtime after you add the Struts2-core.jar package in Pom.xml. However, when Eclipse cannot read the tools package, the following error occurs:

Missing Artifact Com.sun:tools:jar 1.5.0

Solution One:

To manually configure Pom.xml, add a dependency as follows:

<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<scope>system</scope>
<systempath>${java_home}/. /lib/tools.jar</systempath>
</dependency>

Can!

If the solution is not resolved, try the second method.

Solution Two:

First, look at the error List Windows->show View->problems, and the error will occur at the same time as the above problem.
The container ' Maven Dependencies ' references non existing library ' C:\Documents and settings\dell\.m2\repository\com\ Sun\tools\1.5.0\tools-1.5.0.jar '
Roughly speaking: Can't find the Tools-1.5.0.jar.

So copy the Tools.jar from the C:\Program files\java\jdk1.6.0_10\lib\ directory to the C:\Documents and settings\dell\.m2\repository\com\sun\ Tools\1.5.0\ directory, and rename Tools.jar to Tools-1.5.0.jar, and make the following configuration in Pom.xml:

<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
</dependency>

Can!

MORE: http://www.javaxxz.com/thread-72464-1-1.html

 Solution Three:

Download jar to local C:\Users\Administrator\Desktop\, import into maven

CMD, enter:

MVN install:install-file-dgroupid=com.oracle-dartifactid=ojdbc14-dversion=10.2.0.2.0-dpackaging=jar-dfile=c:\ Users\administrator\desktop\ojdbc14-10.2.0.2.0.jar

Import into the MAVEN local library. Re-run the Maven update on OK.

Missing Artifact Com.sun:tools:jar 1.5.0

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.