How can I set an order to the build of multiple projects (modules) in IntelliJ?
How can I set an order to the build of multiple projects (modules) in IntelliJ?
If you have a multi-module maven project as described here then you can set the build order by ordering the modules in your parent POM.
On intellij click on the top toolbar
Run >> Edit Configurations... >> click on the '+' symbol to "add New Configuration"
scroll down and pick "Maven" it should open a window and by default the first tab "Parameters" is open.
down below in this window there is a divider called "Before launch" click on the arrow so it opens a field where you can click on the '+' symbol
This is where you can select "Run Maven Goal" it will open a new window titled "Select Maven Goal"
working directory click on the far right button, this is where you can select maven modules
and enter in command line the maven command you would want to run e.g "install -f pom.xml" you can add more maven goals and the order is from top to bottom.
I am sorry I did not provide any images I'll add them if anybody requests it in the comments