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>
这样就有写权限了