nexus中新建host类型的仓库,配置了权限,能上传上去jar包,但是在其他项目里面引用不了那个jar,下不来
报错:Not authorized , ReasonPhrase:Unauthorized.
说没权限

maven的私服nexus下载自定义包失败
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
关注
原来是没有配置认证。
maven目录conf的setting.xml里,
releases
admin
admin123
snapshots
admin
admin123
用户名和密码都是nexus的。再次deploy即可。注意这里的id要和pom.xml里远程deploy的地址对应一致,我的pom.xml里配置:
<distributionManagement> <repository> <id>releases</id> <name>Nexus Release Repository</name> <url>http://10.1.81.199:8081/nexus/content/repositories/releases/</url> </repository> <snapshotRepository> <id>snapshots</id> <name>Nexus Snapshot Repository</name> <url>http://10.1.81.199:8081/nexus/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement>
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报