我正在尝试将项目工件部署到 Archiva 远程存储库中,但不断收到此错误:
错误信息:
[INFO] --- maven-deploy-plugin:2.8.1:deploy (default-deploy) @ mavenandroidapplication ---
Downloading: http://192.168.10.29:8080/archiva/repository/snapshots/com/stm/idg/android/mavenandroidapplication/1.0-SNAPSHOT/maven-metadata.xml
Uploading: http://192.168.10.29:8080/archiva/repository/snapshots/com/stm/idg/android/mavenandroidapplication/1.0-SNAPSHOT/mavenandroidapplication-1.0-20131105.013101-1.apk
Uploading: http://192.168.10.29:8080/archiva/repository/snapshots/com/stm/idg/android/mavenandroidapplication/1.0-SNAPSHOT/mavenandroidapplication-1.0-20131105.013101-1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.707s
[INFO] Finished at: Tue Nov 05 09:31:01 SGT 2013
[INFO] Final Memory: 16M/39M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy (default-deploy) on project mavenandroidapplication: Failed to deploy artifacts: Could not transfer artifact com.stm.idg.android:mavenandroidapplication:apk:1.0-20131105.013101-1 from/to archiva.snapshots (http://192.168.10.29:8080/archiva/repository/snapshots/): Access denied to http://192.168.10.29:8080/archiva/repository/snapshots/com/stm/idg/android/mavenandroidapplication/1.0-SNAPSHOT/mavenandroidapplication-1.0-20131105.013101-1.apk. Error code 401, Unauthorized -> [Help 1]
我正在使用Maven 3.0.5、Archiva 1.3.6、Android 开发工具包。这是一个 Maven 项目,我通过Run As --> Maven build --> (Goals) deploy执行。
以下是配置:
Settings.xml 注意:
<server>
<id>archiva.internal</id>
<username>admin</username>
<password>123</password>
</server>
<server>
<id>archiva.snapshots</id>
<username>admin</username>
<password>123</password>
</server>
Pom.xml
<distributionManagement>
<repository>
<id>archiva.internal</id>
<name>Internal Release Repository</name>
<url>http://192.168.10.29:8080/archiva/repository/internal/</url>
</repository>
<snapshotRepository>
<id>archiva.snapshots</id>
<name>Internal Snapshot Repository</name>
<url>http://192.168.10.29:8080/archiva/repository/snapshots/</url>
</snapshotRepository>
</distributionManagement>
非常感谢您的帮助。谢谢你。