Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force manual execution of a maven plugin?

Tags:

maven

maven-3

Is there a way in maven to force a plugin to only execute manually. for example I have the sql plugin which will be creating some tables, I don't want this plugin to run all the time with every build i want it only run when I tell maven to run that plugin. How can a plugin be configured to run manually?

like image 688
ams Avatar asked Oct 27 '25 11:10

ams


1 Answers

Most plugins won't execute automatically unless they are bound to a build phase. You should find that your plugin won't execute unless you specify it on the command line: mvn plugin:goal.

If the plugin is already bound automatically to a phase, you can undo this by binding it to a non-existent phase (none is the traditional choice). See this question for an example of this.

like image 178
Duncan Jones Avatar answered Oct 29 '25 05:10

Duncan Jones



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!