After importing the maven project using eclipse with the m2eclipse plug-in installed, Pom. XML start position: missing artifact COM. the Sun: Tools: jar: 1.5.0 error is not a big problem, but this error will block the eclipse build Maven project. There are two solutions to this problem:
Method 1:
Find the eclipse. ini file in the eclipse installation directory and append the VM parameter to the-vmargs parameter. The following is an example:
-VM
D: \ Java \ jdk1.6.0 _ 37 \ bin \ javaw.exe
For instructions on the eclipse. ini file and-VM parameter settings, refer to: http://wiki.eclipse.org/Eclipse.ini
However, sometimes eclipse is modified. you can right-click the project, select Maven> disable Maven nature, and right-click Configure-> convert to Maven project.
Method 2:
Specify the tools. Jar dependency in the POM file, refer to: http://maven.apache.org/general.html#tools-jar-dependency:
<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.6 </version> <scope> System </scope> <systempath >$ {Java. home }/.. /lib/tools. jar </systempath> </dependency> </dependencies> </profile> </profiles>
Replace the value of <version/> with your JDK version.