If your Maven plugin generate source files in a new folder then it is the
responsability of your Maven plugin to add this directories into the list of
source directories once the source have been generated (through the project
object that may be injected to your plugin by Maven).

Jeff MAURY

On Wed, Mar 25, 2009 at 10:49 AM, Roman Kournjaev <kournj...@gmail.com>wrote:

> Thanks for the fast answer
>
> I do care about it and i want to do it the standart way.
>
> The sources i generate are created by my maven plugin, and i need them to
> be
> generated before compiling the project itself, since i refer to them from
> my
> code.
>
> I would like also to see the gen sources in eclipse , so i have just added
> the src/main/java-gen to the sources folders in eclipse.
>
> i think if i will put them in to target/genereated-sources eclipse will get
> nuts and wont recognize that i have them att all.
>
> Any idea how to do this the best way ?
>
> Thanks
>
> On Wed, Mar 25, 2009 at 11:41 AM, <clovis.seragio...@raibau.at> wrote:
>
> > The easy answer is the maven-helper-plugin:
> > http://mojo.codehaus.org/build-helper-maven-plugin/add-source-mojo.html.
> >
> > src/main/java-gen probably means that your sources are generated by
> > someone. If this someone is a Maven plugin, then it probably does the job
> > of adding the source directory to your POM (which may not be what you
> > want, but that is not point now). If you generate the sources using the
> > AntRun plugin, you can add *one* extra source directory.
> >
> > And if you care (this is a convention): generated sources are placed
> under
> > target/generated-sources, and never under src.
> >
> >
> > ______________________________________
> > Diese E-Mail kann vertrauliche und geschuetzte Informationen enthalten.
> > Wenn diese E-Mail nicht für Sie bestimmt ist, bitten wir Sie, uns
> > unverzueglich zu informieren und sie zu loeschen.
> >
> > This e-mail message may contain information, which is confidential and
> > protected. If you are not the intended recipient of this message, we ask
> you
> > to inform us immediately and delete the message afterwards.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
>



-- 
La mélancolie c’est communiste
Tout le monde y a droit de temps en temps
La mélancolie n’est pas capitaliste
C’est même gratuit pour les perdants
La mélancolie c’est pacifiste
On ne lui rentre jamais dedans
La mélancolie oh tu sais ça existe
Elle se prend même avec des gants
La mélancolie c’est pour les syndicalistes
Il faut juste sa carte de permanent

Miossec (2006)

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.lastfm.fr/listen/user/jeffmaury/personal

Reply via email to