<ccversion> Task
Task to retrieve the installed version and flavour of ClearCase; can be used either as an Ant task or condition.

This task allows you to retrieve the installed ClearCase version, e.g. 2003.06.15, and also flavour of ClearCase, i.e. whether ClearCase LT is installed or not. The version number and existence of ClearCase are retrieved as the properties that you specify. For example, to set the property " ccversion" to the ClearCase version and the property "cclt" if and only if ClearCase LT is installed, you would use the following:

<ccversion ccversionproperty="ccversion" ccltproperty="cclt"/>

You can also use the task as part of an Ant condition , for more information see the examples below.

Attribute Description Type Requirement
failonerror Sets whether to fail with a build exception on error, or continue.
Default is false.
boolean Optional
ccversionproperty The name of the property to put the version number in. String Required
ccltproperty The name of the property to put a value in if and only if ClearCase LT is installed. String Optional

The following snippet will check if full ClearCase is installed, failing the build if only ClearCase LT is available:

    <project name="test" default="cc-lt-check"
xmlns:ca="antlib:net.sourceforge.clearantlib"> <target name="cc-lt-check"> <ca:ccversion ccversionproperty="ccversion" ccltproperty="cclt"/> <fail if="cclt">Error: Full ClearCase is required ...</fail> <echo>Running ClearCase version ${ccversion}...</echo> </target> </project>

The following snippet executes the <ccversion> task as an Ant condition, failing if no version of ClearCase is available:
    <condition property="ccinstalled">
        <ca:ccversion ccversionproperty="ccversion" 
    <fail unless="ccinstalled">Error: ClearCase is not installed ...</fail>

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