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

[Build] - Information about extending Post-Build options.

Hi, currently in RTC 2.0 we have two Post-Build options when defining
the ANT - Jazz Build Engine.

I would like to be able to add a new one for Static Analysis results. I
have been searching the web for information and samples about how to do
such kind of extension with no luck. I just found this Wiki page:
https://jazz.net/wiki/bin/view/Main/BuildJavaProgrammingExamples but it
doesn't cover this scenario.

Is there any document or URL where I can find more information?

Thanks in advance,

Chemi.

0 votes



2 answers

Permanent link
Hi Chemi, sorry for the delay.

You need to
- Add an extension to the com.ibm.team.build.common.buildConfigurationElements extension point. This allows the user to choose your build participant when configuring a build definition. This typically goes in a .common plug-in, shared between the UI and build engine. It also lists which properties are set by your configuration.

- Add an extension to the extension point: com.ibm.team.build.engine.buildEngineParticipants. This is the code that gets run as part of the build, and refers to the confiuration extension above. Specify POST_BUILD as the build phase.

- Implement your participant class, extending com.ibm.team.build.engine.AbstractPostBuildParticipant

Here are some snippets from the JUnit Publishing participant.

From /com.ibm.team.build.common/plugin.xml:


<extension
point="com.ibm.team.build.common.buildConfigurationElements">
<buildConfigurationElement
id="com.ibm.team.build.junit.publishing" buildPhase="POST_BUILD"
description="%JUnitPublishingConfigElementDescription"
name="%JUnitPublishingConfigElementName">
<configurationProperty name="com.ibm.team.build.junit.publishing.log"/>
<configurationProperty name="com.ibm.team.build.engine.variable.substitution"/>
</buildConfigurationElement>
</extension>


From /com.ibm.team.build.engine/plugin.xml:


<extension
point="com.ibm.team.build.engine.buildEngineParticipants">
<buildEngineParticipant
id="com.ibm.team.build.internal.engine.JUnitPublishingPostBuildParticipant"
class="com.ibm.team.build.internal.engine.JUnitPublishingPostBuildParticipant"
buildPhase="POST_BUILD"
configurationElementId="com.ibm.team.build.junit.publishing">
</buildEngineParticipant>
</extension>


From /com.ibm.team.build.engine/src/com/ibm/team/build/internal/engine/JUnitPublishingPostBuildParticipant.java:


...
import com.ibm.team.build.engine.AbstractPostBuildParticipant;
...
public class JUnitPublishingPostBuildParticipant extends AbstractPostBuildParticipant {

public BuildStatus postBuild(IProgressMonitor monitor) throws Exception {
...
}
}


0 votes


Permanent link
Thanks a lot Nick. I will try to get a closer look to your code.

I was trying to integrate Rational Software Analyzer with Build System
of RTC. Currently I have done already with RTC Build built-in
capabilities and ANT tasks but I wanted to get further in such
integration and get something similar to Rational Build Forge
integration (its own tab and content).

I am not aware of any plans for that in RSAR product so I will try to
play around with it although I am sure in the future there will be such
official and supported integration.

Thanks again,

Chemi.

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,950

Question asked: Jun 01 '09, 7:51 a.m.

Question was seen: 5,278 times

Last updated: Jun 01 '09, 7:51 a.m.

Confirmation Cancel Confirm