Missing artifact com.sun:tools:jar:1.5.0

Problem

这主要是由于Maven导入的struts2-core引起的。

 

Solution Zero

-vm
D:\Program Files\Java\jdk1.6.0_35\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m

 

 

Solution One

...
	<dependencies>
		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-core</artifactId>
			<version>${struts-version}</version>
			<exclusions>
				<exclusion>
					<groupId>com.sun</groupId>
					<artifactId>tools</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
	<dependencies>
...
 

 

Solution Two

...	
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.home>D:\Program Files\Java\jdk1.6.0_35</java.home>
		...
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.sun</groupId>
			<artifactId>tools</artifactId>
			<version>1.5.0</version>
			<scope>system</scope>
			<systemPath>${java.home}/lib/tools.jar</systemPath>
		</dependency>
	</dependencies>
...

你可能感兴趣的:(Missing artifact com.sun:tools:jar:1.5.0)