我正在将 jar 文件部署到 maven 存储库(archiva)
pom.xml:
<distributionManagement>
<repository>
<id>archiva.internal</id>
<uniqueVersion>false</uniqueVersion>
<name>Internal Release Repository</name>
<url>http://server:8080/archiva/repository/internal</url>
</repository>
<snapshotRepository>
<id>archiva.snapshots</id>
<uniqueVersion>false</uniqueVersion>
<name>Internal Snapshot Repository</name>
<url>http://server:8080/archiva/repository/internal/snapshots</url>
</snapshotRepository>
</distributionManagement>
设置.xml:
<servers>
<server>
<id>archiva.internal</id>
<username>user</username>
<password>password</password>
<filePermissions>664</filePermissions>
<directoryPermissions>775</directoryPermissions>
</server>
<server>
<id>archiva.snapshots</id>
<username>user</username>
<password>password</password>
<filePermissions>664</filePermissions>
<directoryPermissions>775</directoryPermissions>
</server>
</servers>
第一次 Maven 部署是成功的,
Uploading: http://server:8080/archiva/repository/internal/com/test/maven-metadata.xml
Uploaded: http://server:8080/archiva/repository/internal/com/test/maven-metadata.xml (306 B at 2.4 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.843s
[INFO] Finished at: Mon Nov 07 17:09:49 EST 2011
[INFO] Final Memory: 5M/11M
如果我尝试重新部署相同的工件,我会得到:
Failed to transfer file: http://server:8080/archiva/repository/internal/com/test.jar. Return code is: 409 -> [Help 1]
是否可以使用相同的版本重新部署相同的工件,或者我必须在重新部署之前手动从存档中删除工件?