I have created another example to demonstrate how to override default Maven build lifecycle. Default build lifecycle is used to construct your software project, for example, it is executed when you run
mvn install in
jar type project.
You can find source code example at https://github.com/carlosvin/lifecycle-maven-plugin.
I've also created an archetype so you can easily create and play with the example.
Create example project just by running following command: