使用maven私库的时候遇到的问题

1:

 Could not transfer artifact com.yolo:common:jar:1.0.0 from/to maven-releases (http://192.168.3.47:20010/repository/maven-releases/): Failed to transfer file: http://192.168.3.47:20010/repository/maven-releases/com/yolo/common/1.0.0/common-1.0.0.jar. Return code is: 400, ReasonPhrase: Repository does not allow updating assets: maven-releases. -> [Help 1]

解决方法:

浏览器登录nexus管理界面–>设置图标–>Repository–>Repositories–>maven-releases–>Hosted–>请选择‘Allow redeploy’策略,默认是disable策略,然后保存。 请注意,不同版本的nexus,进入的路径可能有细微区别
 

2:

Failed to deploy artifacts: Could not transfer artifact com.yolo:common:jar:1.0.0 from/to maven-releases (http://192.168.3.47:20010/repository/maven-releases/): Failed to transfer file: http://192.168.3.47:20010/repository/maven-releases/com/yolo/common/1.0.0/common-1.0.0.jar. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]

解决方法:

在maven settings.xml中设置

   <server> 
      <id>maven-releases</id> 
      <username>admin</username> 
      <password>123456</password> 
    </server> 
    <server> 
      <id>maven-snapshots</id> 
      <username>admin</username> 
      <password>123456</password> 
    </server> 

这样就有写权限了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值