推荐搭建nexus2.x
从仓库下载的配制信息
- setting.xml
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>central</mirrorOf>
<url>http://ip:8081/nexus/content/groups/public/</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>development</id>
<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>
</profiles>
<activeProfiles>
<activeProfile>development</activeProfile>
</activeProfiles>
其中 http://ip:8081/nexus/content/groups/public/指向
DEPLOY jar到私服
- setting.xml
<servers>
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>Snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
- pom.xml
<distributionManagement>
<repository>
<!-- id 与setting.xml中对应id相同 ,下同-->
<id>releases</id>
<url>http://192.168.130.50:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>Snapshots</id>
<url>http://192.168.130.50:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
2.png
网友评论