jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven 2.x Ant Tasks
  • Maven 2.x Ant Tasks
  • MANTTASKS-226

artifact:deploy issue

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.1.3
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows xp
  • Number of attachments :
    0

Description

<artifact:deploy> insists on deploying to the incorrect repository (my corporate repository defined in my settings.xml as a mirror named repo) instead of the one specified in the <distributionManagement> section of the pom.

A work around involves using two settings.xml files. One in the $

{user.home}/.ant directory that excludes the mirror and another in the ${user.home}

/.m2 that includes it.

I've included the error emitted, the Ant script, pom and settings.xml below. Please note that other pure (not using ant tasks) Maven projects deployments are not having an issue deploying using the same <distributionManagement> section and settings.xml.

Regards

                                                                            • Error emitted
                                                                              [artifact:install] [INFO] Installing C:\MJ\SVNWS\art\tserver\build\mpel.wa
                                                                              r to C:\Documents and Settings\mjimenez\.m2\repository\com\motionpoint\transmoti
                                                                              on\mpel\1.0\mpel-1.0.war
                                                                              [artifact:deploy] Deploying to http://art:8081/artifactory/repo
                                                                              [artifact:deploy] Uploading: com/motionpoint/transmotion/mpel/1.0/mpel-1.0.war t
                                                                              o repository repo at http://art:8081/artifactory/repo
                                                                              [artifact:deploy] Transferring 2960K from repo
                                                                              [artifact:deploy] An error has occurred while processing the Maven artifact task
                                                                              s.
                                                                              [artifact:deploy] Diagnosis:
                                                                              [artifact:deploy]
                                                                              [artifact:deploy] Error deploying artifact 'com.motionpoint.transmotion:mpel:war
                                                                              ': Error deploying artifact: Failed to transfer file: http://art:8081/arti
                                                                              factory/repo/com/motionpoint/transmotion/mpel/1.0/mpel-1.0.war. Return code is:
                                                                              405
                                                                              [artifact:deploy]

BUILD FAILED
C:\MJ\SVNWS\art\tserver\buildAdditionalArtifacts.xml:285: Error deploying
artifact 'com.motionpoint.transmotion:mpel:war': Error deploying artifact: Faile
d to transfer file: http://art:8081/artifactory/repo/com/motionpoint/trans
motion/mpel/1.0/mpel-1.0.war. Return code is: 405

                                                                            • Ant script
                                                                              <artifact:pom id="mpel" file="mpel-pom.xml"/>
                                                                              <artifact:install file="$ {build}/${mpelwar}" pomRefId="mpel"/>
                                                                              <artifact:deploy file="${build}

                                                                              /$

                                                                              {mpelwar}

                                                                              " pomRefId="mpel" settingsFile="$

                                                                              {user.home}

                                                                              /.m2/settings.xml"/>

                                                                            • pom
                                                                              <?xml version="1.0" encoding="UTF-8"?>
                                                                              <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
                                                                              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<modelVersion>4.0.0</modelVersion>

<groupId>com.motionpoint.transmotion</groupId>
<artifactId>mpel</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>Easylink</name>

<distributionManagement>
<repository>
<id>central</id>
<name>libs-release</name>
<url>http://art:8081/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://art:8081/artifactory/libs-snapshot-local</url>
</snapshotRepository>
</distributionManagement>
</project>

                                                                            • settings.xml
                                                                              <?xml version="1.0" encoding="UTF-8"?>
                                                                              <settings
                                                                              xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"
                                                                              xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                                                                              <servers>
                                                                              <server>
                                                                              <username>username</username>
                                                                              <password>password</password>
                                                                              <id>central</id>
                                                                              </server>
                                                                              <server>
                                                                              <username>username</username>
                                                                              <password>password</password>
                                                                              <id>snapshots</id>
                                                                              </server>
                                                                              </servers>

<mirrors>
<mirror>
<mirrorOf>*</mirrorOf>
<name>repo</name>
<url>http://art:8081/artifactory/repo</url>
<id>repo</id>
</mirror>
</mirrors>

<profiles>
<profile>
<properties>
<svn-url>http://art/svn/dev</svn-url>
<artifactory-url>http://art:8081/artifactory</artifactory-url>
<artifactory-user-name>username</artifactory-user-name>
<artifactory-password>Password</artifactory-password>
</properties>
<repositories>
<repository>
<id>repo</id>
<name>repo</name>
<url>http://art:8081/artifactory/repo</url>
<releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>
<snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>http://art:8081/artifactory/libs-release</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://art:8081/artifactory/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>http://art:8081/artifactory/plugins-release</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>plugins-snapshot</name>
<url>http://art:8081/artifactory/plugins-snapshot</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
No changes have yet been made on this issue.

People

  • Assignee:
    Unassigned
    Reporter:
    Manuel Jimenez
Vote (0)
Watch (0)

Dates

  • Created:
    30/Apr/12 12:38 PM
    Updated:
    30/Apr/12 12:49 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.