<id>releases</id> 对应pom <id>releases</id> 传说是用来获取帐密。。还有人说要跟<mirror>的id一致,试了下不同也没事?
编辑settings.xml文件
<servers>
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>snapshots</id>
<username>username</username>
<password>password</password>
</server>
</servers>
编辑maven工程的pom.xml,添加如下内容
<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
<name>Nexus SNAPSHOTS Repository</name>
<url>http://url.com.cn/nexus/content/repositories/Project-Snapshots/</url>
</snapshotRepository>
<repository>
<id>releases</id>
<name>Nexus RELEASE Repository</name>
<url>http://url.com.cn/nexus/content/repositories/Project</url>
</repository>
</distributionManagement>