When I run "mvn deploy" it seems to be ignoring the <server> credentials in the ~/.m2/settings.xml file. I have verified this in the Nexus logs. Nexus receives no credentials, thus tries to upload as user 'anonymous' and fails, returning 401.
However, when I simply run maven and specify the default settings.xml file directly, it works fine: "mvn -s /home/me/.m2/settings.xml" This is new behavior, as I was deploying successfully in the past without having to specify the settings.xml file directly. Any ideas why maven is apparently not defaulting as it should? Note, this is Maven 2.2.1. Thanks. -----Original Message----- From: Andreas Ebbert-Karroum [mailto:andreas.ebbert-karr...@codecentric.de] Sent: Wednesday, March 02, 2011 8:47 AM To: Martin Gainty; users@maven.apache.org Subject: Re: How to release a single module in a Mercurial repository? Hi Martin, 2011/3/2 Martin Gainty <mgai...@hotmail.com> > when passing command parameters identify the key=value to > command-line-parameter in this fashion -Dkey=value for example > <property name="maven.repo.local" value="/fu/bar"/> becomes > > -Dmaven.repo.local=/fu/bar > > can you display release.properties to maven-users list? > That's what I tried. Something like mvn --batch-mode -Darguments="-f multi/pom.xml" or mvn --batch-mode -Darguments="-DpomPathName=multi/pom.xml" The closest thing to really get it working was this solution: 1) mvn --batch-mode -Dgoals=install org.apache.maven.plugins:maven-release-plugin:2.1:prepare 2) mvn --batch-mode -Dgoals=install org.apache.maven.plugins:maven-release-plugin:2.1:perform The only problem with it is, that * in case that module has further submodules, I cannot specify the dev/release version * the whole repository is built on the release-tag, which might lead to problems. Andreas C:\Temp\releasetest\multi>mvn --batch-mode -Dgoals=install org.apache.maven.plugins:maven-release-plugin:2.1:prepare [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building multi 1.15-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-release-plugin:2.1:prepare (default-cli) @ multi --- [INFO] Verifying that there are no local modifications... [INFO] ignoring changes on: pom.xml.next, release.properties, pom.xml.releaseBackup, pom.xml.backup, pom.xml.branch, pom.xml.tag [INFO] EXECUTING: cmd.exe /X /C "hg status" [INFO] Not a file: C:\Temp\releasetest\multi\multi\release.properties. Ignoring [INFO] Checking dependencies and plugins for snapshots ... [INFO] Transforming 'multi'... [INFO] Not generating release POMs [INFO] Executing goals 'clean verify'... [INFO] [INFO] Scanning for projects... [INFO] [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Building multi 1.15 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ multi --- [INFO] [INFO] Deleting C:\Temp\releasetest\multi\target [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Total time: 0.593s [INFO] [INFO] Finished at: Wed Mar 02 15:44:25 CET 2011 [INFO] [INFO] Final Memory: 2M/5M [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Checking in modified POMs... [INFO] EXECUTING: cmd.exe /X /C "hg commit --message "[maven-release-plugin] prepare release multi-1.15" C:\Temp\releasetest\multi\pom.xml" [INFO] EXECUTING: cmd.exe /X /C "hg push file:///C:/Temp/releasetestrepo" [INFO] Tagging release with the label multi-1.15... [INFO] EXECUTING: cmd.exe /X /C "hg tag --message "[maven-release-plugin] copy for tag multi-1.15" multi-1.15" [INFO] EXECUTING: cmd.exe /X /C "hg push file:///C:/Temp/releasetestrepo" [INFO] EXECUTING: cmd.exe /X /C "hg locate" [INFO] Transforming 'multi'... [INFO] Not removing release POMs [INFO] Checking in modified POMs... [INFO] EXECUTING: cmd.exe /X /C "hg commit --message "[maven-release-plugin] prepare for next development iteration" C:\Temp\releasetest\multi\pom.xml" [INFO] EXECUTING: cmd.exe /X /C "hg push file:///C:/Temp/releasetestrepo" [INFO] Release preparation complete. [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.092s [INFO] Finished at: Wed Mar 02 15:44:27 CET 2011 [INFO] Final Memory: 3M/6M [INFO] ------------------------------------------------------------------------ C:\Temp\releasetest\multi>type release.properties #release configuration #Wed Mar 02 15:44:27 CET 2011 scm.tag=multi-1.15 project.scm.de.aek.test\:multi.developerConnection=scm\:hg\:file\:///C\:/Temp/releasetestrepo project.scm.de.aek.test\:multi.tag=HEAD project.dev.de.aek.test\:multi=1.16-SNAPSHOT scm.url=scm\:hg\:file\:///C\:/Temp/releasetestrepo pushChanges=true preparationGoals=clean verify project.scm.de.aek.test\:multi.connection=scm\:hg\:file\:///C\:/Temp/releasetestrepo remoteTagging=true scm.commentPrefix=[maven-release-plugin] project.rel.de.aek.test\:multi=1.15 exec.additionalArguments=-P default completedPhase=end-release C:\Temp\releasetest\multi>mvn --batch-mode -Dgoals=install org.apache.maven.plugins:maven-release-plugin:2.1:perform [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building multi 1.16-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-release-plugin:2.1:perform (default-cli) @ multi --- [INFO] Checking out the project to perform the release ... [INFO] Removing C:\Temp\releasetest\multi\target\checkout [INFO] EXECUTING: cmd.exe /X /C "hg clone -r multi-1.15 file:///C:/Temp/releasetestrepo C:\Temp\releasetest\multi\target\checkout" [INFO] EXECUTING: cmd.exe /X /C "hg locate" [INFO] Executing goals 'install'... [INFO] [INFO] Scanning for projects... [INFO] [WARNING] [INFO] [WARNING] Some problems were encountered while building the effective model for de.aek.test:multi:pom:1.15 [INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. [INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing. [INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. [INFO] [WARNING] [INFO] [WARNING] Some problems were encountered while building the effective model for de.aek.test:root:pom:1.5-SNAPSHOT [INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. [INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing. [INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. [INFO] [WARNING] [INFO] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [INFO] [WARNING] [INFO] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [INFO] [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Reactor Build Order: [INFO] [INFO] [INFO] [INFO] multi [INFO] [INFO] root [INFO] [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Building multi 1.15 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] [INFO] [INFO] >>> maven-source-plugin:2.1.2:jar (attach-sources) @ multi >>> [INFO] [INFO] [INFO] [INFO] <<< maven-source-plugin:2.1.2:jar (attach-sources) @ multi <<< [INFO] [INFO] [INFO] [INFO] --- maven-source-plugin:2.1.2:jar (attach-sources) @ multi --- [INFO] [INFO] [INFO] [INFO] --- maven-javadoc-plugin:2.7:jar (attach-javadocs) @ multi --- [INFO] [INFO] Not executing Javadoc as the project is not a Java classpath-capable package [INFO] [INFO] [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ multi --- [INFO] [INFO] Installing C:\Temp\releasetest\multi\target\checkout\multi\pom.xml to C:\Dokumente und Einstellungen\aek\.m2\repository\de\aek\test\multi\1.15\mul ti-1.15.pom [INFO] [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Building root 1.5-SNAPSHOT [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] [INFO] [INFO] >>> maven-source-plugin:2.1.2:jar (attach-sources) @ root >>> [INFO] [INFO] [INFO] [INFO] <<< maven-source-plugin:2.1.2:jar (attach-sources) @ root <<< [INFO] [INFO] [INFO] [INFO] --- maven-source-plugin:2.1.2:jar (attach-sources) @ root --- [INFO] [INFO] [INFO] [INFO] --- maven-javadoc-plugin:2.7:jar (attach-javadocs) @ root --- [INFO] [INFO] Not executing Javadoc as the project is not a Java classpath-capable package [INFO] [INFO] [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ root --- [INFO] [INFO] Installing C:\Temp\releasetest\multi\target\checkout\pom.xml to C:\Dokumente und Einstellungen\aek\.m2\repository\de\aek\test\root\1.5-SNAPSHOT\ro ot-1.5-SNAPSHOT.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Reactor Summary: [INFO] [INFO] [INFO] [INFO] multi ............................................. SUCCESS [1.375s] [INFO] [INFO] root .............................................. SUCCESS [0.015s] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Total time: 1.781s [INFO] [INFO] Finished at: Wed Mar 02 15:44:58 CET 2011 [INFO] [INFO] Final Memory: 5M/11M [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Cleaning up after release... [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.047s [INFO] Finished at: Wed Mar 02 15:44:58 CET 2011 [INFO] Final Memory: 3M/6M [INFO] ------------------------------------------------------------------------ -- Mit freundlichen Grüßen / Best regards Andreas Ebbert-Karroum | Bereichsleiter der Agilen Software Factory codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland tel: +49 (0) 212.23362825 | fax: +49 (0) 212.23362879 | mobil: +49 (0) 175.2664109 www.codecentric.de | blog.codecentric.de | www.meettheexperts.de | www.more4fi.de Sitz der Gesellschaft: Düsseldorf | HRB 63043 Vorstand: Klaus Jäger (Vorsitzender) | Mirko Novakovic . Rainer Vehns Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Bernd Klinkmann . Jürgen Schütz Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und löschen Sie diese E-Mail und evtl. beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.