It's all about the answers!

Ask a question

Is there a way to pull the change log automatically?

jeff mccallum (302912) | asked Sep 16 '14, 3:26 p.m.
 I would like to download via API or any other method the change log of a build. 
Is this possible?

One answer

permanent link
Winston Enos (33116) | answered Sep 16 '14, 5:34 p.m.

RTC has 2 ways (assuming you are tracking your builds in RTC at the JBE/snapshot level):

1. There is an Ant task for generating a changelog documented at:

2. The RTC command-line 'diff' option:

I'm assuing by 'automatically' you want a non-interactive (headless) way or generating this changelog for traceability purposes. I believe the SCM command-line and Ant task source code is in the RTC SDK (could be wrong, I've read this in other forum posts) so you can peek that for a native Java way of working with it.

jeff mccallum commented Sep 16 '14, 6:49 p.m.


Thanks so much for the reply.

This could be exactly what I want.

I am having an issue though. 
I call the script like this:
C:\open\jazz_ant>ant -v -f test.xml -lib c:\open\jazz_ant\buildtoolkit

And I get:
C:\open\jazz_ant\test.xml:14: Problem: failed to create task or type generateChangeLog
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.


Total time: 0 seconds

Winston Enos commented Sep 17 '14, 9:51 a.m.


You have to do 2 things to pull in the RTC Ant tasks:

1. The first is expose the RTC Ant jars to Ant's classpath, which you have done above with the '-lib' argument.

2. Then inside your Ant script you have to use <taskdef> on BuildToolkitTaskDefs.xml to actually load the Ant tasks during Ant runtime, just as you would anything else like ant-contrib.
This is in the documentation at:

To use these Ant tasks in your scripts, from installdir/buildsystem/buildtoolkit/BuildToolkitTaskDefs.xml, where installdir is the location where you installed the Ant build toolkit, copy the various taskdef entries in the BuildToolkitTaskDefs.xml file to your project's Ant script. You can also use your Ant script to import the taskdef file.

Your answer

Register or 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.