I want Maven to only run a certain plugin when there is a flag on the command line when I call the mvn
command.
for example:
Let's say I have a plugin called maven-foo-plugin
. I only want maven to run this plugin when the flag --foo
is present when I call the maven command.
So, instead of saying...
mvn install
...I would say...
mvn install --foo
The first one should NOT use/call the plugin maven-foo-plugin
, but the second one should. By default, I don't want this plugin to run, but if and only if, the --foo
is present. Is there another parameter that I add to this maven-foo-plugin
to make it do this?
The plugin I'm using is the maven-antrun-plugin
that has the task that unzips a file. Of course, sometimes this file is present and sometimes not. Sometimes, it's not present and I don't need it. So, I need a way (Preferably through command line unless someone has a better idea) to turn on/off this plugin.