On Mon, Aug 22, 2011 at 10:46 AM, Julien HENRY <[email protected]> wrote:
> According to my own tests, with Maven 3 the parent pom is resolved according 
> to the following algorithm:
>
> IF relativePath != ""
> THEN
>
>   IF pom is found at relativePath location and GAV match
>   THEN use this pom as parent
>   ELSE log a warning and useRepo=true
>   ENDIF
>
> ELSE
>   useRepo=true
>
> ENDIF
>
> Maven 3 will never use the pom from the reactor, and the reactor order will 
> not reorder parent before children.

I'm foggy on one point here. How can the pom in the reactor differ
from the pom reached by relative path? Different property
substitutions? Or is the issue here the case in which there is no rel
path, but it is in the reactor?

>
> See 
> https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html#Maven3.xCompatibilityNotes-ParentPOMResolution
>
> Please correct me if I am wrong.
>
> Regards,
>
> Julien
>
>
>>________________________________
>>De : Stephen Connolly <[email protected]>
>>À : Maven Users List <[email protected]>
>>Envoyé le : Lundi 22 Août 2011 16h16
>>Objet : Re: Reactor doesn't build parent poms first?
>>
>>On 22 August 2011 14:37, Laird Nelson <[email protected]> wrote:
>>> On Mon, Aug 22, 2011 at 7:48 AM, Stephen Connolly <
>>> [email protected]> wrote:
>>>
>>>> > Should have mentioned I was talking about SNAPSHOTs; sorry.  Does that
>>>> > change the picture?
>>>>
>>>> Nope.
>>>
>>>
>>> Just to be clear, then:
>>>
>>> You're saying that in a multimodule project, where my root
>>> pom.xmlaggregates several submodules, and where one of those
>>> submodules is a
>>> pom.xml that serves as a parent to some other submodules--you're saying that
>>> even when all these things are declared as version 1.0-SNAPSHOT, Maven will
>>> use the repo copy of the parent, even though the very reactor plan it is
>>> executing tells it that it should be building the most recent copy?
>>>
>>> Or, using the same letters that I used in my prior message's example, if A,
>>> B and C are all 1.0-SNAPSHOT, and the version of B deployed to the
>>> repository is 75 days old, Maven will begin a full build from the root (A)
>>> by first scanning the module paths to see what projects are there (A, B and
>>> C), and because C references B as a parent, the 75-day-old copy of B will be
>>> retrieved from the (local) repo rather than Maven realizing that B is in the
>>> reactor plan as a module in its own right?
>>>
>>
>>No I am saying that if C references B 0.9-SNAPSHOT as its parent then
>>the reactor will not require B 1.0-SNAPSHOT (from the reactor) to be
>>built before C 1.0-SNAPSHOT.
>>
>>If the parent GAV is present in the reactor, then that is what will be used
>>if the parent GA is present in the reactor only with a different V,
>>then you might be lucky and see a warning if the relativePath points
>>to it, otherwise Maven will not see an issue as long as the requested
>>GAV is in a repo
>>
>>> Best,
>>> Laird
>>>
>>> --
>>> http://about.me/lairdnelson
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [email protected]
>>For additional commands, e-mail: [email protected]
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to