Changing a build definition with the Java API
Hi. I'm writing a program to change a build definition trying to change a build def property (buildforge to jenkins).
Can anyone help with the error message (state id and item id) Thanks. regards Sola ---------------------- buildClient = (ITeamBuildClient) this.teamRepository.getClientLibrary(ITeamBuildClient.class); IBuildDefinition bd = buildClient.getBuildDefinition(bdName, rtc.getMonitor()); IBuildDefinition wc = (IBuildDefinition) bd.getWorkingCopy(); wc.setProperty("com.ibm.team.build.internal.template.id", "com.ibm.rational.connector.hudson.ui.buildDefinitionTemplate"); bd = buildClient.getBuildClient().save(bd, rtc.getMonitor()); throwing an exception for some missing values: java.lang.IllegalArgumentException: Item id and State id must not be null at com.ibm.team.repository.service.internal.RepositoryItemService.fetchState(RepositoryItemService.java:695) at sun.reflect.GeneratedMethodAccessor430.invoke(null) |
One answer
Sorry folks...spotted my mistake. sent the bdef instead of working copy to save.
|
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.