Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to load code using ant script based on baseline ?

I've been able to fetch all code(to be clear latest) using ant. What I want is to fetch the code incrementally.
Here's the script I use for now. What should I do to change the script to fetch code that delivered to stream since last baseline?



test.bat is the script to kick off ant.
@echo off
set ANT_HOME=C:\test_0503\apache-ant-1.9.4
set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_01
set PATH=%ANT_HOME%\bin;%JAVA_HOME%\bin;
ant -lib C:\test_0503\buildtoolkit -buildfile=C:\test_0503\build.xml -l C:\test_0503\build.log
echo "Start build..."
pause
The content of build.xml is as below, I used 2 tasks:teamFetch and teamAccept:

<project name="simpleRTCAntBuildExample" default="rtcFetchCode" basedir=".">

<import file="C:\test_0503\buildtoolkit\BuildToolkitTaskDefs.xml"/>

<taskdef name="teamFetch" classname="com.ibm.team.build.ant.task.TeamFetchTask" />
<taskdef name="teamAccept" classname="com.ibm.team.build.ant.task.TeamAcceptTask"/>   

<target name="init">
    <property name="repositoryAddress" value="https://www.hdyhuang.com:9443/ccm/" />
    <property name="rtc.username" value="admin1" />
    <property name="rtc.password" value="admin1" />
    <property name="rtc.workspace.name" value="project area_2.7.0_model Workspace" />
    <property name="deploy.checkout.dir" value="C:\test_0503\dir" />
</target>

<target name="rtcFetchCode"  depends="init">
    <teamAccept repositoryAddress="${repositoryAddress}"
                userId="${rtc.username}"
                password="${rtc.password}"
                workspaceName="${rtc.workspace.name}"
                changeSetFile="changeSets.txt"
                verbose="true" />
    <echo message="export from test_build_workspace"/>
    <teamFetch repositoryAddress="${repositoryAddress}"
                            userId="${rtc.username}"
                            password="${rtc.password}"
                            workspaceName="${rtc.workspace.name}"
                            destination="${deploy.checkout.dir}"
                            verbose="true" />                                     
</target>

</project>

0 votes


Accepted answer

Permanent link

 I think your best chance will be to use the SCM command line.



You should be able to use an exec task in ANT to run that.

Daisy Huang selected this answer as the correct answer

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,948

Question asked: May 10 '17, 2:50 a.m.

Question was seen: 1,990 times

Last updated: May 11 '17, 3:59 a.m.

Confirmation Cancel Confirm