It's all about the answers!

Ask a question

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


Jose Miguel Ordax Cassa (2.4k4126100) | asked Jun 01 '09, 7:51 a.m.
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.

2 answers



permanent link
Jose Miguel Ordax Cassa (2.4k4126100) | answered Jun 23 '09, 12:40 p.m.
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.

permanent link
Nick Edgar (6.5k711) | answered Jun 15 '09, 5:20 p.m.
JAZZ DEVELOPER
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 {
...
}
}


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.