Did you have a look at nexus logs to see what is wrong on its side ?? This is perhaps a problem of repository target settings
On Oct 6, 2010, at 11:23 AM, NickDeGraeve wrote: > > I'm trying to get a legacy project to build with Maven. I'm not allowed to do > a complete makeover because of time constraints so for the time being I just > call the necessary Ant target. > > The Ant build produces an EAR, a client JAR (with the interfaces for the > Swing client) and its Javadoc and sources JARs. > > The EAR is deployed by default. For the other JARs I have in the POM 3 > deploy:deploy-file configurations. We deploy our artifacts to Nexus. > > If the artifacts are deployed as SNAPSHOT everything goes according to plan > but when deploying as release the deploy fails after the upload of the > sources JAR. The Nexus returns a HTTP 400 error: > > [INFO] Error installing artifact's metadata: Error while deploying metadata: > Failed to transfer file: > http://ourhostname:8081/nexus/content/repositories/releases/com/jnj/gtsc/agent/business/agentClient/2.3.0-RC1/agentClient-2.3.0-RC1.pom. > Return code is: 400 > > Any idea how to fix this? > > Extract of build log: > ------------------- > [INFO] [deploy:deploy {execution: default-deploy}] > Uploading: > http://ourhostname:8081/nexus/content/repositories/releases/com/jnj/gtsc/agent/business/agent/2.3.0-RC1/agent-2.3.0-RC1.ear > 18180K uploaded (agent-2.3.0-RC1.ear) > [INFO] Retrieving previous metadata from nexus > [INFO] repository metadata for: 'artifact com.jnj.gtsc.agent.business:agent' > could not be found on repository: nexus, so will be created > [INFO] Uploading repository metadata for: 'artifact > com.jnj.gtsc.agent.business:agent' > [INFO] Uploading project information for agent 2.3.0-RC1 > [INFO] [deploy:deploy-file {execution: deploy-client-jar}] > Uploading: > http://ourhostname:8081/nexus/content/repositories/releases/com/jnj/gtsc/agent/business/agentClient/2.3.0-RC1/agentClient-2.3.0-RC1.jar > 718K uploaded (agentClient-2.3.0-RC1.jar) > [INFO] Retrieving previous metadata from remote-repository > [INFO] repository metadata for: 'artifact > com.jnj.gtsc.agent.business:agentClient' could not be found on repository: > remote-repository, so will be created > [INFO] Uploading repository metadata for: 'artifact > com.jnj.gtsc.agent.business:agentClient' > [INFO] Uploading project information for agentClient 2.3.0-RC1 > [INFO] [deploy:deploy-file {execution: deploy-client-sources-jar}] > Uploading: > http://ourhostname:8081/nexus/content/repositories/releases/com/jnj/gtsc/agent/business/agentClient/2.3.0-RC1/agentClient-2.3.0-RC1-sources.jar > 696K uploaded (agentClient-2.3.0-RC1-sources.jar) > [INFO] Retrieving previous metadata from remote-repository > [INFO] Uploading repository metadata for: 'artifact > com.jnj.gtsc.agent.business:agentClient' > [INFO] Uploading project information for agentClient 2.3.0-RC1 > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Error installing artifact's metadata: Error while deploying metadata: > Failed to transfer file: > http://ourhostname:8081/nexus/content/repositories/releases/com/jnj/gtsc/agent/business/agentClient/2.3.0-RC1/agentClient-2.3.0-RC1.pom. > Return code is: 400 > > Extract of POM: > ---------------- > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-deploy-plugin</artifactId> > <version>2.4</version> > <executions> > <execution> > <id>deploy-client-jar</id> > <phase>deploy</phase> > <goals> > <goal>deploy-file</goal> > </goals> > <configuration> > > <file>dist/${project.artifactId}Client.jar</file> > > <url>http://ourhostname:8081/nexus/content/repositories/${deployAs}</url> > <groupId>${project.groupId}</groupId> > > <artifactId>${project.artifactId}Client</artifactId> > <version>${project.version}</version> > <packaging>jar</packaging> > <uniqueVersion>false</uniqueVersion> > </configuration> > </execution> > <execution> > <id>deploy-client-sources-jar</id> > <phase>deploy</phase> > <goals> > <goal>deploy-file</goal> > </goals> > <configuration> > > <file>dist/${project.artifactId}Client-sources.jar</file> > > <url>http://ourhostname:8081/nexus/content/repositories/${deployAs}</url> > <groupId>${project.groupId}</groupId> > > <artifactId>${project.artifactId}Client</artifactId> > <version>${project.version}</version> > <packaging>jar</packaging> > <classifier>sources</classifier> > <uniqueVersion>false</uniqueVersion> > </configuration> > </execution> > <execution> > <id>deploy-client-javadoc-jar</id> > <phase>deploy</phase> > <goals> > <goal>deploy-file</goal> > </goals> > <configuration> > > <file>dist/${project.artifactId}Client-javadoc.jar</file> > > <url>http://ourhostname:8081/nexus/content/repositories/${deployAs}</url> > <groupId>${project.groupId}</groupId> > > <artifactId>${project.artifactId}Client</artifactId> > <version>${project.version}</version> > <packaging>jar</packaging> > <classifier>javadoc</classifier> > <uniqueVersion>false</uniqueVersion> > </configuration> > </execution> > </executions> > </plugin> > -- > View this message in context: > http://maven.40175.n5.nabble.com/Error-400-when-deploying-releases-to-Nexus-tp3201051p3201051.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
