How about something like:
 
<target name="Build" depends="DevBuild,UATBuild">
....
</target>
 
<target name="DevBuild" unless="build.num">
    <property name="project.base" value="C:\ProjHome\ViewName" />
</target>
 
<target name="DevBuild" if="build.num">
    <property name="project.base" value="c:\ProjHome\ViewName\BuildNum" />
</target>
 
I've got some configuration problems at the moment so I haven't actually typed this in, but its pretty similar to what I'm doing to control Unix vs. Windows builds.
 
-----Original Message-----
From: O'Hara, Patrick [mailto:patrick.ohara@workscape.com]
Sent: 04 June 2001 16:06
To: Ant User Mailing List (E-mail)
Subject: A Question about conditional property setup

I am using Ant 1.3 on Win2K to do both developer and release builds.  A Release build will have build.num set to the build number.  A Developer build will have build.num set to nothing.  I want to define a project.base property with the following characteristics:  If build.num is set the base should be C:\ProjHome\ViewName\BuildNum.  If build.num is set to nothing then the project.base should be C:\ProjHome\ViewName. 

I have looked at the if and unless attributes and I do not see a way to use these to set the value.  For now I am setting it with a environment variable.  Any help will be appreciated.

Patrick D O'Hara
N17 W24222 Riverwood Dr,
Suite 330
Waukesha, WI 53188-1162
(262)408-3849
(262)408-3840 Fax



----------------------------------------------------------------------
If you have received this e-mail in error or wish to read our e-mail
disclaimer statement and monitoring policy, please refer to
http://www.drkw.com/disc/email/ or contact the sender.
----------------------------------------------------------------------