Question

I understand that Maven has a number of phases that run in the order they are defined for a given lifecycle, and that you can attach goals to a phase.

What happens when you attach a number of goals to a phase, how does Maven determine what order to run the goals in?

Was it helpful?

Solution

From "Introduction to the Build Lifecycle":

The goals that are configured will be added to the goals already bound to the lifecycle from the packaging selected. If more than one goal is bound to a particular phase, the order used is that those from the packaging are executed first, followed by those configured in the POM. Note that you can use the <executions> element to gain more control over the order of particular goals.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top