用nexus搭建maven私服


今天花了点时间 配置了一个本地仓库  主要是方便自己开发使用。
使用的 nexus 私服 maven  idea15

nexus的配置 我贴一个别人的教程吧,写的很详细。 我会附上自己的配置,以及今天犯错的地方,可能大家也会犯错吧。

首先需要的的 nexus , jdk , maven  idea15 等 就不一一说明了,这些网上大把都是。
附带个nexus 下载链接:http://www.sonatype.org/nexus/go/

打开目录nexus-2.4.0-09-bundle\nexus-2.4.0-09\bin\jsw 这个目录下面你会发现有很多系统版本的nexus环境

   我的电脑是win10 (64)为的系统,所以我选择的是windows-x86-64这个版本,当然可以根据个人的电脑系统选择对应的版本 

 

在这个文件夹下面有对应的 控制台  安装服务 启动 停止 卸载等的启动文件  (右键管理员启动吧!) 很直接明白的。

 

另外就是需要配置一下nexus\nexus-2.11.4-01\bin\jsw\conf 文件夹下的wrapper.conf  中  

 

# Set the JVM executable

# (modify this to absolute path if you need a Java that is not on the OS path)

wrapper.java.command= C:\Program Files\Java\jdk1.8.0_31\bin\java  (记得 后面的java 不要丢了!)

 

其他就基本差不多了 ,贴上一个个人觉得很详细的 nexus 配置教程 :

链接:http://www.blogjava.net/xiaomage234/archive/2012/11/22/391770.html 

 

配置过程中需要注意的点:

       1:Download Remote Indexes改为true

       2:group其实是一个虚拟的仓库,就是public 资源库 加源是 添加到左边,看了很多教程 都没说清楚。

       3:改完save 之后 ,记得repair index。

 

然后贴一下 自己的配置文件:

 

<mirrors>  
   <mirror>
     <id>nexus</id>
     <mirrorOf>*</mirrorOf>
     <name>Nexus Mirror</name>
     <url>http://localhost:8081/nexus/content/groups/public</url>
   </mirror>
</mirrors>


<profiles>
<profile>
      <id>nexus</id>
      <repositories>
        <repository>
          <id>nexus</id>
          <name>Nexus</name>
          <url>http://localhost:8081/nexus/content/groups/public</url>
          <releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>
          <snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>nexus</id>
          <name>Nexus</name> 
          <url>http://localhost:8081/nexus/content/groups/public</url>
          <releases><enabled>true</enabled>       <updatePolicy>always</updatePolicy></releases>
          <snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>       
        </pluginRepository>       
      </pluginRepositories>        
    </profile>
 </profiles>


 <activeProfiles>
    <activeProfile>nexus</activeProfile>
 </activeProfiles>


 

这三块分别按照对应位置修改即可。 现在可以建一个project 试试了。

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值