[ https://jira.codehaus.org/browse/MANTTASKS-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294159#comment-294159 ]
Jonathan Kinred commented on MANTTASKS-174: ------------------------------------------- This is a quite annoying problem especially as many people would be using Nexus/Artifactory and would therefore have a <mirror> section in settings.xml. Will you accept a patch for this? > Mirror declaration replaces url from distributionManagement > ----------------------------------------------------------- > > Key: MANTTASKS-174 > URL: https://jira.codehaus.org/browse/MANTTASKS-174 > Project: Maven 2.x Ant Tasks > Issue Type: Bug > Components: deploy task > Affects Versions: 2.1.0 > Environment: Ant 1.7.1, Maven ant tasks 2.1.0 > Reporter: Robert Munteanu > > Given a ~/.m2/settings.xml file containing a mirror element > {code} > <mirrors> > <mirror> > <id>nexus</id> > <mirrorOf>external:*</mirrorOf> > <url>https://xxx.com/nexus/content/groups/public</url> > </mirror> > </mirrors> > {code} > a pom.xml file with a distributionManagement section > {code} > <distributionManagement> > <snapshotRepository> > <id>sonatype-nexus-snapshots</id> > <name>Sonatype Nexus Snapshots</name> > > <url>http://oss.sonatype.org/content/repositories/snapshots</url> > </snapshotRepository> > </distributionManagement> > {code} > and a build.xml file with the following deploy task: > {code} > <target name="deploy" depends="-check"> > <artifact:pom id="gin-pom" file="pom.xml" /> > <artifact:deploy file="${gin.jar.file}"> > <pom refid="gin-pom" /> > <attach file="${gin.javadoc.file}" classifier="javadoc" > /> > </artifact:deploy> > </target> > {code} > When running ant deploy the deployment is done on xxx.com instead of > oss.sonatype.org . Removing the mirror from the settings file solves the > problem. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira