<ccavailable> Task
Task to verify the existence of a ClearCase object such as a branch or stream; can be used either as a task or condition.
 
Description

This task allows you to check for the existence of a ClearCase object, for example a branch, stream, label or baseline. For example, to check for the existence of the ClearCase label type REL_1 in the VOB \Projects, you would use the following:

<ccavailable objselector="lbtype:REL_1@\Projects"/>

You can use the task as part of any Ant condition , for more information see the examples below. The task will work with any ClearCase object selectors that can be specified by the ClearCase "describe" command (see "cleartool man describe" for further information).

Parameters
Attribute Description Type Requirement
failonerror Sets whether to fail with a build exception on error, or continue.
Default is false.
boolean Optional
objselector The ClearCase object selector to check for. String Required
 
Examples

The following snippet will check if the label REL_1 exists, failing the build if it is not:

    <project name="test" default="label-check"
xmlns:ca="antlib:net.sourceforge.clearantlib"> <target name="label-check"> <ca:ccavailable property="label.exists" objselector="lbtype:REL_1@\Projects"/> <fail unless="label.exists">Error object does not exist...</fail> </target> </project>
The following snippet will check for the existence of both the PROJ_REL_1 baseline and the proj_rel_1_bld stream, failing if either of the objects are not available :
    <condition property="objects.exist">
        <and>
            <ca:ccavailable objselector="baseline:PROJ_REL_1@\Projects"/>
            <ca:ccavailable objselector="stream:proj_rel_1_bld@\Projects"/>
        </and>
    </condition>
    <fail unless="objects.exist">Error object does not exist...</fail>
  

Copyright 2000-2006, Kevin Lee, Portions Apache Software Foundation