我尝试按照教程进行操作,但是从第一步开始我就遇到了 maven 错误。
Failure to transfer org.codehaus.plexus:plexus-archiver:pom:1.2 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will
not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.codehaus.plexus:plexus-
archiver:pom:1.2 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/org/codehaus/
plexus/plexus-archiver/1.2/plexus-archiver-1.2.pom
我的 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.dictionnaire.allemand</groupId>
<artifactId>translator</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>translator Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
</dependencies>
<build>
<finalName>translator</finalName>
</build>
</project>
我尝试了很多解决方案,例如
mvn -U install
但没有成功。你知道我该如何解决这个错误吗?我正在为 java EE devlopper 使用 eclipse-Kepler。而且我不在代理或防火墙后面工作。
<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>
<parent>
<artifactId>plexus-components</artifactId>
<groupId>org.codehaus.plexus</groupId>
<version>1.1.18</version>
</parent>
<artifactId>plexus-archiver</artifactId>
<version>1.2</version>
<name>Plexus Archiver Component</name>
<scm>
<connection>
scm:svn:http://svn.codehaus.org/plexus/plexus-components/tags/plexus- archiver-1.2
</connection>
<developerConnection>
scm:svn:https://svn.codehaus.org/plexus/plexus-components/tags/plexus- archiver-1.2
</developerConnection>
<url>
http://fisheye.codehaus.org/browse/plexus/plexus- components/tags/plexus-archiver-1.2
</url>
</scm>
<properties>
<useJvmChmod>false</useJvmChmod>
</properties>
<contributors>
<contributor>
<name>Dan Tran</name>
</contributor>
<contributor>
<name>Richard van der Hoff</name>
</contributor>
</contributors>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>2.0.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-io</artifactId>
<version>1.0.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.6</version>
<configuration>
<systemPropertyVariables>
<useJvmChmod>${useJvmChmod}</useJvmChmod>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</project>