maven deploy jar包时报401的解决办法
应该是 cbs-repo,用户名不对导致的,一个是修改settings中的id
1,比如子项目-web的pom中增加如下配置
<repositories>
<repository>
<id>arp-repo</id>
<name>Cig-repo Nexus Repository</name>
<url>http://10.2.1.10:8081/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>aist-repo</id>
<name>aist Nexus Repository</name>
<url>http://nexus.abs.tech/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
2,父pomparent增加如下配置
<distributionManagement>
<repository>
<id>arp-repo</id>
<name>arp repo release</name>
<url>http://10.2.1.10:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>arp-repo</id>
<name>arp repo snapshot</name>
<url>http://10.2.1.10:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
本文来自博客园,作者:春江潮水连海平,转载请注明原文链接:https://www.cnblogs.com/alonewaiting/p/14469097.html