Ant scripts cccheckin / cccheckout using CCRC plugin for eclipse?
It should be possible to use those ClearCase Ant tasks with CCRC views ("web views" that are similar to snapshots)
A script how this 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 that your current directory is (in this script) just above where you update your CCRC web view "myView".
The only problems I am aware of are:
- if CCRC will try to check the replicated VOB file .
- if the parent directory of the file to check has been renamed from a different view
source to share
The ClearCase Ant tasks in VonC's answer use the cleartool
( getClearToolCommand()
in org.apache.tools.ant.taskdefs.optional.clearcase.ClearCase.java
) command . When I call an operation cleartool
, even from within or over a CCRC view, I get the error from the question.
Now (as several years have passed since VonC's answer) there is a CLRC CLI that can be used instead ( http://www-01.ibm.com/support/docview.wss?uid=swg24021929 by installing CCSHARED in the top level directory \ eclipse ). The commands are similar to the commands cleartool
, although there seems to be no UCM support to solve your validation problem, I first needed to set the activity on the thread using the CCCL eclipse plugin.
To get the CLI CLRC to work with ClearCase Ant tasks, you need to modify the task:
- Call
rcleartool
, notcleartool
. - Since it
cleartool
points to .exe, andrcleartool
is the jar load bit,ProcessBuilder
won't be able to handle the new command (I tested withrcleartool.bat
andcmd \c rcleartool.bat
) unless you convert the jar to exe.
source to share