Ant scripts cccheckin / cccheckout using CCRC plugin for eclipse?

Is it possible to use Ant scripts for validate / validate source code elements when using the CCRC plugin for eclipse? I am getting an error stating that the item trying to check is not part of a VOB, but of course it is and I can check it manually.

+2


source to share


2 answers


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:

+1


source


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

    , not cleartool

    .
  • Since it cleartool

    points to .exe, and rcleartool

    is the jar load bit, ProcessBuilder

    won't be able to handle the new command (I tested with rcleartool.bat

    and cmd \c rcleartool.bat

    ) unless you convert the jar to exe.
0


source







All Articles