ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <erikhatc...@earthlink.net>
Subject Re: Problems with different javac s in the same build.xml
Date Wed, 15 Aug 2001 14:33:10 GMT
They are, but you could get around it by using <antcall> which allows
overriding properties.   Try that in this case and I think it'll work.

    Erik


----- Original Message -----
From: "Jason Rogers" <jason.rogers@tumbleweed.com>
To: <ant-user@jakarta.apache.org>
Sent: Wednesday, August 15, 2001 5:32 AM
Subject: RE: Problems with different javac s in the same build.xml


I believe the props are immutable.

    > -----Original Message-----
    > From: Lars Henssen [mailto:lh_ant@gmx.de]
    > Sent: Wednesday, August 15, 2001 6:37 AM
    > To: ant-user@jakarta.apache.org
    > Subject: Problems with different javac s in the same build.xml
    >
    >
    > Hi everybody,
    >
    > I´m having a problem with different javac s in the same build.xml:
    >
    > My setup is as follows:
    >
    > - I´m building two applets with JNI / J/Direct support
    > for Netscape / IE.
    > - When using J/Direct, one has to use M$´s jvc (don´t
    > tell me about
    > standards, please - I know :-)).
    > - For the other part of the applet (the Netscape
    > classes), I need to use a
    > std. JDK javac (with JNI support).
    >
    > So in my build.xml I try to do this by setting
    > ${build.compiler} just before
    > compiling:
    >
    > <target name="netscapeCompile" depends="init">
    > <property name="build.compiler"  value="classic"/>
    > <javac srcdir="${src}"
    > destdir="${netscape.client.build}"
    > includes="myclasses/NS.java"
    > fork="yes">
    > <classpath>
    > <pathelement
    > path="${java.class.path}/"/>
    > <pathelement location="${nssec.jar}"/>
    > </classpath>
    > </javac>
    > </target>
    >
    > <target name="msieCompile" depends="init">
    > <property name="build.compiler"  value="microsoft"/>
    > <javac
    > srcdir="${src}"
    > destdir="${build}"
    > includes="myclasses/IE.java"
    > fork="yes"/>
    > </target>
    >
    > Nevertheless it always uses the same compiler when I use
    > both targets in the
    > same antrun (depending on the order of my targets - when
    > msieCompile is
    > triggered first, only jvc is used, when netscapeCompile
    > is triggered first, only
    > javac is used).
    >
    > - Is there maybe a problem with some sort of "caching" of the
    > "build.compiler" property ?
    > - Are different compilers in the same build.xml during
    > one antrun supported
    > ?
    > - Does it help to put the targets in separate files and
    > call them through
    > <ant> ?
    > - Or am I just using the commands a wrong way ?
    >
    > All comments are welcome.
    >
    > Lars Henssen
    >
    >
    >



Mime
View raw message