ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Using different compilers?
Date Wed, 02 May 2001 02:29:18 GMT
--- Dominic Pilbeam <dpilbeam@lvi.com> wrote:
> I'm attempting to create a build file which compiles Java source from
> several different directory trees using different compilers for each
> tree, puts all the class files into one directory tree and then jars
> them all.
> 
> So, I have a target, "target1" which compiles one tree using the JDK
> compiler, and another target, "target2" which compiles another tree
> using the Microsoft compiler.

You can use <antcall> to reset the value of build.compiler (passed to the
target using the <param> tag). If your other compiles are in different
build-files, use <ant> (with the <property> tag).

> Also, I am struggling with the syntax of referencing a target property
> within that target. For example, if I want to use the name of a target
> as part of an attribute of a nested element of that target how do I
> achieve this? i.e.
> 
> <target name="aName" depends="previousName"/>
> <vssget localPath="${src}" recursive="true" login="${vssLogin}"
>   vsspath="$/XXX" ssdir="${ssexe}"/>
> 
> I want the vssPath attribute to be the string literal "$/aName".

You'll need to use "$$" to get a literal "$". As for getting the target
name, you'd have to either hard-code it in the "vsspath" attr, or use a
property for both (although doing it the second way gets a little funky,
since apparently the logging doesn't resolve properties [the execution all
works, just the log message will have the property name instead of its
value].

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Mime
View raw message