Hi Karl Heinz,
Karl Heinz Marbaise wrote at Montag, 12. April 2010 10:02:
[snip]
>
> But now i tried something different. I defined the dependency in m3.2's
> pom to use m4 as dependency:
>
> <dependencies>
> <dependency>
> <groupId>${project.groupId}</groupId>
> <artifactId>m2.1</artifactId>
> <version>${project.version}</version>
> </dependency>
> <dependency>
> <groupId>${project.groupId}</groupId>
> <artifactId>m4</artifactId>
> <version>${project.version}</version>
> <type>pom</type>
> </dependency>
> </dependencies>
>
> Ok..tried to build mvn install and was a little bit confused...
>
> The order in the reactor has changed, but only the module m4 itself has
> been built before m2 instead of all sub-modules of m4...
[snip]
Every Maven project defines one main artifact. I suppose all your Mx.y
modules produce some kind of Java archive. However, the parent project have
only the POM file itself as main artifact. Since it has no dependencies, it
can be build immediately. It does not matter that it defines submodules.
Therefore Maven simply builds M4 alone before M3.2 to satisfy M3.2's
dependencies. If M3.2 is depending on one of the artifacts of M4.x, you have
to define the dependency explicitly.
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]