Is it possible to use Ant scripts to checkin/checkout source code elements while using the CCRC plugin to eclipse? I am getting an error message saying that the element the script is attempting to check out is not part of the VOB, but of course it is there and I can check it out manually.
2 Answers
It should be possible to use those Ant ClearCase tasks with CCRC views ("web views" which are anologous to snapshot views)
A script like this one should work:
<project name="Testing ClearCase " default="CC" basedir=".">
<target name="CC">
<property name="FileSrc" value="MyView/MyVob/MyDir"/>
<property name="dist" value="dist"/>
<cccheckout viewpath="${FileSrc}/myFile"
reserved="false"
nowarn="true"
comment="Auto Build from script"
failonerr="false" />
<copy file="${dist}/myFile" tofile="${FileSrc}/myFile"/>
<cccheckin viewpath="${FileSrc}/myFile"
comment="Checked in by myFile.xml ANT script"
nowarn="false"
failonerr="false"
identical="true"/>
</target>
</project>
But you need to make sure your current directory is (in this script) just above where you update your web CCRC view "myView".
The only issues I know of are:
- if CCRC try to checkout a file of a replicated Vob.
- if the parent directory of a file to be checked-in was renamed from another view

- 76,436
- 32
- 213
- 198

- 1,262,500
- 529
- 4,410
- 5,250
The Ant ClearCase tasks in VonC's answer use the cleartool
command (getClearToolCommand()
in org.apache.tools.ant.taskdefs.optional.clearcase.ClearCase.java
). When I invoke a cleartool
operation, even from within or above the CCRC view, I get the error message from the question.
Now (as some years have passed since VonC's answer) there is a CCRC CLI that can be used instead (http://www-01.ibm.com/support/docview.wss?uid=swg24021929, setting CCSHARED to your top level \eclipse directory). The commands are similar to those provided by cleartool
, although as it appears not to support UCM to solve your problem of doing a check out I first had to set an activity on the stream using the CCRC eclipse plugin.
To get the CCRC CLI to work with the ant ClearCase tasks would require changing the task to:
- Call
rcleartool
rather thancleartool
. - Since
cleartool
points to an .exe andrcleartool
is a bat for loading a jar,ProcessBuilder
won't be able to process the new command (I tested withrcleartool.bat
andcmd \c rcleartool.bat
) unless you convert the jar to an exe.

- 2,069
- 24
- 43