I am getting trouble seeing the "forest with the trees" on some Maven concepts here. I realize that Maven comes preconfigured having a slew of so-known as "Build Lifecycle Phases" that start with validate, and test and finish with deploy.

I'm visiting Maven from Ant in which you organized major build stages into targets (which could rely on other targets inside a linear fashion), and you decompose your targets into procedural tasks. Maven appears to supports this but as goals.

My question (since i have am accustomed to considering building when it comes to targets and tasks) is: how can these lifecycle phases (package, verify, etc.) connect with goals? Do you have to set up which goals to operate where phase, or perhaps is this made by Maven automagically in some way?

Or, perform the goals come predefined that phase they belong in?

I am simply not seeing how one orders goals to produce a custom build that actually works on their behalf or their organization.

Thanks ahead of time for just about any clearness!

Many Maven plug ins bind specific goal(mojo) to some specific lifecycle phase.

E.g. search for documentation of [cde] goal. It states:

Binds automatically towards the lifecycle phase: package.

Also, lifecycle is indicating what tools have to be run for every phase. For default packaging types these power tools are predefined by Maven and described here -> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Built-in_Lifecycle_Bindings.

But this situation shows how you can create totally custom lifecycle binding -> http://www.sonatype.com/people/2009/08/create-a-customized-build-process-in-maven/. As possible help you can bind any mixture of wordpress plugin goals to some specific lifecycle phase.

Last, although not least, you can include wordpress plugin execution by hand with the maven-jar-plugin:jar component of your pom file. Should you choose the plug ins in specific phases will execute inside a FIFO order.

Also, assistance you to view the build/plugins with all of these defaults typed out. Many IDE's offer this method for Maven projects, but you may also see effective pom in the command line:

Effective POM