I now added the master pom as a common parent for the below parent project
poms:
master
|--> pom.xml (reference below parent projects as relative submodules)
a
|--> a.parent
|--> pom.xml (parent for this pom is the master pom.xml)
...
|--> a.child
|--> pom.xml
b
|--> b.parent
|--> pom.xml (parent for this pom is the master pom.xml)
...
|--> b.child
|--> pom.xml
c
|--> c.parent
|--> pom.xml (parent for this pom is the master pom.xml)
...
|--> c.child
|--> pom.xml
Now it runs the invoker plugin:
[INFO]
-----------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Master project
[INFO] M3 C Parent Project
[INFO] C Bundle
[INFO] M3 B Parent Project
[INFO] B Bundle
[INFO] M3 A Parent Project
[INFO] A Bundle
[INFO]
but it has no effect. I specify that it should run b.parent before any other
projects:
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>1.5</version>
<configuration>
<setupIncludes>
<setupInclude>../m3.b.parent/pom.xml</setupInclude>
</setupIncludes>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
It seems that the only thing that has an effect on the order is the order
specified in the <modules> tag:
...
<name>Master project</name>
<properties>
<tycho-version>0.11.0</tycho-version>
</properties>
<modules>
<module>../m3.c.parent</module>
<module>../m3.b.parent</module>
<module>../m3.a.parent</module>
</modules>
...
result:
[INFO] Reactor Summary:
[INFO]
[INFO] Master project .................................... SUCCESS [0.661s]
[INFO] M3 C Parent Project ............................... SUCCESS [0.633s]
[INFO] C Bundle .......................................... SUCCESS [1.202s]
[INFO] M3 B Parent Project ............................... SUCCESS [0.013s]
[INFO] B Bundle .......................................... SUCCESS [0.140s]
[INFO] M3 A Parent Project ............................... SUCCESS [0.013s]
[INFO] A Bundle .......................................... SUCCESS [0.126s]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
I don't use the maven dependency manager since the projects are maven3/tycho
MANIFEST first projects. Further parent/child relations are specified using
relative paths in parent/module tags:
<parent>
<artifactId>master</artifactId>
<groupId>m3</groupId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../m3.master</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>m3</groupId>
<artifactId>b.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>M3 B Parent Project</name>
<modules>
<module>../m3.b.bundle</module>
</modules>
Is this the reason that maven3 falls back to use the order in the modules
tag when determining the effective build order?
--
View this message in context:
http://maven.40175.n5.nabble.com/Modify-build-order-tp4369751p4370836.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]