I use maven to deploy artifact to sonatype nexus,I can perform release action normally,but deploy snapshots failed.
- sonatype nexus 2.7.0.5
- Java 1.7
maven 3.0.5
- mvn release:prepare;mvn release:perform; successful without any error
- mvn deploy failed with return code 500
[INFO] maven-jar-plugin:2.4:jar (default-jar) @ licm
[INFO] Building jar: /foo/licm/trunk/target/licm-0.2.9-SNAPSHOT.jar
[INFO]
[INFO] maven-install-plugin:2.3.1:install (default-install) @ licm
[INFO] Installing /foo/licm/trunk/target/licm-0.2.9-SNAPSHOT.jar to /foo/.m2/repository/com/xxx/utils/licm/0.2.9-SNAPSHOT/licm-0.2.9-SNAPSHOT.jar
[INFO] Installing /foo/licm/trunk/pom.xml to /foo/.m2/repository/com/xxx/utils/licm/0.2.9-SNAPSHOT/licm-0.2.9-SNAPSHOT.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.8.1:deploy (default-deploy) @ licm ---
Downloading: http://xxx.xxx.com:8080/nexus/content/repositories/snapshots/com/xxx/utils/licm/0.2.9-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata com.xxx.utils:licm:0.2.9-SNAPSHOT/maven-metadata.xml
from/to Snapshots (http://xxx.xxx.com:8080/nexus/content/repositories/snapshots): Failed to transfer file:
http://xxx.xxx.com:8080/nexus/content/repositories/snapshots/com/xxx/utils/licm/0.2.9-SNAPSHOT/
maven-metadata.xml. Return code is: 500 , ReasonPhrase:Internal Server Error.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.824s
[INFO] Finished at: Fri Dec 20 01:20:33 CST 2013
[INFO] Final Memory: 8M/20M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy (default-deploy) on project licm: Failed to retrieve remote metadata com.xxx.utils:licm:0.2.9-SNAPSHOT/maven-metadata.xml: Could not transfer metadata com.xxx.utils:licm:0.2.9-SNAPSHOT/maven-metadata.xml from/to Snapshots (http://xxx.xxx.com:8080/nexus/content/repositories/snapshots): Failed to transfer file: http://xxx.xxx.com:8080/nexus/content/repositories/snapshots/com/xxx/utils/licm/0.2.9-SNAPSHOT/maven-metadata.xml. Return code is: 500 , ReasonPhrase:Internal Server Error. -> [Help 1]"
This is my first time to deploy snapshots to remote repository,so there have nothing in snapshot repository on nexus server
- settings.xml
<?xml version="1.0"?>
<settings>
<servers>
<server>
<id>Releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>Snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
<mirrors>
<mirror>
<id>Nexus</id>
<name>Nexus Public Mirror</name>
<url>http://xxx.xxx.com:8080/nexus/content/groups/public</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
</settings>
- pom.xml
<distributionManagement>
<repository>
<id>Releases</id>
<name>xxx Releases Repositories</name>
<url>http://xxx.xxx.com:8080/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>Snapshots</id>
<name>xxx Snapshots Repositories</name>
<url>http://xxx.xxx.com:8080/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>