ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <>
Subject Re: Conditionals
Date Mon, 28 Feb 2005 18:13:56 GMT
Regarding the Ant way...

I could do what I want just by not defining a given property in my
properties file, that would be acceptable.  However, I encountered a
problem doing that...

The first task in my build bumps up a build number in the properties file.
 In doing so, it seems that any comments in the properties file are wiped
out.  I wouldn't want to do conditionals this way unles I could have a
comment that says "uncomment this for build type A, comment it for type

So, is there a way to get this task...

<propertyfile file="">
  <entry key="build_number" default="0" type="int" operation="+" value="1"
pattern="0000" />

To NOT wipe out my comments?  Thanks again, I'm learning alot :)

Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies

On Mon, February 28, 2005 1:07 pm, Matt Benson said:
> --- "Frank W. Zammetti" <> wrote:
>> Is it possible, and if so how, to do conditionals?
>> I'd like to have a way
>> basically on each task to say "if property A=value1,
>> then run this task,
>> otherwise don't".  I'm looking through the manual
>> now but haven't come
>> across what seems to fit the bill.
> As others have suggested, you can use ant-contrib's if
> task.  However, the "Ant way" to do this is described
> in the manual:
> HTH,
> Matt
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message