[ http://jira.codehaus.org/browse/MNG-479?page=comments#action_44260 ]
John Casey commented on MNG-479: -------------------------------- I've been rethinking this one a little bit, and I'm not sure we should allow redefinition of repositories. The problem is the intention of doing this: what you're really trying to achieve is isolation from the public repositories, right? Otherwise, why redefine the 'central' repository? So, if you're doing that, you really want your overridden repository to be used by everything in your transitive dependency graph. However, since POMs must have the ability to state their own build environment - including the repositories used to track down their dependencies - they must resolve using a repository list independent of the project being built...which means that the overridden 'central' repository is reverted to the one specified in the super-pom for transitive deps. This is what Kenney is describing above. I believe what a user would be actually trying to achieve is mirroring of the central repository in this case. Currently, this is possible using the settings.xml, which can also be configured at the global installation level. Not ideal if each developer workstation has a separate install of maven, but maybe ok as a first step... I think we should actively warn if a user tries to override pre-existing repositories, and drop the override. We can tell them to use the mirror functionality instead. > unable to override the default central repository > ------------------------------------------------- > > Key: MNG-479 > URL: http://jira.codehaus.org/browse/MNG-479 > Project: Maven 2 > Type: Bug > Components: maven-core > Versions: 2.0-alpha-2 > Environment: WinXP > Reporter: Edwin Punzalan > Assignee: John Casey > Priority: Blocker > Fix For: 2.0-beta-1 > Attachments: DefaultModelInheritanceAssembler-with-updated-JUnitTest.diff, > DefaultModelInheritanceAssembler.diff, it0042.tgz > > > Adding to my pom.xml: > .... > <repositories> > <repository> > <id>central</id> > <name>custom repository</name> > <url>http://maven.company.com/maven2</url> > </repository> > </repositories> > .... > did not override the central repository but instead uses the above configured > repository as backup/mirror. -- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
