Uploaded image for project: 'Maven Ant Tasks (RETIRED)'
  1. Maven Ant Tasks (RETIRED)
  2. MANTTASKS-174

Mirror declaration replaces url from distributionManagement

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: None
    • Component/s: deploy task
    • Labels:
      None
    • Environment:
      Ant 1.7.1, Maven ant tasks 2.1.0

      Description

      Given a ~/.m2/settings.xml file containing a mirror element

      <mirrors>
          <mirror>
            <id>nexus</id>
            <mirrorOf>external:*</mirrorOf>
            <url>https://xxx.com/nexus/content/groups/public</url>
          </mirror>
        </mirrors>
      

      a pom.xml file with a distributionManagement section

      	<distributionManagement>
      		<snapshotRepository>
      			<id>sonatype-nexus-snapshots</id>
      			<name>Sonatype Nexus Snapshots</name>
      			<url>http://oss.sonatype.org/content/repositories/snapshots</url>
      		</snapshotRepository>
      	</distributionManagement>
      

      and a build.xml file with the following deploy task:

      	<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>
      

      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.

        Attachments

          Activity

            People

            • Assignee:
              carlos Carlos Sanchez
              Reporter:
              rombert Robert Munteanu
            • Votes:
              6 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: