[
https://issues.apache.org/jira/browse/MNG-5846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14599688#comment-14599688
]
Joerg Schaible commented on MNG-5846:
-------------------------------------
It's not! If your settings.xml defines a mirror for central, it works. Your
example simply demontrates why it is a bad idea to define repositories in a
POM. Just look at the effective pom for metro-project and you will see, that
your repository definitions are nowhere.
{noformat}
mvn -f
~/.m2/repository/org/glassfish/metro/metro-project/2.2.0-1/metro-project-2.2.0-1.pom
help:effective-pom
{noformat}
> Maven 3.3.3 ignores repository definition for "central"
> -------------------------------------------------------
>
> Key: MNG-5846
> URL: https://issues.apache.org/jira/browse/MNG-5846
> Project: Maven
> Issue Type: Bug
> Components: Artifacts and Repositories
> Affects Versions: 3.3.1
> Environment: n/a
> Reporter: Torsten Liermann
>
> Hi,
> The sample pom.xml works fine with maven 3.0.5 but shows a big problem while
> using maven 3.3.3.
> It's starts correctly and downloads a set of dependencies from the specified
> and overriden central repositories. The, suddenly, during a running build it
> starts downloading dependencies from the default "central" repository (which
> is actually overridden). This behaviour is problematic for us.
> In these log-statements you can see that initial downloads are done from the
> overridden definition and that later the default central repository is used.
> {quote}
> <?xml version="1.0" encoding="UTF-8"?>
> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd"
> xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <modelVersion>4.0.0</modelVersion>
> <groupId>xxx</groupId>
> <artifactId>yyy</artifactId>
> <version>5.0-SNAPSHOT</version>
> <dependencies>
> <dependency>
> <groupId>org.glassfish.main.appclient.client</groupId>
> <artifactId>gf-client</artifactId>
> <version>3.1.2.2</version>
> </dependency>
> </dependencies>
> <repositories>
> <repository>
> <id>central</id>
> <url>http://www.liermann.ws/maven/</url>
> <releases>
> <enabled>true</enabled>
> </releases>
> <snapshots>
> <enabled>true</enabled>
> <updatePolicy>always</updatePolicy>
> </snapshots>
> </repository>
> </repositories>
> <pluginRepositories>
> <pluginRepository>
> <id>central</id>
> <url>http://www.liermann.ws/maven/</url>
> <releases>
> <enabled>true</enabled>
> </releases>
> <snapshots>
> <enabled>true</enabled>
> <updatePolicy>always</updatePolicy>
> </snapshots>
> </pluginRepository>
> </pluginRepositories>
> </project>
> {quote}
> Log file snippet
> {quote}
> Downloading:
> http://www.liermann.ws/maven/org/glassfish/metro/metro-project/2.2.0-1/metro-project-2.2.0-1.pom
> Downloaded:
> http://www.liermann.ws/maven/org/glassfish/metro/metro-project/2.2.0-1/metro-project-2.2.0-1.pom
> (31 KB at 532.0 KB/sec)
> Downloading:
> http://repo1.maven.org/maven2/com/sun/xml/ws/jaxws-ri/2.2.6-2/jaxws-ri-2.2.6-2.pom
> Downloaded:
> http://repo1.maven.org/maven2/com/sun/xml/ws/jaxws-ri/2.2.6-2/jaxws-ri-2.2.6-2.pom
> (6 KB at 101.3 KB/sec)
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)