commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <Joerg.Schai...@Elsag-Solutions.com>
Subject RE: [all] Using maven.compile.executable
Date Mon, 12 Dec 2005 09:59:30 GMT
Hi Phil,

Phil Steitz wrote on Saturday, December 10, 2005 11:13 PM:

> To get maven to compile sources using a different jdk than maven
> itself runs under, you can set maven.compile.executable to the full
> path to the version of javac that you want maven to use.  You also
> need to have maven.compile.fork=true in order for this to have any
> effect. 
> 
> To get the correct jdk version in MANIFEST.MF, you need to add a text
> file with the correct version and then set maven.jar.manifest to
> point to that file. 
> 
> My question is, what is the best way to configure this in svn
> and distros?
> 
> The simplest is to create manifestMods.txt including the replacement
> line for the manifest and put the following into project.properties:
> 
> #maven.compile.source=1.3
> maven.compile.fork=true
> maven.compile.executable=${user.home}/jdk1.3.1_16/bin/javac
> maven.jar.manifest=manifestMods.txt
> 
> (Note the top line *must* be commented out for jdk 1.3
> compilation to work)
> 
> But this is obviously bad in project.properties, since it forces the
> executable to be there. 
> 
> So, I am thinking best is to add build.properties.sample with the
> lines above, but checkin and distribute the manifestMods file.
> 
> Does that sound reasonable?  Any better ideas?

I use different properties for different JDKs in the project.xml files:

maven.compile.executable=${jdk13.home}/bin/javac

And have them defined in the build.properties:

jdk13.home=<my path to JDK 1.3>
jdk14.home=<my path to JDK 1.4>

Whith this approach I can use one build.properties file in my home directory and target the
appropriate JDK in each Maven project.

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message