Try:
<property name="compiler.folder" value="pathToJavac"/>
Then use the following in your javac task:
executable="${compiler.folder}"
________________________________
From: Frances Laverty <[email protected]>
To: [email protected]
Sent: Thursday, May 21, 2009 7:30:58 AM
Subject: Using ant to change the compiler for javac tasks
Hi,
I'm trying to set up CruiseControl to build my project, and the latest version
of cc requires java 5. Unfortunately our project must be build with java 1.4,
so i've been trying to incorporate the compiler setting into my build. I've
got one build file that does everything, and i've been trying to use set a
global property as follows: <property name="build.compile" value="javac1.4"
This is supposed to set the javac compiler to 1.4 for every javac task in the
rest of the build, but it just doesn't do anything. I've tried the <javac
compiler.../> task also, with no luck. Any help or suggestions would be great,
i'm a complete novice and have been stuck at this for two days now - colleagues
have been no help either!
Frances