1. 检查项目maven设置,默认在.m2下,确保这个目录下setting.xml存在。
2.setting.xml中的2种账号releases和snapshots与项目pom中保持一致:
setting.xml:
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
pom.xml:
<distributionManagement>
<repository>
<id>releases</id>
<url>http://ip:port/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://ip:port/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>