maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: Error 400 when deploying releases to Nexus
Date Wed, 06 Oct 2010 09:32:09 GMT
This is expected as a release repo is set to not allow redeploys by default.
What happens is that first the primary artifact (the jar) and the pom gets
uploaded. The you try to uploaded sources jar and the pom again, which isn't
allowed.
A snapshot repo doesn't have this restriction normally and therefore works.

You might be able to solve this by setting generatePom to false:
http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html#generatePom
I haven't tried this personally, but the text indicates this should work.
However, the name of the param kind of indicates something else...

/Anders

On Wed, Oct 6, 2010 at 11:23, NickDeGraeve <nick.degraeve@telenet.be> 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<http://ourhostname:8081/nexus/content/repositories/releases/com/jnj/gtsc/agent/business/agent/2.3.0-RC1/agent-2.3.0-RC1.ear%0A18180K>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<http://ourhostname:8081/nexus/content/repositories/releases/com/jnj/gtsc/agent/business/agentClient/2.3.0-RC1/agentClient-2.3.0-RC1.jar%0A718K>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<http://ourhostname:8081/nexus/content/repositories/releases/com/jnj/gtsc/agent/business/agentClient/2.3.0-RC1/agentClient-2.3.0-RC1-sources.jar%0A696K>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}<http://ourhostname:8081/nexus/content/repositories/$%7BdeployAs%7D>
> </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}<http://ourhostname:8081/nexus/content/repositories/$%7BdeployAs%7D>
> </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}<http://ourhostname:8081/nexus/content/repositories/$%7BdeployAs%7D>
> </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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message