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 Dolk <an...@googlemail.com> on 2013/10/04 23:18:02 UTC
maven-eclipse-plugin - configure source and output-folders
Hi all,
we have a rather complex project structure with a lot of projects and a
couple of code generators that produce java classes for production and
test. The challenge now is to configure the build files so that a mvn
eclipse:eclipse run will create all required source folders and set the
correct output folders, for example:
src folder: src/main/code-gen
out folder: (default) -> target/classes
src folder: src/test/code-gen
out folder: target/test-classes
Currently we use the maven build helper to set the source folders but I
still don't know how to set the out dirs - now it creates a project config
that compiles production and test classes into the same out folder which
actually causes conflicts.
Is there any way to "fine-tune" the .classpath file programmatically?
Cheers,
Andreas
Re: maven-eclipse-plugin - configure source and output-folders
Posted by Daniel Kulp <dk...@apache.org>.
On Oct 4, 2013, at 5:18 PM, Andreas Dolk <an...@googlemail.com> wrote:
> Hi all,
>
> we have a rather complex project structure with a lot of projects and a
> couple of code generators that produce java classes for production and
> test. The challenge now is to configure the build files so that a mvn
> eclipse:eclipse run will create all required source folders and set the
> correct output folders, for example:
What happens if you run:
mvn test-compile eclipse:eclipse
instead of just
mvn eclipse:eclipse
By default, eclipse:eclipse just runs far enough to get the source directories, not all the test directories. If you force maven to run to the test-compile phase, then it should be able to pick everything up.
Dan
>
> src folder: src/main/code-gen
> out folder: (default) -> target/classes
>
> src folder: src/test/code-gen
> out folder: target/test-classes
>
> Currently we use the maven build helper to set the source folders but I
> still don't know how to set the out dirs - now it creates a project config
> that compiles production and test classes into the same out folder which
> actually causes conflicts.
>
> Is there any way to "fine-tune" the .classpath file programmatically?
>
> Cheers,
>
> Andreas
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-eclipse-plugin - configure source and output-folders
Posted by Wayne Fay <wa...@gmail.com>.
> test. The challenge now is to configure the build files so that a mvn
> eclipse:eclipse run will create all required source folders and set the
> correct output folders, for example:
Are you aware of m2e and other options for using Maven in Eclipse? I'm
just not convinced you will get what you want from m-e-p in any
reasonable timeframe without adjusting the code yourself and donating
changes back.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-eclipse-plugin - configure source and output-folders
Posted by Jörg Schaible <Jo...@scalaris.com>.
Hi Andreas,
Andreas Dolk wrote:
> Hi all,
>
> we have a rather complex project structure with a lot of projects and a
> couple of code generators that produce java classes for production and
> test. The challenge now is to configure the build files so that a mvn
> eclipse:eclipse run will create all required source folders and set the
> correct output folders, for example:
>
> src folder: src/main/code-gen
> out folder: (default) -> target/classes
>
> src folder: src/test/code-gen
> out folder: target/test-classes
>
> Currently we use the maven build helper to set the source folders but I
> still don't know how to set the out dirs - now it creates a project config
> that compiles production and test classes into the same out folder which
> actually causes conflicts.
Isn't that automatically done using build-helper:add-source vs. build-
helper:add-test-source?
> Is there any way to "fine-tune" the .classpath file programmatically?
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org