Hi Ruel,

I've seen your various posts about retrotranscoding, jdk4/jdk5 etc so
I'm familiar with your troubles. However, I personally have not had
any situations (yet) where we need to compile against multiple JDKs
like you are doing, so I haven't really dealt with your specific
troubles.

I was basically proposing the following:
Current: project/pom.xml, src1, src2
Proposed: project/pom.xml, src1/pom.xml (becomes its own module),
src2/pom.xml (another module)

This is probably not ideal but I suspect it would work for him. It
would result in 2 artifacts, and possibly one would depend on the
other, depending on the code.

As for your specific troubles, I honestly don't know of a good
solution beyond what has been previously discussed. Perhaps you can
come up with a good way to solve this issue and propose it as an
enchancement to the existing compiler plugin or write the code
yourself? ;-)

Wayne

On 5/11/06, Ruel Loehr <[EMAIL PROTECTED]> wrote:
Wayne, can you expand on how the two pom files would work?   Would you
just call one after the other?

I have the same problem as well in a number of areas.  For us, we have
many projects that have two source folders

>  -- pom.xml
>  -- src1  (jdk 1.4 based)
>  -- src2  (jdk 1.5 based)  usually 1 or files

The short answer is that you can't use the compiler plugin to combine
the source folders.    You are basically going to need to have 2
compilation steps.   The bad part about this is once the compiler plugin
is set with a source directory, you can't modify it.

I had to fork the plugin (just giving it a different name) and use the
forked version to perform the compilation.

I know this is frustrating for ant people who are migrating as you are
allowed to do as many javac's as your heart desires and it is pretty
flexible about what you compile.

Are there any creative ways we could make the maven compiler more
flexible?



Ruel Loehr
JBoss QA


-----Original Message-----
From: Wayne Fay [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 11, 2006 10:45 AM
To: Maven Users List
Subject: Re: [m2] More than one source repository to compile ?

I would personally solve this by simply merging the 2 source folders,
or creating 2 separate poms, one for each src folder.

Someone else might know how to configure the compiler to use both
source folders, but I don't know how to do that myself.

Wayne

On 5/11/06, SiD <tourment> <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a project whith this structure :
>
> project
>  -- pom.xml
>  -- src1
>  -- src2
>
> Where src1 and src2 are two javasource repositories,
>
> how can i configure Maven to compile theses sources from the TWO
> repositories when i make mvn compile ?
>
> Thanks for answer !
>
> sid
>
> ---------------------------------------------------------------------
> 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]


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