Reputation: 115
I have maven project with modules module1
, module2
, module3
and so on. I have defined these modules in the pom.xml of the parent, which looks like
<modules>
<module>module1</module>
<module>module2</module>
<module>module3</module>
.
.
<module>module56</module>
</modules>
by default the "maven-reactor" sorts modules by applying the rules described in Guide to Working with Multiple Modules but, i dont want to maven to sort the modules, rather use the order i provided in parent pom.xml .
Upvotes: 0
Views: 822
Reputation: 97409
If you like to sort the order of the modules yourself you didn't understand the key concept of this ordering.
The ordering is done based on dependencies between the modules which means that one module needs to be build before an other module which use it as a dependency.
You would like to make something manually which you shouldn't do. Let the tool do the work for you.
Upvotes: 1
Reputation: 2844
You already posted the offical reference that tells you it is not possible and you can only influence the reactor setup by command line arguments (this does not mean you can acctually take control of the reactor concept itself).
Without any testing but only by the descriptions of the command line options http://books.sonatype.com/mvnref-book/reference/running-sect-options.html i would tell it is not possible at all. You may be able to ignore the module-definition (already not what you want) by using the -r
parameter followed by Maven projects but that wont affect the resulting (logicially senceful) build order from the reactor.
In my eyes it makes no sence too since the resulting build order is exactly why most people use Maven - or at least a very important Key feature in context of "application dependency management"). From a Maven point of view i would adjust my build to work with Maven rather than try to adjust Maven to your requirements (maybe Maven is just the wrong build tool for your setup too).
Upvotes: 1