Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.1.3
-
Fix Version/s: None
-
Component/s: deploy task
-
Labels:None
-
Environment:HideApache 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"ShowApache 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"
-
Number of attachments :
Description
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="$
/.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):
<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>
And my settings.xml looks like this:
<settings> <servers> <server> <id>releases</id> <username>username</username> <password>password</password> </server> </servers> </settings>