In some build situations, the best (or only!) way to get something done might be to run an external application, or a piece of Java code. It was for this purpose that the Exec plugin was created.
The plugin contains two goals:
exec:java. They are similar in purpose, however the
java goal sets up an easier way to pass Java configuration and execution parameters to a forked JVM instance, whereas the
exec goal simply runs any executable available on the system.
To use the
exec goal, you pass the path of the executable program in the
executable configuration option, and optionally can add the
arguments configuration to run the command as desired.
Keep in mind the question of portability ...