Mirror declaration replaces url from distributionManagement
-----------------------------------------------------------

                 Key: MANTTASKS-174
                 URL: http://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 contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to