nexus3 发布到本地私服

1、在nexus3中管理员登录,新建一个仓库
       Repositories --> Create repository --> maven2(hosted)
    //输入Name, 自定义,如 MyRepo
    //Version policy 简单点选 Mixed   --混合
    //Layout policy  简单点选 permissive    --宽松的
    //Deployment policy: Allow redeploy    --可重复发布
    //保存
    
    
2、新建user,新建role
    //加入权限  nx-repository-admin-maven2-Myrepo-*
    //加入权限  nx-repository-view-maven2-Myrepo-*
    //新建的user加入到新建的role里,比如user=deploy1, role=deployRole

3、本地maven settings.xml配置
    <mirror>
		<id>local-deploy</id>
		<mirrorOf>*</mirrorOf>
		<url>http://192.168.1.72:8081/repository/Myrepo/</url>
	</mirror>

4、本地maven settings.xml配置
    <server>
      <id>local-deploy</id>
      <username>deploy1</username>
      <password>deploy</password>
    </server>

5、项目中的pom.xml配置
    <distributionManagement>
        <repository>
            <id>local-deploy</id>
            <name>Releases</name>
            <url>http://192.168.1.72:8081/repository/Myrepo/</url>
            <uniqueVersion>true</uniqueVersion>
        </repository>
        <snapshotRepository>
            <id>local-deploy</id>
            <name>Snapshots</name>
            <url>http://192.168.1.72:8081/repository/Myrepo/</url>
            <uniqueVersion>true</uniqueVersion>
        </snapshotRepository>

    </distributionManagement>

6、大功告成
   192.168.1.72 是 nexus3的私服地址

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值