ceepan
ceepan

Reputation: 95

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? 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.

Upvotes: 1

Views: 560

Answers (2)

aurelius
aurelius

Reputation: 4076

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.

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

Upvotes: 0

Karol Dowbecki
Karol Dowbecki

Reputation: 44960

You can specify it in the command line, goals will be executed in the order they are declared:

mvn release:perform my-plugin:my-goal

Upvotes: 1

Related Questions