On 30 October 2012 10:14, Zak Mc Kracken <zakmc...@yahoo.it> wrote: > On 25/10/2012 02:47, Barrie Treloar wrote: > >> Maven will needless contact all five of your repositories looking for >> artifacts that probably aren't even there. >> This will require a tcp/ip connection for each one and when you have >> large dependencies this can significantly slow down your build. >> Which is why we all recommend putting a Maven Repository Manager (MRM) >> in between you and the rest of the w >> orld. >> > I've always had a doubt about this and it's about giving the world the > option to do just 'mvn install/deploy' to build a project, after having > downloaded the sources. > If my project depends on some non-common repository, such as the company > repository, putting it in the POM makes external users/developers's life as > easy as that, if such repo is in some local settings only, you need at > least to document the extra-step about the need to add it in anyone else's > local configuration. >
If your artifacts are available to others, just push them to central. That makes *everyone's* life easier. One repo fast resolving. If your artifacts are not redistributible, then they need the details for your repository anyway, and they should be using a MRM. > > Does anyone know a compromise between these two extremes? Can repositories > declared in the POM be disabled by, eg, a profile in settings? > Yes they can, but it won't work how you think it will work, as the repository that an artifact was resolved from is part of the details stored by newer versions of Maven, so that once the profile is turned off, the artifacts will not be found. > > Thanks in advance, > > The mistake was in letting there be a repository definition in the pom in the first place. One of the things we would like to add in the future to maven is better routing rules. What I would like to see is something that was kind of auto-discoverable, so that, for example, DNS entries could give Maven hints as to where to find repository managers and what scope of groupIds those repository managers resolve, thereby decentralizing central... but that is just a personal opinion, and I would like something that helps for when off-line too! > Marco. > > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@maven.**apache.org<users-unsubscr...@maven.apache.org> > For additional commands, e-mail: users-h...@maven.apache.org > >