[
https://jira.codehaus.org/browse/MANTTASKS-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov closed MANTTASKS-198.
------------------------------------
Resolution: Won't Fix
Please refer to
https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014
if you're wondering why this issue was closed out.
> Can't override central repository in settings.xml since 2.1.1 release
> ---------------------------------------------------------------------
>
> Key: MANTTASKS-198
> URL: https://jira.codehaus.org/browse/MANTTASKS-198
> Project: Maven Ant Tasks
> Issue Type: Bug
> Affects Versions: 2.1.1
> Reporter: Peter Phillips
> Attachments: AbstractArtifactWithRepositoryTaskTest.java,
> MANTTASKS-198-full.patch
>
>
> Since MANTTASKS-195 it is no longer possible to override the central
> repository (http://repo1.maven.org/maven2).
> The AbstractArtifactWithRepositoryTask#createRemoteArtifactRepositories
> method now checks to see if a repository with the same id has already been
> added and therefore doesn't override it.
> The problem with that is if remote repositories is not defined then the first
> item in the list contains the default remote repository. The code then loops
> over the pom repositories (in my case coming from ~/.m2/settings.xml), finds
> a duplicate 'central' and ignores it.
> One fix would be to move the addition of the default remote repository below
> the loop over the pom repositories so that the code prefers the locally
> defined central instead.
> Attached is a test case exposing the defect.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)