ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Hebert" <>
Subject Re: How to initialize the value of a boolean property based on the output from Custom Java ANT task?
Date Wed, 03 May 2006 16:55:39 GMT
Here's what I do:

1) in your label task, add an attribute called 'outputproperty'.

2) in the label task's execute method, add this:

                    if (outputproperty != null) {
                        log("Setting output property to be: " +

isLabelFrozen is the result of your checking if the label is frozen.

3) you can then use the outputproperty in the "if/unless" attributes of a

<target name="checkout" if="someOutputProp"/>


On 5/2/06, John Sisson <> wrote:
> Surely the java task can create a property file for the host build.xml
> to read; a judicious hit of 'antcall' and 'depends' should be able to
> inhale it as needed
> js
> -----Original Message-----
> From: Guttula, Mohan []
> Sent: Tuesday, May 02, 2006 4:34 PM
> To: Ant Users List
> Subject: How to initialize the value of a boolean property based on the
> output from Custom Java ANT task?
> Hello All,
> I have a requirement of checking out files from StarTeam only if the
> Label is frozen.
> StarTeam Doesn't provide a way to check the Status of a Label (Frozen or
> not) using StarTeam Client. So I have written a Java class to get the
> status of label with Custom ANT Task. Now I have 2 tasks, one for Java
> and one for checkout.
> I want to know how I can initialize one of the build property based on
> the output from Custom Java (so that I can use the property value to
> invoke the checkout task). Is it possible?
> ----
> Output of the custom ANT Java task:
> labelFrozen:
> [labelStatus] Label Frozen: true
> ----
> I have attached the java class and build.xml for convenience.
> Thanks,
> Mohan
> **************************************************************
> This message, including any attachments, contains confidential
> information intended for a specific individual and purpose, and is
> protected by law. If you are not the intended recipient, please contact
> sender immediately by reply e-mail and destroy all copies. You are
> hereby notified that any disclosure, copying, or distribution of this
> message, or the taking of any action based on it, is strictly
> prohibited.
> **************************************************************

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message