nexus 配置maven仓库

2 篇文章 0 订阅
1 篇文章 0 订阅

接上一篇

1.  http://www.sonatype.org/nexus/go 下载 nexus解压


2.添加环境变量 将E:\nexus\nexus-2.8.1-01\bin  添加到path中


3. 按操作安装启动

http://localhost:8081/nexus/进入 能进说明安装成功。 默认 账号admin  admin123

4.修改maven目录下repo中的settings.xml 配置文件

  
   <mirrors>
   <!--设置nexus为镜像-->
<mirror>
 <id>nexusMirrors</id>
<!--所有访问都执行这个url-->
  <mirrorOf>*</mirrorOf>
 <name>Human Readable Name for this Mirror.</name>
 <url>http://localhost:8081/nexus/content/groups/public/</url>
</mirror>

</mirrors>
<!--用来覆盖meven中自带的中心仓库  maven中maven-model-builder-3.2.2.jar中有个poi.xml 里面有内容,如果本地仓库和nexus仓库中都没有则不再向maven仓库去下载-->
<profiles>

<profile>
      <id>centralProfile</id>
      <repositories>
        <repository>
          <id>central</id>
          <name>central Repository</name>
<!--http://*也可以好像-->
          <url>http://central</url>
 <layout>default</layout>
 <releases>
<enabled>true</enabled>
 </releases>
<!--修改原来默认不下载snapshots 版本的包-->
  <snapshots>
<enabled>true</enabled>
 </snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>

<!--开启profile-->
 <activeProfiles>
    <activeProfile>centralProfile</activeProfile>
  </activeProfiles>
  

 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值