Nexus3.8.0上传jar包

57 篇文章 2 订阅
5 篇文章 0 订阅

原文地址

1 本地maven/conf/settings.xml中配置认证信息,节点下添加以下节点;用户名密码与登录nexus的相同,默认admin admin123

<server>   
    <id>nexus-3rdParty</id>   
    <username>admin</username>   
    <password>admin123</password>   
</server>  

2 上传jar

  • -DgroupId:jar包的groupId
  • -DartifactId:jar包的artifactId
  • -Dversion:jar包版本
  • -Dfile:本地jar文件路径
  • -Durl:远程仓库url,如ip:8081/
  • -DrepositoryId:仓库id,对应下节点值,如上面配置为nexus-3rdParty,则必须为该值,否则提示401,认证失败
mvn deploy:deploy-file -DgroupId=xxx -DartifactId=xxx -Dversion=xxx -Dpackaging=jar -Dfile=xxx -Durl=http://xxx:8081/repository/3rdParty/ -DrepositoryId=xxx

示例

上传ss_css2.jar

mvn deploy:deploy-file -DgroupId=cgbd-3rd -DartifactId=ss_css2 -Dversion=1.1.0 -Dpackaging=jar -Dfile=/Users/mac/Downloads/ss_css2.jar -Durl=http://nxs.dola.me/repository/3rd_part/ -DrepositoryId=nexus-3rdParty

上传pd4ml_demo.jar

mvn deploy:deploy-file -DgroupId=cgbd-3rd -DartifactId=pd4ml_demo -Dversion=1.1.0 -Dpackaging=jar -Dfile=/Users/mac/Downloads/pd4ml_demo.jar -Durl=http://nxs.dola.me/repository/3rd_part/ -DrepositoryId=nexus-3rdParty

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值