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>

posted @ 2021-03-02 15:18  春江潮水连海平  阅读(1081)  评论(0编辑  收藏  举报