nexus中新建host类型的仓库,配置了权限,能上传上去jar包,但是在其他项目里面引用不了那个jar,下不来
报错:Not authorized , ReasonPhrase:Unauthorized.
说没权限
原来是没有配置认证。
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>