You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2016/10/26 19:25:58 UTC

[jira] [Closed] (MANTTASKS-253) Deploy doesn't authenticate to remote repository

     [ https://issues.apache.org/jira/browse/MANTTASKS-253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov closed MANTTASKS-253.
------------------------------------
    Resolution: Won't Fix

This project has been retired several months ago. Consider: https://wiki.eclipse.org/Aether/Ant_Tasks

> Deploy doesn't authenticate to remote repository
> ------------------------------------------------
>
>                 Key: MANTTASKS-253
>                 URL: https://issues.apache.org/jira/browse/MANTTASKS-253
>             Project: Maven Ant Tasks (RETIRED)
>          Issue Type: Bug
>          Components: deploy task
>    Affects Versions: 2.1.3
>            Reporter: Iulian Dragos
>
> I can't get my deploy task to authenticate to remote repository. The same works just fine when using `mvn deploy:depoy-file -D...`. On the server log I see that ant tries to make a PUT request without being authenticated, while maven is using the right user.
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="sabbus" default="deploy" xmlns:artifact="urn:maven-artifact-ant">
>   <description>Test ant depoy.</description>
>   <target name="init">
>     <path id="maven-ant-tasks.classpath" path="lib/ant/maven-ant-tasks-2.1.3.jar" />
>     <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath" />
>     <property name="settings.file" value="${user.home}/.m2/settings.xml" />
>     <property name="remote.repository" value="http://artifactory.server.com:8081/artifactory/libs-release" />
>     <property name="repository.credentials.id" value="my-releases" />
>     <property name="path" value="${basedir}/dists/maven/2.11.7/scala-compiler/scala-compiler" />
>   </target>
>   <target name="deploy" depends="init">
>     <!--<echoproperties/>-->
>     <artifact:deploy file="${path}.jar" settingsFile="${settings.file}">
>       <remoteRepository id="${repository.credentials.id}" url="${remote.repository}" />
>       <artifact:pom file="${path}-pom-filtered.xml" />
>       <artifact:attach type="jar" file="${path}-src.jar" classifier="sources" />
>       <artifact:attach type="jar" file="${path}-docs.jar" classifier="javadoc" />
>     </artifact:deploy>
>   </target>
> </project>
> {code}
> My ~/.m2/settings.xml file has the proper id, and maven picks it up correctly and deploys successfully.
> {code}
>   <servers>
>     <server>
>       <id>my-releases</id>
>       <username>deployer</username>
>       <password>...</password>
>     </server>
>     <server>
>       <id>my-snapshots</id>
>       <username>deployer</username>
>       <password>..</password>
>     </server>
>   </servers>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)