O'Reilly logo

Apache Maven 2 Effective Implementation by Maria Odea Ching, Brett Porter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Exec plugin

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:exec and 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 environmentVariables or arguments configuration to run the command as desired.

Tip

Portability

Keep in mind the question of portability ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required