No. The compiler plugin is not flexible enough to be changed and then reran.

I encountered the same problem.  I needed to produce java1.4 and java1.5 code 
and did not want to split the code into 2 separate projects.

I had to create my own compiler plugin and bind it to a random phase prior to 
jarring which would be executed as part of a java1.5 profile.  This was in 
addition to the default compiler.

Very, very ugly solution, but it was the only one which I could find.

What we would need, for this to work well is:

1) The compiler plugin would need to be able to be bound to different phases 
(e.g. a custom compiler phase)
2)  The compiler plugin would need to be configurable (e.g. I can overwrite the 
default src dir with one of my own choosing)









Ruel Loehr
JBoss QA
 

-----Original Message-----
From: Nicolas De Loof [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 21, 2006 10:31 AM
To: Maven Users List
Subject: [m2] howto run the maven compiler two times ?


Hello,

I've a requirement for a utility lib to include both Java1.3 and Java5 
code. I don't want to split my lib into two jars, but to split the 
source three into src/main/java and src/main/tiger. I'm searching for a 
way to configure the compiler plugin for this.

I've set two compiler configuration (default config is for 1.3 and 
<id>tiger</id> execution for java5)
I've tried to use the build-helper plugin, but I cannot make int run 
between compiler default execution (java13) and compiler java5 execution.
I've also looked at compiler doc, but "|compileSourceRoots|" seems to be 
readonly.

My requirement seems not to be so strange : take a look at Spring or any 
other utility/framework that want to add support for Java5 witout 
breaking existing code.

Is there any known solution for this ?

Nico.



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.2/422 - Release Date: 8/17/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.2/422 - Release Date: 8/17/2006
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to