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.
Asked
Active
Viewed 566 times
2 Answers
2
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".

VonC
- 1,262,500
- 529
- 4,410
- 5,250
2
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.

Mikyjpeg
- 1,179
- 1
- 13
- 39