ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Lochart" <>
Subject Re: fail if a property ( p4.needsresolve ) is set
Date Wed, 18 Aug 2004 19:37:18 GMT
The "if" test merely tests for the existence of a property, not its value.
You will need to restructure your build a bit to either only set/unset the
property as needed or have another target that sets a pseudo property if the
value of p4.needresolve is a 1 and then have "fail" test the pseudo

You can also use the ant-contrib "if" task


Now I've gained some understanding
Of the only world that we see.
Things that I once dreamed of
Have become reality.

These walls that still surround me
Still contain the same old me,
Just one more who's searching for
A world that ought to be.
----- Original Message ----- 
From: "jacques couzteau" <>
To: "Ant Users List" <>
Sent: Wednesday, August 18, 2004 3:28 PM
Subject: fail if a property ( p4.needsresolve ) is set

> Hi all,
> here is a simple qustion:
> I want my ant target to fail if a given property is set. to be more
> precise, I want my target to fail if my last submit to my
> perforce-depot has failed because a file needed to be resolved. In that
> case i can see that a file needed to resolve because the property
> 'p4.needsresolve' is set to 1.
> What i had in mind was the following:
> <fail message="Submit failed! Either one or both of the files
> 'ARMVer.h' and 'gen_version.h need to be resolved before submission.'"
> if="p4.needsresolve" />
> Unfortunately  the fail task is executed no matter what p4.needsresolve
> is set to.
> How can I accomplish my goal?
> tia
> jacques

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

View raw message