Honestly, I don't think it's possible.

This is a long standing bug in Maven that is SUPPOSED to be fixed for Maven 
2.1, but that doesn't seem like it's ever going to get released.  :-(     

With 2.0.x, you cannot have two plugins of the same groupname/artifactid, but 
different versions, in the same reactor.  The only "workaround" I can suggest 
is to copy the 2.0.2 artifacts into a new artifact id or something in your 
own maven repository.  

Dan


On Wednesday 06 August 2008 10:16:33 am Peter Dobratz wrote:
> I'm trying to build using multiple versions of the cxf-codegen-plugin.
>  I've distilled the problem into the following project structure:
>
> pom.xml
> A/
> A/pom.xml (cxf-codegen-plugin version 2.0.2-incubator)
> B/
> B/pom.xml (cxf-codegen-plugin version 2.1.1)
>
> The top level pom.xml has a modules section that lists project A and
> project B.  Project A runs cxf-codegen-plugin version 2.0.2-incubator
> and project B runs cxf-codegen-plugin version 2.1.1.  If I run mvn
> package in either the A directory or the B directory, the right
> version of the CXF plugin is executed, but if I run the top level
> pom.xml, cxf-codegen-plugin version 2.0.2-incubator is used for both
> project A and project B.  The correct versions of the CXF jars are put
> on the compiler classpath though.
>
> The goal is to get the top level pom.xml to build both project A and
> project B.  I'm somewhat new to Maven, so maybe I'm not going about
> this the right way.  What's the best way for me to get the correct
> versions of cxf-codegen-plugin to run?
>
> I've pasted the above mentioned pom.xml files.
>
> Thanks,
> Peter
>



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to