On Fri, Sep 12, 2008 at 8:46 AM, Martin Höller <[EMAIL PROTECTED]> wrote:

> On Friday 12 September 2008 Stephen Connolly wrote:
> > Chirstian,
> >
> > the problem is that the pom for the dependency that he wants to use
> > declares repositories to use for resolving its transitive dependencies.
> >
> > He does not want to have that repository dragged in to his build.
>
> Exactly.
>
> > Other than re-releasing the jar with a different version (e.g. releasing
> > log4j:log4j:1.2.14-mycompany-1 it'd be the same jar as 1.2.14, but using
> > a hand rolled pom) there is no real solution to this.
>
> :(
>
> > I know that plans for Maven 2.2 or 3.0 or some such is/was to deprecate
> > the declaration of repositories within the pom because of this very
> > problem.
> >
> > Of course banning repository declarations within poms is a swings and
> > roundabouts solution:
> > + fix this type of problem
> > - cause problems if you need something that you cannot get pushed into
> > repo1
>
> Well, one could always declare additional repos in settings.xml. I'd say
> this is a far better place than pom.xml.
>
> Thank's Stephen for clarifying this.
>
> - martin
>

Yeah but the problem with having to declare the additional repos in your
settings.xml is now the project builds for me but not for you (until you get
my settings.xml)

And additionally, each repository that you add slows down the build as Maven
has to check _all_ repositories that it knows about for the artifacts... and
then if one of those is feeling slow your (normally fast) build becomes
increasingly slow.

Hmmmmm

One change that _might_ work would be to force all repositories added via a
pom.xml to have the update policy of "never". Thus that way you'd get the
artifact the first time and it would never be checked again (ok, so it would
be more seldom than never!)

Reply via email to