即时通讯使用Maven 3.0.4和Nexus 2.0.6。我已经设置了我的settings.xml作为使用单个存储库的Nexus指令。 当maven试图运行maven -U clean时,我得到下面的错误。Nexus不缓存maven中央插件
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its d
ependencies could not be resolved: Failed to read artifact descriptor for org.ap
ache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not find artifact org.apa
che.maven.plugins:maven-clean-plugin:pom:2.4.1 in nexus (http://localhost:8081/n
exus/content/groups/public) -> [Help 1]
如果我从设置中删除nexus镜像并直接转到maven central,则该命令有效。 nexus中maven repo的设置表明它处于服务状态,并且位于公共组(最后列出)中。
我并不支持访问互联网的代理。
这里是我的settings.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">
<offline>false</offline>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>maven-central</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://repo1.maven.org/maven2/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://repo1.maven.org/maven2/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
你能否检查神器是否是通过网络访问它下载的 - http:// localhost:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.4.1/ – Raghuram
您是否检查过通过浏览器访问Nexus并检查是否可以通过浏览器访问该工件? – khmarbaise
我在这里添加了更多类似情况的详细信息:http://stackoverflow.com/questions/13927806/nexus-wont-download-artifacts-from-central/13928041#13928041 –