If using the jaxb plugin doesn't work for you (it's the preferred
method if it does work), you can instead use your shell script plus
the build-helper plugin:
http://mojo.codehaus.org/build-helper-maven-plugin/

-Stephen

On 3/13/06, Henry S. Isidro <[EMAIL PROTECTED]> wrote:
> Andreas Guther wrote:
>
> >Hi Raphaël,
> >
> >Thank you very much for your answer and the time you took to write it.
> >
> >Unfortunately I am still confused and not able to solve the "puzzle".  To be 
> >concrete, I am generating java source from an XSD using jaxb.  I accomplish 
> >that currently with a shell script.  The generated source I want to be 
> >written to the target folder since I do not see any sense in checking them 
> >in.
> >
> >I am afraid I do not understand what you mean with the following
> >
> ><Quote>
> >So each generating sources plugin defines in its configuration the
> >directory/files used as input and defines a directory where to output
> >the generated files.
> ></Quote>
> >
> >Obviously that is something jaxb does not provide.  So how do I accomplish 
> >that?  Do I have to write a plugin wrapping Jaxb?
> >
> >Andreas
> >
> >
> >
> >-----Original Message-----
> >From: Raphaël Piéroni [mailto:[EMAIL PROTECTED]
> >Sent: Monday, March 13, 2006 8:29 PM
> >To: Maven Users List
> >Subject: Re: [M2] How to configure POM for generated sources folder
> >
> >Hi Andreas,
> >
> >Answers inline.
> >
> >Andreas Guther a écrit :
> >
> >
> >>Hi,
> >>
> >>I am currently moving from M1 to M2.
> >>
> >>I am having problems finding information about how to configure in the
> >>POM an additional source folder for generated sources.  My google
> >>searches do not bring up an answer.  Maybe I am searching for the wrong
> >>keywords.  I looked in the FAQ but that seems to be an unanswered
> >>question.  I would be surprised if I am the first one asking that
> >>question, but somehow I cannot locate information.
> >>
> >>
> >>
> >Each generating source plugin like modello, hibernate, antlr, ... should
> >declare its result in the maven compile sources.
> >
> >Maven 2 more than Maven 1 enforce convention by letting you modify the
> >pom only if the default convention do not fill your needs.
> >
> >So each generating sources plugin defines in its configuration the
> >directory/files used as input and defines a directory where to output
> >the generated files.
> >
> >If the plugin generates java files, it also add the generated directory
> >into the project's sources directories (viewable at runtime only).
> >
> >As you know Maven 2's plugins executions are attached to phases, which
> >are executed in a predefined order.
> >
> >Therefore, if you run mvn compile, the generated source should be
> >compiled. Because the generate-sources phase always occurs before the
> >compile phase.
> >
> >
> >
> >>The Problem:
> >>
> >>I have generated sources that I generate under target/generated-sources.
> >>But now I am missing the information where to tell Maven2 in the POM
> >>that I have sources in the target tree.
> >>
> >>
> >>
> >For information about what the plugins are doing, run maven with the -X
> >option.
> >
> >Hope this helps
> >
> >Regards,
> >
> >Raphaël
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> Mojo codehouse has a jaxb plugin in its sandbox. Check it out here:
> http://mojo.codehaus.org/jaxb2-maven-plugin/
>
> HTH,
> Henry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Stephen Duncan Jr
www.stephenduncanjr.com

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

Reply via email to