我在日食上使用maven。我想使用Lwjgl和其他一些库,但Maven不会安装它们。它说他们失踪了。以下是我在查看错误时所说的内容:
ArtifactDescriptorException: Failed to read artifact descriptor for slick:slick:jar:274: ArtifactResolutionException: Failure to transfer slick:slick:pom:274 from http://slick.cokeandcode.com/mavenrepo was cached in the local repository, resolution will not be reattempted until the update interval of slick has elapsed or updates are forced. Original error: Could not transfer artifact slick:slick:pom:274 from/to slick (http://slick.cokeandcode.com/mavenrepo): null to http://slick.cokeandcode.com/mavenrepo/slick/slick/274/slick-274.pom pom.xml /TheLabyrinth
Missing artifact java3d:vecmath:jar:1.3.1 pom.xml /TheLabyrinth
Missing artifact junit:junit:jar:4.10 pom.xml /TheLabyrinth
Missing artifact net.java.jinput:jinput-platform:jar:natives-linux:2.0.5 pom.xml /TheLabyrinth line 1 Maven Dependency Problem
Missing artifact net.java.jinput:jinput-platform:jar:natives-osx:2.0.5 pom.xml /TheLabyrinth
Missing artifact net.java.jinput:jinput-platform:jar:natives-windows:2.0.5 pom.xml /TheLabyrinth
Missing artifact net.java.jinput:jinput:jar:2.0.5 pom.xml /TheLabyrinth
Missing artifact net.java.jutils:jutils:jar:1.0.0 pom.xml /TheLabyrinth
Missing artifact org.hamcrest:hamcrest-core:jar:1.1 pom.xml /TheLabyrinth
Missing artifact org.lwjgl.lwjgl:lwjgl_util_applet:jar:2.8.4 pom.xml /TheLabyrinth
Missing artifact org.lwjgl.lwjgl:lwjgl_util:jar:2.8.4 pom.xml /TheLabyrinth
Missing artifact org.lwjgl.lwjgl:lwjgl-platform:jar:natives-linux:2.8.4 pom.xml /TheLabyrinth
Missing artifact org.lwjgl.lwjgl:lwjgl-platform:jar:natives-osx:2.8.4 pom.xml /TheLabyrinth
Missing artifact org.lwjgl.lwjgl:lwjgl-platform:jar:natives-windows:2.8.4 pom.xml /TheLabyrinth
Missing artifact org.lwjgl.lwjgl:lwjgl:jar:2.8.4 pom.xml /TheLabyrinth
The container 'Maven Dependencies' references non existing library 'C:\Users\Wyatt\.m2\repository\java3d\vecmath\1.3.1\vecmath-1.3.1.jar' TheLabyrinth
The project cannot be built until build path errors are resolved TheLabyrinth
所以你可以看到它似乎并没有起到很好的作用。但是看看这些错误,我的pom.xml似乎有些不对劲,所以这里有一个副本:
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.awsp8.labyrinth</groupId>
<artifactId>TheLabyrinth</artifactId>
<version>1.0.0</version>
<name>The Labyrinth</name>
<description>You are stuck in a room, no way out... Or so you think.</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<natives.version>0.0.6</natives.version>
<lwjgl.version>2.8.2</lwjgl.version>
<slick.version>274</slick.version>
<junit.version>4.10</junit.version>
</properties>
<repositories>
<repository>
<id>mavenNatives</id>
<name>Maven Natives Repository</name>
<url>http://mavennatives.googlecode.com/svn/repo</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>slick</id>
<name>slick</name>
<url>http://slick.cokeandcode.com/mavenrepo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.lwjgl.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<version>2.8.4</version>
</dependency>
<dependency>
<groupId>org.lwjgl.lwjgl</groupId>
<artifactId>lwjgl_util</artifactId>
<version>2.8.4</version>
</dependency>
<dependency>
<groupId>org.lwjgl.lwjgl</groupId>
<artifactId>lwjgl_util_applet</artifactId>
<version>2.8.4</version>
</dependency>
<dependency>
<groupId>slick</groupId>
<artifactId>slick</artifactId>
<version>${slick.version}</version>
</dependency>
<dependency>
<groupId>java3d</groupId>
<artifactId>vecmath</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<plugin>
<groupId>com.googlecode.mavennatives</groupId>
<artifactId>maven-nativedependencies-plugin</artifactId>
<version>0.0.5</version>
<executions>
<execution>
<id>unpacknatives</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
</plugin>
</project>
我做错了吗?提前谢谢。