maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: Adding support for new dependency mediation strategy
Date Mon, 26 Aug 2013 08:17:59 GMT
On 26 August 2013 09:06, Arnaud Héritier <aheritier@gmail.com> wrote:

> I think it doesn't work if you have several level of inheritance in
> different projects and you don't republish all intermediate artifacts
> Let's imagine you have projectA <-- inherit <-- projectB <-- inherit <--
> projectC
> If all of them are in SNAPSHOT for now if you change projectA and republish
> it, you'll access to your changes in projectC
> With the resolution you'll have to wait to have projectB republished to use
> the change in projectC.
>
> No?
>

Ok, yes you could have that issue... but who is to say that it isn't a good
thing? (or to put it another way, if you have that problem you are being
stupid)

We will only have <dependencies> in the legacy poms only.

If you are building projectC with Maven 4.0 it will be pulling down the
foo-1.0-build.pom files traversing the tree to generate it's dependency
tree, so Maven 4.0 will be pulling down the parents.

In short, if you are building with Maven < 4.0 you should not be using a
GAV that was built by Maven >= 4.0 as your parent... the legacy poms are
there so that you can use those GAVs as dependencies, not as parents

When building projectC with mvn4 it will pull down its parents and deploy a
legacy pom, so you would need to do a new `mvn4 install` to pick up the new
parents in the legacy code build that you are running with `mvn3
install`... but:

* Why can you not build that project with mvn4? (which would fix your issue
by not looking at the legacy poms)

-Stephen


>
> Arnaud
>
>
> On Mon, Aug 26, 2013 at 9:55 AM, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
>
> > On 26 August 2013 08:27, Jörg Schaible <Joerg.Schaible@scalaris.com>
> > wrote:
> >
> > > Hi Stephen,
> > >
> > > Stephen Connolly wrote:
> > >
> > > [snip]
> > >
> > > > It's better than that... I am not sure if I said it earlier or not,
> so
> > I
> > > > will try to say it now.
> > > >
> > > > When we get the next format, there are probably actually three files
> we
> > > > want to deploy:
> > > >
> > > > foo-1.0.pom (the legacy 4.0.0 model)
> > > > foo-1.0-build.pom (the new 5.0.0+ model)
> > > > foo-1.0-deps.pom (the new 5.0.0+ model)
> > > >
> > > > Now foo-1.0.pom should be a resolved pom with only the bare minimum
> > > > required elements, e.g. dependencies and hopefully nothing else...
> may
> > > > need dependencyManagement, but I think we can collapse that down. No
> > > > <parent> element.
> > >
> > > OK, this works for releases, but what about SNAPSHOTs? For SNAPSHOTs is
> > is
> > > quite normal that your parent is also a SNAPSHOT and you would produce
> > all
> > > kind of problems if you try to resolve/collapse SNAPSHOT parents for
> > > SNAPSHOT artifacts that are installed or deployed.
> > >
> >
> > Why?
> >
> > Or perhaps you are confusing what I mean?
> >
> > Basically the foo-1.0.pom that gets deployed/installed is the result of
> > help:effective-pom with some bits removed, such as <properties>, <build>,
> > <reporting>, <profiles> etc
> >
> > When building from a checkout, the reactor will have everything... and if
> > you are depending on a deployed/installed -SNAPSHOT then the behaviour
> will
> > remain the same.
> >
> > And since this would be for a new Maven, we need only concern ourselves
> > that the contract of the new Maven's classpath and property behaviour is
> > correct... thus we don't have to preserve the current crazyiness when you
> > have a dependency that has transitive dependencies where parts of the GAV
> > are linked by properties.
> >
> > In short, by separating the build time pom from the deployed pom, we can
> > maintain a defined reproducible behaviour[1] *and* migrate the schema
> >
> > [1]: That does not mean that Maven 4.0 will allow you to reproduce all of
> > the classpath hacks that you can with Maven 2/3... some of those hacks
> are
> > stupid (even if people insist on using them)... but it should mean that
> > whatever classpath constructs you can do in Maven 4.0 get mapped
> correctly
> > on a best effort basis to the legacy clients
> >
> >
> > >
> > > [snip]
> > >
> > > - Jörg
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
> >
>
>
>
> --
> -----
> Arnaud Héritier
> http://aheritier.net
> Mail/GTalk: aheritier AT gmail DOT com
> Twitter/Skype : aheritier
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message