<?xml version="1.0"?>
<project name="ccant" basedir="." default="cc-tasks"
xmlns:ca="antlib:net.sourceforge.clearantlib">
<property name="dir.dist" value="dist"/>
<property name="name.BL1" value="CCANT_01@\CCAntVOB"/>
<property name="name.BL2" value="CCANT_02@\CCAntVOB"/>
<property name="name.BL2" value="CCANT_XX@\CCAntVOB"/>
<property name="test.label" value="TESTLABEL@\CCAntVOB"/>
<property name="test.file" value="C:\\Views\\ccant_user_view\\CCAntVOB\\ccant\\a.java"/>
<property name="dir.stage" value="C:\\Views\\ccant_user_view\\CCAntVOB\\ccant\\ccstage"/>
<target name="cc-tasks">
<!-- get the version of ClearCase that is installed -->
<ca:ccversion ccversionproperty="ccversion"/>
<echo>Running ClearCase version ${ccversion}</echo>
<ca:ccavailable property="label.exists" objselector="lbtype:${test.label}"/>
<echoproperties prefix="label"/>
<!-- create a new label and apply -->
<ca:ccexec failonerror="true">
<!-- create a new label type -->
<arg value="mklbtype"/>
<arg line='-c "Automatic test label"'/>
<arg value="${test.label}"/>
</ca:ccexec>
<ca:ccexec failonerror="true">
<!-- apply the label -->
<arg value="mklabel"/>
<arg value="-replace"/>
<arg value="${test.label}"/>
<arg value="${test.file}"/>
</ca:ccexec>
<ca:ccavailable property="label.exists" objselector="lbtype:${test.label}"/>
<echoproperties prefix="label"/>
<!-- display details on a set of files - using fileset -->
<ca:ccapply failonerror="true">
<arg value="describe"/>
<arg line="-fmt '%En - %l'"/>
<fileset dir="." casesensitive="yes">
<include name="**/*.java"/>
</fileset>
</ca:ccapply>
<!-- remove the label type-->
<ca:ccexec failonerror="true">
<arg value="rmtype"/>
<arg line="-force -rmall"/>
<arg value="lbtype:${test.label}"/>
</ca:ccexec>
<!-- apply a baseline and promote it to BUILT -->
<ca:applybl baselineselector="${name.BL2}" pvob="\CCAntVOB"
plevel="BUILT" createdproperty="ccblapplied"
failonerror="true"/>
<!-- fail in baseline wasn't applied -->
<fail unless="ccblapplied" message="Error: couldn't create baseline"/>
<!-- execute a label report (and transform) -->
<ca:cclabelreport labelselector="${name.BL2}" startlocation="."
outfile="cclabelreport.xml" failonerror="true"/>
<style in="cclabelreport.xml" out="cclabelreport.html"
style="[path_to]/etc/ccblreport.xsl">
</style>
<!-- execute a bl report (and transform) -->
<ca:ccblreport baselineselector="${name.BL2}" contributors="true"
outfile="ccblreport.xml" failonerror="true"/>
<style in="ccblreport.xml" out="ccblreport.html"
style="[path_to]/etc/ccblreport.xsl">
</style>
<!-- execute a difflabel report (and transform) -->
<ca:ccdifflabelreport labelselector1="${name.BL1}"
labelselector2="${name.BL2}" outfile="ccdifflabelreport.xml"
failonerror="true"/>
<style in="ccdifflabelreport.xml" out="ccdifflabelreport.html"
style="[path_to]/etc/ccdiffblreport.xsl">
</style>
<!-- execute a diffbl report (and transform) -->
<ca:ccdiffblreport baselineselector1="${name.BL1}" versions="true"
baselineselector2="${name.BL2}" outfile="ccdiffblreport.xml"
failonerror="true"/>
<style in="ccdiffblreport.xml" out="ccdiffblreport.html"
style="[path_to]/etc/ccdiffblreport.xsl">
</style>
<!-- stage a set of filesystem objects -->
<ca:ccstage todir="${dir.stage}" outfile="ccstage.xml"
failonerror="true">
<fileset dir="${dir.dist}">
<include name="**/*.jar"/>
</fileset>
</ca:ccstage>
</target>
</project>