首页 > 其他 > 详细

sonatype nexus 搭建maven服务器

时间:2014-09-03 18:25:27      阅读:284      评论:0      收藏:0      [点我收藏+]

1.下载nexus,下载oss版本

2.更改下载的nexus-xxx.war为nexus.war

3.拷贝到tomcat的webapp目录下

4.运行tomcat,进入nexus起始页

5.用admin/admin123登录

6. 点击Administration菜单下面的Repositories,将这三个仓库Apache Snapshots,Codehaus Snapshots,Maven Central的Download Remote Indexes修改为true。然后在这三个仓库上分别右键,选择Repair-index,这样Nexus就会去下载远程的索引文件。

7.修改maven对应本地库的setting.xml,添加如下内容


  1.  <profile>  

  2.     <id>nexus</id>  

  3.     <repositories>  

  4.       <repository>  

  5.         <id>nexus</id>  

  6.         <name>Nexus</name>  

  7.         <url>http://localhost:8081/nexus/content/groups/public/</url>  

  8.         <releases>  

  9.           <enabled>true</enabled>  

  10.         </releases>  

  11.         <snapshots>  

  12.           <enabled>false</enabled>  

  13.         </snapshots>  

  14.       </repository>  

  15.     </repositories>  

  16.     <pluginRepositories>  

  17.       <pluginRepository>  

  18.         <id>nexus</id>  

  19.         <name>Nexus</name>  

  20.         <url>http://localhost:8081/nexus/content/groups/public/</url>  

  21.         <releases>  

  22.           <enabled>true</enabled>  

  23.         </releases>  

  24.         <snapshots>  

  25.           <enabled>false</enabled>  

  26.         </snapshots>  

  27.       </pluginRepository>  

  28.     </pluginRepositories>  

  29.   </profile>  

  30. </profiles>  

  31. <activeProfiles>  

  32.   <activeProfile>nexus</activeProfile>  

  33. </activeProfiles> 


sonatype nexus 搭建maven服务器

原文:http://8757576.blog.51cto.com/8747576/1548360

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!