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?
Share
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 (
noneis the traditional choice). See this question for an example of this.