You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Matthew Tordoff <ma...@hotmail.com> on 2008/05/06 16:23:30 UTC

Multiple executions of Maven-Compiler-Plugin

Hi All,

I want to compile Java code to two different target versions. I want to compile a single java file to v1.5 then 3 files to v1.1 and then 30 remaining files to v1.5. Is it possible to do this within a single build loop? I don't really want to have to create an entire pom.xml and all the trimmings just to build a single file. I would like to instruct all of this as part of a single pom.xml.

>From looking at the documentation relating to the Maven-Compiler-Plugin I am not sure if this is entirely possible though, since it says that the compile target is linked directly to the compile phase of the lifecycle.

If anyone has had any experience doing a similar thing, or has any ideas then it would be greatly appreciated.

Kind Regards,

Matt

_________________________________________________________________

All new Live Search at Live.com

http://clk.atdmt.com/UKM/go/msnnkmgl0010000006ukm/direct/01/

RE: Multiple executions of Maven-Compiler-Plugin

Posted by Jörg Schaible <Jo...@Elsag-Solutions.com>.
Matthew Tordoff wrote:
> Hi All,
> 
> I want to compile Java code to two different target versions.
> I want to compile a single java file to v1.5 then 3 files to
> v1.1 and then 30 remaining files to v1.5. Is it possible to
> do this within a single build loop? I don't really want to
> have to create an entire pom.xml and all the trimmings just
> to build a single file. I would like to instruct all of this as part
> of a single pom.xml. 
> 
> From looking at the documentation relating to the
> Maven-Compiler-Plugin I am not sure if this is entirely
> possible though, since it says that the compile target is
> linked directly to the compile phase of the lifecycle.
> 
> If anyone has had any experience doing a similar thing, or
> has any ideas then it would be greatly appreciated.

Have a look at the XStream pom, that does something like this:
http://svn.xstream.codehaus.org/browse/~raw,r=HEAD/xstream/trunk/xstream/pom.xml

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org