have a look at the buildhelper-maven-plugin at org.codehaus.mojo

it has the ability to add multiple source paths the "right" way rather than your hack

Sent from my iPod

On 15 Mar 2008, at 16:55, "Cyril Ledru" <[EMAIL PROTECTED]> wrote:

Hi,

I had this problem earlier trying to migrate from ant.
I had sources in src/java and src/util.

What I did is put the  <sourceDirectory> to src and put includes and
excludes in the maven-compiler-plugin configuration.
So for you it would be modules in sourceDirectory and then

<includes>
 <include>x/src/**/*.java</include>
 <include>y/src/**/*.java</include>
 <include>z/src/**/*.java</include>
</includes>

in the <configuration> element of maven-compiler-plugin.

The only problem I have so far is that doing mvn eclipse:eclipse result in having only src as source directory so I have to edit my eclipse build path
by hand.

Having said that I must add that I'm a maven newby and that there's maybe a
better way to do it.

Cyril.

On Sat, Mar 15, 2008 at 5:21 PM, david.delbecq <[EMAIL PROTECTED]> wrote:

Hello,

am trying to mavenize an existing ant based projet. One of the
caracteristics of the project is it's source tree organization

modules/x/src/...
modules/y/src/...
modules/z/src/...

I thought first of using maven modules for this, but the dependency
graph makes it impossible (x depends on y which depends on z which
depends on x, it's just an example). The current ant task just build all modules at same time in a single jar. So we'd like to make that too with
maven2 (the mavenization should not imply a code reorg, whe just want
that project to provide a pom + jar + dependencies informations). I
tried to put multiple <sourceDirectory> entries, but maven complains
there can be only one.

Anyone has a suggestion on how to put multiple tree in compilation? It seems possible to put multiple resource trees, but not multiple source trees? Maybe using the generate-source goal and some copy goals, someone
has suggestions?



---------------------------------------------------------------------
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]

Reply via email to