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

Michael Osipov closed MANTTASKS-222.
------------------------------------

    Resolution: Won't Fix

Please refer to 
https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014
 if you're wondering why this issue was closed out.

> remoteRepository ignores password settings in .m2/settings.xml
> --------------------------------------------------------------
>
>                 Key: MANTTASKS-222
>                 URL: https://jira.codehaus.org/browse/MANTTASKS-222
>             Project: Maven Ant Tasks
>          Issue Type: Bug
>          Components: deploy task
>    Affects Versions: 2.1.3
>         Environment: Apache Maven 3.0.3 (r1075438; 2011-02-28 10:31:09-0700)
> Maven home: E:\development\cwh_build_tools\apache-maven-3.0.3
> Java version: 1.6.0_20, vendor: Sun Microsystems Inc.
> Java home: C:\Program Files\Java\jdk1.6.0_20\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
>            Reporter: Matt Walsh
>
> remoteRepository only recognizes '<authentication username="username" 
> password="password"/>'.
> I would expect it to recognize '<authentication username="username"/>' and 
> then read the password (based on the repository id) from my settings.xml.
> Also doesn't recognize '<authentication username="username" 
> privateKey="${home}/.ssh/private_key_file"/>'. Still prompts for password. 
> Although, it will fail if the path specified does not exist.
> If I leave out the authentication altogether, it prompts for my login 
> password, even if it is specified in my .m2/settings.xml file.
> My ant build file looks like this (with the various authentication items I've 
> tried):
> {code:xml}
> <target name="mvn.init">
>         <artifact:remoteRepository id="releases" 
> url="scp://server/NEXUS/sonatype-work/nexus/storage/releases">
>                   <authentication username="nexus" 
> privateKey="${user.home}/.ssh/id_dsa"/>  OR
>                   <authentication username="nexus"/>  OR
>                   <authentication username="nexus" 
> password="encryptedPassword"/>  OR
>                   <authentication username="nexus" password="password"/>  
> THIS IS THE ONLY ONE THAT WORKS
>         </artifact:remoteRepository>
>           <artifact:install-provider groupId="org.apache.maven.wagon"
>                                      artifactId="wagon-ssh"
>                                      version="1.0-beta-7">
>           </artifact:install-provider>
> </target>
> <target name="deploy.artifacts" depends="mvn.init,compile.all">
>           <echo>Deploying artifacts to Nexus:</echo>
>           
>           <echo>- deploying ${artifact}</echo>
>           <artifact:pom id="mypom" groupId="${groupId}" 
> artifactId="${artifactId}" version="${version}" packaging="${type}"/>
>           <artifact:writepom pomRefId="mypom" file="mypom.xml"/>  HAD TO DO 
> THIS BECAUSE IT USES A BOGUS finalName IF I JUST USE A REFID BELOW.
>          
>           <artifact:deploy file="${file}">
>                   <pom file="mypom.xml"/>
>                   <remoteRepository refid="releases"/>
>           </artifact:deploy>
>           
>           <!-- Remove dynamic pom -->
>           <delete file="mypom.xml"/>
> </target>
> {code}
> And my settings.xml looks like this:
> {code:xml}
> <settings>
>     <servers>
>         <server>
>             <id>releases</id>
>             <username>username</username>
>             <password>password</password>
>         </server>
>     </servers>
> </settings>
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to