----
Usage
----
Kenney Westerhof
----
10 August 2005
----
Usage
For those of you unfamiliar with configuring a plugin see the example below:
------
4.0.0
my-test-app
my-test-group
1.0-SNAPSHOT
maven-antrun-plugin
generate-sources
run
------
The example above illustrates how to bind an ant script to a
lifecycle phase. You can add a script to each lifecycle phase,
by duplicating the <<<\>>> section and specifying
a new phase.
You can use these classpath references:
* <<>>
* <<>>
* <<>>
* <<>>
* <<>>
Below you can see how to indicate that ant has generated some more java
source that needs to be included in the compilation phase. Note that the
compile phase follows the generate-sources phase in the lifecycle.
------
4.0.0
my-test-app
my-test-group
1.0-SNAPSHOT
maven-antrun-plugin
generate-sources
${project.build.directory}/generated-sources/main/java
${project.build.directory}/generated-sources/test/java
run
------
Of course, you can put whatever folder you prefer. The folders in the example above are
handy because they are deleted when you "clean" since they are in the build directory
(which is, by default, "target").
<<<\>>> adds a single folder to the
list of folders that get compiled with the program source code (compile).
<<<\>>> adds a single folder to the
list of folders that get compiled with the test source code (test-compile).