<?xml version="1.0"?> <settings 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/settings-1.0.0.xsd"> <localRepository>D:\apache-maven-3.2.1\repos</localRepository> <mirrors> <mirror> <id>nexus-osc</id> <mirrorOf>central</mirrorOf> <name>Nexus osc</name> <url>http://maven.oschina.net/content/groups/public/</url> </mirror> <mirror> <id>nexus-osc-thirdparty</id> <mirrorOf>thirdparty</mirrorOf> <name>Nexus osc thirdparty</name> <url>http://maven.oschina.net/content/repositories/thirdparty/</url> </mirror> </mirrors> <profiles> <profile> <id>osc</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>nexus-osc</id> <url>http://maven.oschina.net/content/groups/public/</url> </repository> <repository> <id>nexus-osc-thirdparty</id> <url>http://maven.oschina.net/content/repositories/thirdparty/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>nexus-osc</id> <url>http://maven.oschina.net/content/groups/public/</url> </pluginRepository> </pluginRepositories> </profile> </profiles> </settings>
但是随便建了一个maven项目,然后招行mvn clean compile,还是会报以下错误:
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin🏺2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to nexus-osc (http://maven.oschina.net/content/groups/public/): Connection reset -> [Help 1]
[ERROR][ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
看起来根本没用上OSChina的maven仓库,是我配置有误吗?求过来人指点