You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Manuel Jimenez <mj...@motionpoint.com> on 2012/03/21 15:07:56 UTC

artifact:deploy issue - Artifactory returning 405

Good morning:

 

I am trying to use the Maven ant tasks (version 2.1.3) to deploy to
Artifactory and I am getting a 405 from Artifactory.  

 

I think this is due to <artifact:deploy> insisting on deploying to the
incorrect repository (repo) instead of the one specified in the
<distributionManagement> section of the pom.  

 

I've included the error emitted, the Ant script, pom and settings.xml below.
Please note that other pure Maven project 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></releas
es>

 
<snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snaps
hots>

        </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>