Can I define the antrun plugin to be executed on demand like “mvn antrun:run”?
The antrun plugin can be executed on demand only if: • the top level configuration of the plugin contains all the information • a variable is passed from the command line, eg -Dtarget=foo antrun:run • the appropriate target in the script is executed based on the variable However, it is recommended that developers write plugins for their goals (Ant support for plugins will be available soon, currently you must write them in java or beanshell).
This isn’t actually possible with the plugin, unless perhaps you do this: • put everything in a top level configuration of the plugin • pass in a variable from the command line, eg -Dtarget=foo antrun:run • execute the appropriate target in the script based on the variable Ideally, you would write a plugin for these goals (Ant support for plugins will be available soon, currently you must write them in java or beanshell).