Custom Maven Plugin: Override default build lifecycle

How to create a custom Maven plugin which overrides default build lifecycle

12/05/2018 Available in es MavenJavaBuild SystemsMaven Plugins

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 a jar type project.

You can find source code example at

I’ve also created an archetype so you can easily play with the example.

Create an example project

Generate the project using archetype
mvn archetype:generate \
  -DarchetypeGroupId=com.github.carlosvin.archetype \
  -DartifactId=lifecycle-maven-plugin-archetype \