Howdy,

This is a problem with Maven 3 and how it "reduces" the reactor (when
using -rf, -pl etc, basically when reactor < full project).
This was already discussed once on this ML but let me shortly explain
what happens:

You basically "moved" B out of the reactor, and your "snake" looks like this:

A (in reactor) -> B (out of reactor, like any external dep) -> C (in reactor).

Maven 3 cannot follow these "out then back in" links, and assumes A
and C are unrelated.

The 1st command simply "loses" the link between A and C, because B got
out of the reactor and built them in parallel.
The 2nd command works as it is single threaded, but in fact,
internally, it also does not "see" the relation.



On Thu, Nov 14, 2024 at 2:33 PM Francois Marot <francois.ma...@gmail.com> wrote:
>
> Hello,
>
> I just faced a problem and would like your input if it is really a problem
> or not.
> I have a multimodule project where dependencies are like:
>
> A --> B --> C --> D    (A depends upon B which depends upon C and so on...)
>
> I would have expected those 2 commands to exhibit the exact same behaviour:
>
> 1- mvn package -pl :A,:C -T 1C
> 2- mvn package -pl :A,:C
>
> but the problem is that when command 1 is run, both projects are built
> simultaneously (the logs are interweaved). It should not be the case
> because A depends transitively upon C.
> When command 2 is run, project C is built before project A which is what I
> expect.
>
> I'm using mvn 3.9.9
>
> Best regards
>
>
>
>
>
> *- - - - -François Marot06 50 91 96 38*

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to