It's all about the answers!

Ask a question

Creating a Jenkins build definition in RTC 5 by plain API?


Bryan Potere (1111) | asked Jun 16 '16, 11:10 a.m.
edited Jun 17 '16, 11:36 a.m. by David Lafreniere (4.8k7)
I am trying to create a build definition to RTC for a new Jenkins job using the plain API.  I found the information in this question from 2014 helpful to a certain point: https://jazz.net/forum/questions/137478/possible-to-create-hudsonjenkins-build-def-via-api

Using the code:
                IBuildDefinitionTemplate[] templates = BuildConfigurationRegistry.getInstance().getBuildDefinitionTemplates();
for (IBuildDefinitionTemplate t : templates) {
LOGGER.debug("Found template {}, {}", t.getName(), t.getId());
}

Like Todd I am able to see the Ant, Command line, Maven, Generic, and Jazz Build for Microsoft Visual Studio Solution templates.  I see in his solution that he was able to find the Jenkins template in the SDK jars:

com.ibm.rational.connector.hudson.client_1.0.400.v20130502_0139.jar
com.ibm.rational.connector.hudson.common_1.0.400.v20130430_2233.jar
com.ibm.rational.connector.hudson.ui_1.0.400.v20130502_0139.jar

I have attempted to add these from both the 4.0 and the 5.0 SDK to my project, but I am still unable to locate the Jenkins "com.ibm.rational.connector.hudson.ui.buildDefinitionTemplate" that Todd found.

Am I missing something obvious here, such as additional jars from the SDK required?

One answer



permanent link
sam detweiler (12.5k6195201) | answered Jun 16 '16, 1:08 p.m.
edited Jun 16 '16, 1:10 p.m.
see https://jazz.net/forum/questions/137478/possible-to-create-hudsonjenkins-build-def-via-api
net, the jenkins stuff is an extension to the base build engine/def stuff, so you have to include another couple jar files

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.