I looked in the sourcecode in the xdoclet plugin hosted at 
http://mojo.codehaus.org/. 

  

http://cvs.codehaus.org/viewrep/~raw,r=1.4/xdoclet/maven2-plugin/src/main/java/org/codehaus/xdoclet/XDocletMojo.java
  

   

It seems that you only have to invoke the addCompileSourceRoot method on the 
MavenProject object. You just have to declare the MavenProject object as an 
instance and it will be populated by the IC plugin framework in maven.  

   

      /**  

       * @parameter expression="${project}"  

       * @required  

       * @readonly  

       */  

      private MavenProject project;  

   

      /**  

       * @parameter 
expression="${project.build.directory}/generated-sources/xdoclet"  

       * @required  

       */  

      private String generatedSourcesDirectory;  

   

   

project.addCompileSourceRoot( generatedSourcesDirectory );  

   

   

 
      _____  

  From: Andreas Guther [mailto:[EMAIL PROTECTED]
To: Maven Users List [mailto:[EMAIL PROTECTED]
Sent: Tue, 14 Mar 2006 19:01:26 +0100
Subject: [M2] Project Lifecycle generate-sources -- how compile?

Hi,

I am still having problems with the project lifecycle configuration.

I succeeded in having a source code generating plug-in for jaxb to
generate source during the generate-sources lifecycle phase.
Unfortunately the sources do not get compiled. They are generated into
the folder target/jaxb-sources which is obviously unknown to maven 2.

How do I tell Maven 2 that it has to include the additional folder into
the build?

Thanks again for any help.

Andreas




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

      
   
 

Reply via email to