Define your build.xml like this. Use properties to define the
"executabe" and "compiler" parameters. You can then override these
values via the "-D" flag on the command line. If you don't specify any
overriding properties with the -D flag, it'll take the value in the
build.xml file.
<property name="executable"
value="/usr/jdk1.5.0_06/bin/javac"/>
<property name="compiler"
value="javac1.5"/>
<target name="all" depends="init">
<javac srcdir="${src}"
destdir="${build}"
executable="${executable}"
compiler="${compiler}">
<classpath>
<pathelement
location="/lib/opencsv-1.3/deploy/opencsv-1.3.jar"/>
</classpath>
</javac>
</target>
On Jan 11, 2008 11:06 AM, Todd Patrick <[EMAIL PROTECTED]> wrote:
> I have a simple target:
>
> <target name="all" depends="init">
> <javac srcdir="${src}"
> destdir="${build}"
> executable="/usr/jdk1.5.0_06/bin/javac"
> compiler="javac1.5">
> <classpath>
> <pathelement
> location="/lib/opencsv-1.3/deploy/opencsv-1.3.jar"/>
> </classpath>
> </javac>
> </target>
>
>
> In which I specify to use JDK 5 in the Javac Task.
>
> How do I specify the compiler on the cmd line and remove the following
> lines from the Javac Task:
>
> executable="/usr/jdk1.5.0_06/bin/javac"
> compiler="javac1.5"
>
>
> Thanks,
>
> --Todd
>
> -----------------------------------------
> NOTICE: This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized use, disclosure or distribution is
> prohibited. If you are not the intended recipient, please contact
> the sender by reply email and destroy all copies of the original
> message.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
--
David Weintraub
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]