将构件打包发布到远程仓库时注意配置问题
一个是本地的setting.xml中一定要配置相应的server,包括用户名密码和server id(这个特别注意后面会提到)
<servers>
<server><id>nexus-releases</id>
<username>admin</username>
<password>llq</password>
</server>
<server>
<id>nexus-snapshots</id>
<username>admin</username>
<password>llq</password>
</server>
另一个构件的pom.xml中 repository的id与上面的server 的id对应上包括releases 和 snapshots
<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>Nexus Release Repository</name>
<url>http://172.16.60.71:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>http://172.16.60.71:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>