开发者

Defining custom lifecycle phases in Maven 2

In my pom.xml I have referenced a custom plugin, which is exposing a couple of goals. While I can attach these goals to the various build life-cycle phases, I would like to be able to invoke a set of goals defined in the POM by using my custom alias phase on the command line, such as:

mvn myphase

Is there any way to accomplish this? I would like to avoid modify开发者_开发知识库ing my plugin as I need to run some auxiliary operations, which are provided by the antrun plugin.


You want to invoke a custom phase not a goal (changed your question). You have to write your custom lifecycle which will include your custom phase. Do you really want to do that? Have a look at this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜