分享

私服相关配置

 xrvx 2017-02-05
添加到settings.xml中   
<server>
      <id>releases</id>
      <username>admin</username>
      <password>admin123</password>
    </server>
<server>
      <id>snapshots</id>
      <username>admin</username>
      <password>admin123</password>
    </server>


添加到pom.xml中

 <distributionManagement>
  <repository>
  <id>releases</id>
<url>http://localhost:8081/nexus/content/repositories/releases/</url>
  </repository> 
  <snapshotRepository>
  <id>snapshots</id>
<url>http://localhost:8081/nexus/content/repositories/snapshots/</url>
  </snapshotRepository> 
  </distributionManagement>







---------------------------------------------------
添加到settings.xml中
<profile>   
<!--profile的id-->
    <id>dev</id>   
    <repositories>   
      <repository>  
<!--仓库id,repositories可以配置多个仓库,保证id不重复-->
        <id>nexus</id>   
<!--仓库地址,即nexus仓库组的地址-->
        <url>http://localhost:8081/nexus/content/groups/public/</url>   
<!--是否下载releases构件-->
        <releases>   
          <enabled>true</enabled>   
        </releases>   
<!--是否下载snapshots构件-->
        <snapshots>   
          <enabled>true</enabled>   
        </snapshots>   
      </repository>   
    </repositories>  
<pluginRepositories>  
    <!-- 插件仓库,maven的运行依赖插件,也需要从私服下载插件 -->
        <pluginRepository>  
        <!-- 插件仓库的id不允许重复,如果重复后边配置会覆盖前边 -->
            <id>public</id>  
            <name>Public Repositories</name>  
            <url>http://localhost:8081/nexus/content/groups/public/</url>  
        </pluginRepository>  
    </pluginRepositories>  
  </profile>  
  <activeProfiles>
    <activeProfile>dev</activeProfile>
  </activeProfiles>
----------------------------------------------------------------------
<mirror>  
 <id>alimaven</id>  
 <name>aliyun maven</name>  
 <url>http://maven.aliyun.com/nexus/content/groups/public/</url>  
 <mirrorOf>central</mirrorOf>          
</mirror>

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多