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

nexus+maven配置

时间:2016-02-25 15:42:26      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:

1,maven/conf/settings.xml里找到severs,添加:

<server>
        <id>releases</id>
        <username>admin</username>
        <password>admin123</password>
        </server>
        <server>
        <id>snapshots</id>
        <username>admin</username>
        <password>admin123</password>
    </server>

2,在项目的pom.xml文件添加(id应对应nexus repository的id):

<distributionManagement>
    <repository>  
    <id>releases</id>  
      <name>Nexus Release Repository</name>  
      <url>http://localhost:8081/nexus/content/repositories/releases/</url>  
    </repository>  
    <snapshotRepository>  
    <id>snapshots</id>  
    <name>Nexus Snapshot Repository</name>  
    <url>http://localhost:8081/nexus/content/repositories/snapshots/</url>  
    </snapshotRepository>  
  </distributionManagement>

 3,最后mvn deploy

nexus+maven配置

标签:

原文地址:http://www.cnblogs.com/wuzhiyi/p/5216910.html

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