构建错误:缺少工件 com.sun:tools:jar:1.6
尝试构建PlayN示例项目,我得到:
Missing artifact com.sun:tools:jar:1.6 pom.xml /playn-cute line 6 Maven Dependency Problem
在每个文件上。如何解决?pom.xml
编辑:
我已将配置文件节点添加到 ,但错误仍然存在。我已经检查了是否确实存在,但它没有。所以我已经添加到lib文件夹。错误仍然存在。pom.xml
tools.jar
tools.jar
完整的 pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.googlecode.playn</groupId>
<artifactId>playn-project</artifactId>
<version>1.0.1</version>
</parent>
<artifactId>playn-cute</artifactId>
<name>PlayN Cute Metaproject</name>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<playn.version>1.0.1</playn.version>
</properties>
<modules>
<module>core</module>
<module>java</module>
<module>html</module>
<!-- <module>flash</module> -->
<module>android</module>
</modules>
<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>
</project>