You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gautham Pamu <ga...@gmail.com> on 2006/04/19 04:31:31 UTC

m2 How to add generated source to the compilation path from a new plugin

Hi Everyone,

I am new to maven plugin development. I developed a plugin which generates
source code, how do i add the output directory
of the generated code to the compilation path. Is there some annotation I
need to set in the MOJO ?

axistools-maven-plugin does generate code and adds to the compilation path
but I dont know how they do it.

Thanks
-Gautham Pamu

Re: m2 How to add generated source to the compilation path from a new plugin

Posted by Jesse McConnell <je...@gmail.com>.
project.addCompileSourceRoot(foo);

that will tell the project where to pickup these new sources and when it
comes to compile phase will throw them in the bucket

jesse

On 4/18/06, dan tran <da...@gmail.com> wrote:
>
> see build-helper-maven-plugin source.
>
> -D
>
>
> On 4/18/06, Gautham Pamu <ga...@gmail.com> wrote:
> >
> > Hi Everyone,
> >
> > I am new to maven plugin development. I developed a plugin which
> generates
> > source code, how do i add the output directory
> > of the generated code to the compilation path. Is there some annotation
> I
> > need to set in the MOJO ?
> >
> > axistools-maven-plugin does generate code and adds to the compilation
> path
> > but I dont know how they do it.
> >
> > Thanks
> > -Gautham Pamu
> >
> >
>
>


--
jesse mcconnell

Re: m2 How to add generated source to the compilation path from a new plugin

Posted by dan tran <da...@gmail.com>.
see build-helper-maven-plugin source.

-D


On 4/18/06, Gautham Pamu <ga...@gmail.com> wrote:
>
> Hi Everyone,
>
> I am new to maven plugin development. I developed a plugin which generates
> source code, how do i add the output directory
> of the generated code to the compilation path. Is there some annotation I
> need to set in the MOJO ?
>
> axistools-maven-plugin does generate code and adds to the compilation path
> but I dont know how they do it.
>
> Thanks
> -Gautham Pamu
>
>

Re: m2 How to add generated source to the compilation path from a new pl

Posted by Gilles Scokart <gs...@hotmail.com>.
See http://maven.apache.org/guides/mini/guide-generating-sources.html

Namely : project.addCompileSourceRoot( outputDirectory ); 

at the end of the code sample.

Gilles Scokart
--
View this message in context: http://www.nabble.com/m2-How-to-add-generated-source-to-the-compilation-path-from-a-new-plugin-t1471998.html#a3985251
Sent from the Maven - Users forum at Nabble.com.


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