码迷,mamicode.com
首页 > 其他好文 > 详细

nexus私服常用设置

时间:2019-01-31 18:24:23      阅读:339      评论:0      收藏:0      [点我收藏+]

标签:enable   plugin   ble   nexus   color   profile   set   groups   常用设置   

https://www.jianshu.com/p/7a09915675d9

 

或许用得上。

settings.xml

<server>  
   <!-- 服务器密码 --> <id>user-release</id> <username>admin</username> <password>admin123</password> </server> <server> <id>user-snapshots</id> <username>admin</username> <password>admin123</password> </server> </servers> <!-- 配置私服地址映射 --> <mirror> <id>nexus</id> <mirrorOf>*</mirrorOf> <name>MyRepository</name> <!--私服仓库地址--> <url>http://localhost:8081/nexus/content/groups/public</url> </mirror> <profile> <id>nexus</id> <repositories> <repository> <id>central</id> <name>MyRepository</name> <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> <!-- 激活私服映射 --> <activeProfiles> <activeProfile>nexus</activeProfile> </activeProfiles>

 

pom.xml

<!-- 镜像加速 -->
<repositories>
    <repository>
        <id>nexus</id>
        <name>nexus</name>
            <url>http://localhost:8081/nexus/content/groups/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
</repositories>

<!-- 镜像发布 -->
<distributionManagement>  
      <repository> 
        <!-- 两个ID必须与 setting.xml中的<server><id>nexus-releases</id></server>保持一致-->
          <id>user-release</id>  
          <name>User Project Release</name>  
          <url>http://localhost:8081/nexus/content/repositories/releases/</url>  
        </repository>  
  
     <snapshotRepository>  
        <id>user-snapshots</id>  
         <name>User Project SNAPSHOTS</name>
         <url>http://localhost:8081/nexus/content/repositories/snapshots/</url>  
       </snapshotRepository>  
</distributionManagement>  

 

nexus私服常用设置

标签:enable   plugin   ble   nexus   color   profile   set   groups   常用设置   

原文地址:https://www.cnblogs.com/aguncn/p/10343038.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!