Sorry that was a different page I looked at before going to the JIRA.

It said that we can manually add in the target/generated-test-source/java 
directory as a source directory with something like

<sourceIncludes>target/generated-test-source/java/**/*.java</sourceIncludes>

I have no idea if it will work, but it looked cleaner to me.

--Bobby Evans

On 9/20/11 9:14 AM, "Alejandro Abdelnur" <t...@cloudera.com> wrote:

Bobby,

What is the  POM change you are referring to?

Thanks.

Alejandro

On Tue, Sep 20, 2011 at 7:00 AM, Robert Evans <ev...@yahoo-inc.com> wrote:

> This is a known issue with the eclipse maven mojo
>
> http://jira.codehaus.org/browse/MECLIPSE-37
>
> The JIRA also describes a workaround, add the generated tests directory in
> the eclipse config with a pom change, which I think would be better then
> trying to  move the phase where test code is generated.  So please file a
> JIRA for it and we can discuss the proper fix in context of that JIRA.
>
> --Bobby Evans
>
>
> On 9/20/11 8:35 AM, "Alejandro Abdelnur" <t...@cloudera.com> wrote:
>
> Laxman,
>
> This is not an incorrect usage of maven phases, those generated Java
> classes
> are test classes, thus is generation in the 'generate-test-sources' phase.
>
> The problem seem to be that eclipse does not recognize the
> target/generated-test-source/java directory as a source directory (for
> example, IntelliJ does).
>
> One thing we could try (not 100% correct but it would simplify the life of
> eclipse developers) is -as you suggest- to change the phase to
> 'generate-sources'. But the generated sources and corresponding compiled
> classes there must be compiled and used for testing, the classes should end
> up in the target/test-classes directory.
>
> If the above is doable it should a nice workaround.
>
> Please open a JIRA to follow up with this. Note that is not only in common
> that code is generated, but in mapreduce as well. And there are different
> things being generated, avro, protobuf, etc.
>
> Thanks.
>
> Alejandro
>
> On Tue, Sep 20, 2011 at 2:41 AM, Laxman <lakshman...@huawei.com> wrote:
>
> > Hi All,
> >
> >
> >
> > I can see lot of compilation issues after setting up my development
> > environment using "mvn eclipse:eclipse".
> >
> > All these compilation issues are resolved after adding
> > "target/generated-test-sources" as a source folder to the common project.
> >
> >
> >
> > When verified the "pom.xml", it's noticed that these are included under
> > "generate-test-sources" phase.
> >
> > This seems to be a problem occurred because of incorrect
> > understanding/usage
> > of "build-helper-maven-plugin" in Common project.
> >
> >
> >
> > All these compilation issues are resolved after changing the phase to
> > "generate-sources".
> >
> >
> >
> > Please correct me if my understanding is wrong.
> >
> >
> >
> > I found similar issue here.
> >
> > https://issues.sonatype.org/browse/MNGECLIPSE-2387
> >
> > --
> >
> > Thanks,
> >
> > Laxman
> >
> >
>
>

Reply via email to