Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set a specific order of deployment in Maven?

Tags:

maven

Having a project with multiple submodules, how do I specify which module is the first to deploy, which is the second and so on?

like image 451
Queequeg Avatar asked Nov 27 '25 14:11

Queequeg


1 Answers

This order is same as build order in reactor (deploy of module is done just after it's packaged, module after module), so it depends on dependencies between modules. If there's more than one module with the same "priority" within reactor build order, order in pom.xml is used then.

So, in general, modules with no dependencies on other modules will be build somewhere in the beginning and modules with many dependencies on other modules will be build somewhere in the end.

like image 131
Michał Kalinowski Avatar answered Nov 29 '25 17:11

Michał Kalinowski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!