Maven exec plugin: Running Java programs during maven builds

Exec Maven Plugin

Sometimes it is easier to run or execute a Java program instead of writing a maven plugin.

In the following example, the class 'com.magicmonster.example.Main' will be run. Note the phase has to come after the 'compile' phase if your main class is from your current project. Alternatively, if the main class is included via a maven dependency, any phase will work.


For more info, refer to the official documentation.

Published: Saturday, 25 June 2011