Hi,

I have some troubles using the ant maven tasks.

I try to deploy an artifact to a nexus repository from an ant task.
(I have a proxy with authentication)

in my build file I use :
<target name="myDeploy" depends="ProxyInit">
<m2-deploy repositoryId="myRepository" repositoryUrl="${myNexusUrl}"/>
</target>
<target name="ProxyInit">
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
proxyuser="${proxy.user}" proxypassword="${proxy.password}"/>
</target>

<macrodef name="m2-deploy" description="Publish project to a nexus repository">


<attribute name="repositoryId" default="myRepository"/>
<attribute name="repositoryUrl" default="${myNexusRepository}"/>

<sequential>
<property name="revision" value="${version}"/>
<property name="module" value="${project-name}"/>

<artifact:pom id="mypom" file="${dist}/${module}-${revision}.pom" />

<artifact:install-provider artifactId="wagon-http" version="1.0-beta-2">
</artifact:install-provider>

<artifact:deploy file="${dist}/TestPublish-1.0-b.jar">
<remoteRepository id="@{repositoryId}"
                                                url="@{repositoryUrl}">
<authentication username="${myRepositoryLogin}" password="${myRepositoryPassword}" />
</remoteRepository>
<pom refid="mypom"/>
</artifact:deploy>

</sequential>
</macrodef>



when I launch the myDeploy target, I have :


[artifact:install-provider] Installing provider: org.apache.maven.wagon:wagon-http:jar:1.0-beta-2:runtime [artifact:install-provider] Downloading: org/apache/maven/wagon/wagon-http/1.0-beta-2/wagon-http-1.0-beta-2.pom from repository central at http://repo1.maven.org/maven2 [artifact:install-provider] Error transferring file: Connection refused: connect [artifact:install-provider] [WARNING] Unable to get resource 'org.apache.maven.wagon:wagon-http:pom:1.0-beta-2' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection refused: connect [artifact:install-provider] Downloading: org/apache/maven/wagon/wagon-http/1.0-beta-2/wagon-http-1.0-beta-2.jar from repository central at http://repo1.maven.org/maven2 [artifact:install-provider] Error transferring file: Connection refused: connect [artifact:install-provider] [WARNING] Unable to get resource 'org.apache.maven.wagon:wagon-http:jar:1.0-beta-2' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection refused: connect [artifact:install-provider] An error has occurred while processing the Maven artifact tasks.
[artifact:install-provider]  Diagnosis:
[artifact:install-provider]
[artifact:install-provider] Error downloading wagon provider from the remote repository: Missing:
[artifact:install-provider] ----------
[artifact:install-provider] 1) org.apache.maven.wagon:wagon-http:jar:1.0-beta-2
[artifact:install-provider]
[artifact:install-provider] Try downloading the file manually from the project website.
[artifact:install-provider]
[artifact:install-provider]   Then, install it using the command:
[artifact:install-provider] mvn install:install-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-http -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file
[artifact:install-provider]
[artifact:install-provider] Alternatively, if you host your own repository you can deploy the file there: [artifact:install-provider] mvn deploy:deploy-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-http -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[artifact:install-provider]
[artifact:install-provider]   Path to dependency:
[artifact:install-provider]       1) unspecified:unspecified:jar:0.0
[artifact:install-provider] 2) org.apache.maven.wagon:wagon-http:jar:1.0-beta-2
[artifact:install-provider]
[artifact:install-provider] ----------
[artifact:install-provider] 1 required artifact is missing.
[artifact:install-provider]
[artifact:install-provider] for artifact:
[artifact:install-provider]   unspecified:unspecified:jar:0.0
[artifact:install-provider]
[artifact:install-provider] from the specified remote repositories:
[artifact:install-provider]   central (http://repo1.maven.org/maven2)
[artifact:install-provider]
[artifact:install-provider]
[artifact:install-provider]

BUILD FAILED
D:\PUBLIC\dev\workspace\TestPublish\build.xml:36: The following error occurred while executing this line: D:\PUBLIC\dev\workspace\TestPublish\build.xml:59: Error downloading wagon provider from the remote repository: Missing:
----------
1) org.apache.maven.wagon:wagon-http:jar:1.0-beta-2

  Try downloading the file manually from the project website.

  Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-http -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-http -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
      1) unspecified:unspecified:jar:0.0
      2) org.apache.maven.wagon:wagon-http:jar:1.0-beta-2

----------
1 required artifact is missing.

for artifact:
  unspecified:unspecified:jar:0.0

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)



I don't know what to do, is it a proxy problem ?

thank you,
jc.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to