You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Eric Quilantang (JIRA)" <ji...@codehaus.org> on 2011/07/18 21:16:42 UTC

[jira] Commented: (MANTTASKS-174) Mirror declaration replaces url from distributionManagement

    [ https://jira.codehaus.org/browse/MANTTASKS-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=273507#comment-273507 ] 

Eric Quilantang commented on MANTTASKS-174:
-------------------------------------------

same behavior occurs when <remoterepository> is defined inside <artifact:deploy>.  The <mirror> inside settings.xml replaces the url completely.


> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira