标签:html gem distrib targe active href user enabled mirrors
<repositories> <repository> <id>remote</id> <name>my nexus repository</name> <url>http://192.1.1.103:8081/nexus/content/groups /public/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>nexus</id> <name>Nexus</name> <url>http://192.1.1.103:8081/nexus/content/groups /public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories>
这样就不需要每个项目都配置一次
<mirrors> <mirror> <id>remote</id> <name>remote</name> <url>http://192.1.1.103:8081/nexus/content/ repositories/central/</url> <mirrorOf>*</mirrorOf> </mirror> </mirrors>
<mirrorOf>*</mirrorOf> 这句话意思是所有构件都会从私服中下载
<profiles> <profile> <id>dev</id> <repositories> <repository> <id>nexus</id> <name>Nexus</name> <url>http://192.1.1.103:8081/nexus/content/groups /public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>public</id> <name>Nexus</name> <url>http://192.1.1.103:8081/nexus/content/groups /public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <!-- 激活私服 -->
<activeProfiles> <activeProfile>dev</activeProfile> </activeProfiles>
<distributionManagement> <repository> <id>releases</id> <name>nexus release</name> <url>http://192.1.1.103:8081/nexus/content/ repositories/releases/</url> </repository> <snapshotRepository> <id>snapshots</id> <name>nexus snapshot</name> <url>http://192.1.1.103:8081/nexus/content/ repositories/snapshots/</url> </snapshotRepository> </distributionManagement>
<servers> <server> <id>releases</id> <username>deployment</username> <password>deployment123</password> </server> <server> <id>snapshots</id> <username>deployment</username> <password>deployment123</password> </server> </servers>
mvn deploy
本文作者:hjjay
原文出处:https://www.cnblogs.com/jayhou/p/12271566.html
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接。
maven从nexus下载构件以及maven部署构件到nexus的配置
标签:html gem distrib targe active href user enabled mirrors
原文地址:https://www.cnblogs.com/jayhou/p/12271566.html