打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
私服相关配置
userphoto

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>

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Sonatype Nexus 搭建Maven 私服
[Maven]Nexus 安装与配置
Maven精选系列
关于nexus
【Maven】Nexus配置和使用
Java技术学习笔记:Maven安装和作用
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服