Hi Wendy, Thanks a lot for the reponse!
Regards Fred Zhang -----邮件原件----- 发件人: Wendy Smoak [mailto:[EMAIL PROTECTED] 发送时间: 2007年12月10日 10:11 收件人: Maven Users List 主题: Re: How does maven find the "real" central repository even when I overrided the "central" repository in my profile On Dec 9, 2007 6:36 PM, Fred Zhang <[EMAIL PROTECTED]> wrote: > Hi there, > > I set up a mirror of repo1.maven.org/maven2 for my group and added the > following profile to the settings.xml file. The key point here is that I > overrided the "central" repository with my mirror, so that the "maven"s using > this profile will go to myrepo instead of repo1.maven.org/maven2 to find > artifacts. > > It worked as expected: all the artifacts were downloaded from my mirror. And > I checked mvn help:effective-pom. The effective-pom was also as expected. > > But when I tried "archetype:create" goal, maven tried to connect the "real" > central (repo1.maven.org) and downloaded artifacts although some of those > artifacts were available in the mirror. > > Can anyone tell me how maven can find the "real" central repository even when > the original central in the SuperPOM is overrided in my profile? Unless there is a "project" (== a pom.xml in the current directory or specified with -f) Maven does not "see" your settings.xml file. You can use -DremoteRepositories=... to tell the Archetype plugin where to look. Also see the discussion here: http://jira.codehaus.org/browse/ARCHETYPE-59 -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
