How to define a default mojo for a maven plugin

前端 未结 2 622
别那么骄傲
别那么骄傲 2020-12-17 20:23

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 :

/**
 *          


        
2条回答
  •  执笔经年
    2020-12-17 21:17

    You need to add a META-INF/plexus/components.xml file to your plugin and set true in your plugin block.

    See 11.6.3. Overriding the Default Lifecycle from the Maven Book for reference

提交回复
热议问题