使用nexus搭建私服,在settings.xml 里面配置了如下的片断:
nexus
http://localhost:8081/nexus/content/groups/public
*
现在我的项目需要下载新的jar包时,nexus只会在本地找一遍,找不到就报错了,如何能让nexus先找本地,找不到时再去其他仓库去找呢,目前public 这个group包括了Central,Apache Snapshots等其他仓库,是否是哪里配置不对,望指教,谢谢:)
使用nexus搭建私服,在settings.xml 里面配置了如下的片断:
nexus
http://localhost:8081/nexus/content/groups/public
*
现在我的项目需要下载新的jar包时,nexus只会在本地找一遍,找不到就报错了,如何能让nexus先找本地,找不到时再去其他仓库去找呢,目前public 这个group包括了Central,Apache Snapshots等其他仓库,是否是哪里配置不对,望指教,谢谢:)
少配置了几个
[code="java"]<!-- 设置镜像 -->
central
*
Human Readable Name for this Mirror.
http://localhost:8081/nexus/content/groups/public/
central-repos
<repositories>
<repository>
<id>central</id>
<name>central</name>
<url>http://central</url>
<releases>
<enable>true</enable>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
central-repos
[/code]
其实,如果你只是一个人开发的话,不配置nexus也行的,只要在项目中的pom.xml配置
[code="java"]
maven
Maven Repository Switchboard
default
http://repo.maven.apache.org/maven2/
false
[/code]maven在本地找不到jar包,会自动到网上去找