I\'ve written a plugin that generate one file in target/generated-sources/. This plugin only has one mojo. This mojo is declared with the following :
/** *
You need to add a META-INF/plexus/components.xml file to your plugin and set true in your plugin block.
META-INF/plexus/components.xml
true
See 11.6.3. Overriding the Default Lifecycle from the Maven Book for reference