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

Is possible to use LogPublisher classes in custom ant task?

Hi,
I've developed many ant tasks that connect to RTC through plain API and do things. What I'd like to do is to add some lines on Activities tab on the build result. I know that the build toolkit provides a specific task for this (logPublisher) but I'd like to push many activities from my specific task (otherwise I have to cut my task in more pieces and use publisher task between them with low performances).

Is it possible?
Which classes could I use?

Thanks,
Michele.

0 votes

Comments

You are mixing some build terminology.  Are you talking about contributing logs or contributing activities?   The activities are what appear in the activities tab and are just logical components of the build.  The logpublisher contributes logs to the build so you can read the logs as part of the build result.  Generally though you can only contribute one build log per logpublisher instance. 

Yeah, I was wrong. I was searching for adding activity lines to build results.

Just curious: what does your custom task do? 

A lot of stuff. I've many custom tasks to do specific things for customers: versioning of binaries produced by builds, delivery, creation of zip packages of modified files, creation or modify of existing work items. In many cases it is easier to create custom task than to use rest api from ant builds and deploy scripts. 


Accepted answer

Permanent link
Hi Michele,
If the existing Ant tasks don't cut it for you, the underlying Java client APIs are:
com.ibm.team.build.client.ITeamBuildClient.startBuildActivity(IBuildResultHandle, String, String, boolean, IProgressMonitor)
com.ibm.team.build.client.ITeamBuildClient.completeBuildActivity(IBuildResultHandle, String, IProgressMonitor)
where the ITeamBuildClient is obtained using:
com.ibm.team.build.client.ClientFactory.getTeamBuildClient(ITeamRepository)

Michele Pegoraro selected this answer as the correct answer

0 votes

Comments

Thanks, this is exactly what I was looking for.


Michele 


One other answer

Permanent link
 To add activites you would need to use the startBuildActivity and completeActivity.  They are not really supposed to be used for bulk updates.  You can open as many activities as you would like, but only one per task, and then you can complete them.  But that somewhat loses the point of the activity.  They are supposed to mark build activity, so they are supposed to be split up among the build activities you are trying to track.

~Spencer

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,938
× 25

Question asked: Sep 17 '12, 4:35 a.m.

Question was seen: 5,426 times

Last updated: Aug 01 '13, 3:19 a.m.

Confirmation Cancel Confirm