yashwanth balaji
yashwanth balaji

Reputation: 99

RTC checkout using Ant

Is there a way to checkout files from RTC using Ant scripts?. I have a scenario where i need to checkout the files from RTC and build an app using Ant.

Upvotes: 0

Views: 574

Answers (2)

Mikyjpeg
Mikyjpeg

Reputation: 1219

RTC does not have a "check-out" operation, which is implicit. It only has a check-in operation. If you want to get code from a repository workspace you can load it using scm command, as described before, or creating a java standalone using Plain API.

Upvotes: 2

VonC
VonC

Reputation: 1325137

It should be possible to invoke scm command through <exec> ant task.

You can see some examples in "Using the SCM Command Line Interface in builds"

<property name="run" value="/path/to/run_and_filter.pl"/>
<property name="scm" value="/path/to/scm"/>

<target name="__scm-checkin">
        <!-- Do the initial commit -->
        <exec executable="${run}" failonerror="true" outputproperty="cs">
            <arg value="${scm} --non-interactive -a n -u y checkin ${roots}"/>
            <arg value="      \(([^)]+)\)"/>
        </exec>

        <!-- Deliver -->
        <exec executable="${scm}" failonerror="true">
            <arg value="--non-interactive"/>
            <arg value="deliver"/>
            <arg value="${cs}"/>
        </exec>
</target>

Make sure to use scm though, not lscm which starts a damon and can cause the ant task to hang: see "Calling lscm.bat from a build script causes a hang".

Upvotes: 2

Related Questions