On Thu, Aug 25, 2005 at 10:19:44AM +0100, Scokart Gilles wrote:
> In the POM of maven2, there is a single entry to configure the source
> directory and the test source directory.
> 
> When we have to generate some files that must be compiled, we need to put
> two directory.
> 
> - Is there is special syntax to place 2 build directory into the
> sourceDirectory or testSourceDirectory ?
> - Is there some standard directory that are added by default ?
> - Is it the responsibility of the plugin that make the code generation to
> make the compilation ? 
> 
> If not, how do we use code generation and compilation in maven2 ?

The plugin that generates the code can use the MavenProject instance to
add another source compile root to the project. The compiler plugin will
use all the source roots when compiling.

For a real project that uses this mechanism take a look at the Modello
maven plug-in[1].

[1]: 
http://svn.modello.codehaus.org/trunk/modello/modello-maven-plugin/src/main/java/org/codehaus/modello/maven/AbstractModelloGeneratorMojo.java?rev=441&view=auto

--
Trygve

Attachment: signature.asc
Description: Digital signature

Reply via email to