You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andreas Guther <An...@markettools.com> on 2006/03/14 19:01:26 UTC

[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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2] Project Lifecycle generate-sources -- how compile?

Posted by Stephen Duncan <st...@gmail.com>.
If you're using the jaxb plugin from mojo:
http://mojo.codehaus.org/jaxb2-maven-plugin/ and this is happening,
then it's a bug in the plugin, and an issue should be put in JIRA.

-Stephen

On 3/14/06, Andreas Guther <An...@markettools.com> wrote:
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
Stephen Duncan Jr
www.stephenduncanjr.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2] Project Lifecycle generate-sources -- how compile?

Posted by Simon Kitching <sk...@apache.org>.
I believe the codehaus build-helper plugin does this:
  http://mojo.codehaus.org/build-helper-maven-plugin/


On Tue, 2006-03-14 at 19:28 +0100, Mattias Olofsson wrote:
>  
> 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:Andreas.Guther@markettools.com]
> To: Maven Users List [mailto:users@maven.apache.org]
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>       
>    
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2] Project Lifecycle generate-sources -- how compile?

Posted by Mattias Olofsson <ma...@xdin.com>.
 

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:Andreas.Guther@markettools.com]
To: Maven Users List [mailto:users@maven.apache.org]
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org