views:

197

answers:

1

As per this link...

http://en.wikipedia.org/wiki/Apache_Maven#Build_Lifecycles

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

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

+4  A: 

As per http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html,

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 element to gain more control over the order of particular goals.

digiarnie