简体   繁体   English

我可以在maven-release插件之后运行自定义的maven插件吗?

[英]Can I run a custom maven plugin after the maven-release plugin?

Is it possible to call another maven plugin after the maven release plugin completes? maven版本插件完成后是否可以调用另一个maven插件? I want to notify another service we have that a release has been made (with information about the code itself, specifically about classes that have a certain annotation). 我想通知另一个服务,我们已经发布了版本(包含有关代码本身的信息,特别是有关具有特定注释的类的信息)。

I will need to create the custom plugin, which will call my service, but want to know how I can hook this into the deployment phase after the deployment of the release artifact has been made. 我将需要创建自定义插件,该插件将调用我的服务,但想知道在完成发布工件的部署后如何将其挂接到部署阶段。

您可以在命令行中指定它,目标将按照声明的顺序执行:

mvn release:perform my-plugin:my-goal

The official documentation mentions all the goals that are available for this plugin. 官方文档中提到了此插件可用的所有目标。

The last goal provided by maven is deploy, and Maven Release Plugin references this to perform the release:stage execution. maven提供的最后一个目标是部署,并且Maven Release Plugin引用了该目标以执行release:stage执行。

If you want to execute another maven plugin after the maven release you just need to specify it in the POM file after the maven release plugin and reference its execution to the deploy goal 如果要在Maven发行后执行另一个Maven插件,则只需在Maven发行插件之后在POM文件中指定它,并将其执行参考到deploy goal

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM