<ccapplybl> Task
Task to apply a ClearCase baseline and promote it if required; can be used either as a task or condition.
Description

This task allows you to apply and promote a ClearCase baseline in one step. You can also configure whether the task checks for any existing baselines of the same name, and/or sets a property indicating whether the baseline was applied or not. This is useful where you want to introduce more logic in your build script depending on whether a baseline was applied or not, for example only creaing a report on the baselines contents if it was succesfully created. By default if a baseline of a particular name already exists, i.e. CCANT then ClearCase will automatically append a unique suffix, i.e. CCANT.123. By checking baseline names you can therefore use this task to prevent spurious suffixes.

Parameters
Attribute Description Type Requirement
failonerror Sets whether to fail with a build exception on error, or continue.
Default is false.
boolean Optional
baselineselector The name of the baseline to apply. String Required
pvob The UCM Project VOB the baseline is to be created in. String Required
full Specifies whether a Fully Labelled or Incremental baseline should be applied.
Default is false.
boolean Optional
plevel The promotion level to set the baseline to. String Optional
component The component to create the baseline in. String Optional
checkexists Specifies whether to check if the baseline name already exists, if so a new baseline will not be applied.
Default is false.
boolean Optional
createdproperty The name of a property to set (with true) if a baseline has been succesfully applied. String Optional
 
Examples

The following snippet will apply the fully labelled baseline CCANT1 and promote it to BUILT:

    <project name="test" default="apply-bl" 
     xmlns:ca="antlib:net.sourceforge.clearantlib">
        <target name="apply-bl">
            <ca:applybl baselineselector="CCANT1" 
             pvob="\Projects" full="true"
    	     plevel="BUILT"  
             failonerror="true"/>
        </target>
    </project>
The following snippet will try to apply the baseline CCANT1 and then check if it was succesful:
    <project name="test" default="apply-bl" 
     xmlns:ca="antlib:net.sourceforge.clearantlib">
        <target name="apply-bl">
            <ca:applybl baselineselector="CCANT1" 
             pvob="\Projects" checkexists="true"
             createdproperty="ccblexists" 
             failonerror="true"/>
            <fail unless="${ccblexists}">Baseline not applied</fail>
        </target>
    </project>

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