无法将 artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 从/传输到 central (http://repo1.maven.org/maven2)
我在SpringSource Tool Suite中创建了一个新的maven项目。我在新的 maven 项目中遇到此错误。
未能从缓存在本地存储库中的 http://repo1.maven.org/maven2 传输 org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1,在中心更新间隔过或强制更新之前,不会重新尝试解析。原始错误:无法将 artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 从/传输到中心 (http://repo1.maven.org/maven2):连接超时
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.test.app</groupId>
<artifactId>TestApp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>TestApp</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
设置.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
</pluginGroups>
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>user</username>
<password>pass</password>
<host>ip</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
<servers>
</servers>
<mirrors>
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo1.maven.org/maven2/</url>
</mirror>
</mirrors>
<profiles>
</profiles>
</settings>
请注意,我能够构建它。在 IDE 中的 pom.xml 中显示错误。任何解决方案?