Can the rtc workspace be changed in a builddef using the java api
![]()
I can retrieve the builddef and its elements but I can find the workspace properties for the Jazz source control element.
|
2 answers
![]() Even if this is an old question, maybe somebody may find something similar to what I get, that is a bit different from the answer I read here.
I'm using RTC 4.0.7.
If I use getConfigurationPropertyValue I don't get the right property value, while everything works if I use directly getProperty.
I mean
String wrongResult = buildDefinition.getConfigurationPropertyValue(IJazzScmConfigurationElement.ELEMENT_ID, IJazzScmConfigurationElement.PROPERTY_WORKSPACE_UUID, null);
gives back "null" while
IBuildProperty rightResult = buildDefinition.getProperty(IJazzScmConfigurationElement.PROPERTY_WORKSPACE_UUID);
gives back a correct build property from which I may get name and value (getValue() and getName())
In particular if I want to investigate all the "IBuildConfigurationElement" of a Build definition I get a strange result.
With this code:
List<IBuildConfigurationElement> buildConfigurationElements = buildDefinition.getConfigurationElements();
I get this output:
+buildDefinitionn id==Build_CD_WEB_XCD_Copy== buildConfigurationElementt id==com.ibm.team.build.general== name ==General== +buildDefinitionn id==Build_CD_WEB_XCD_Copy== buildConfigurationElementt id==com.ibm.team.build.schedule== name ==Schedule== +buildDefinitionn id==Build_CD_WEB_XCD_Copy== buildConfigurationElementt id==com.ibm.team.build.properties== name ==Properties== +buildDefinitionn id==Build_CD_WEB_XCD_Copy== buildConfigurationElementt id==com.ibm.team.build.jazzscm== name ==Jazz Source Control== --configurationProperty name ==com.ibm.team.build.engine.variable.substitution== value==== +buildDefinitionn id==Build_CD_WEB_XCD_Copy== buildConfigurationElementt id==com.ibm.team.build.ant== name ==Ant== --configurationProperty name ==com.ibm.team.build.ant.buildFile== value==D:\C:\BUILD\ANT\dummy.xml== --configurationProperty name ==com.ibm.team.build.ant.targets== value==== --configurationProperty name ==com.ibm.team.build.ant.antArgs== value==-v -d== --configurationProperty name ==com.ibm.team.build.ant.antHome== value==== --configurationProperty name ==com.ibm.team.build.ant.javaHome== value==== --configurationProperty name ==com.ibm.team.build.ant.javaVMArgs== value==== --configurationProperty name ==com.ibm.team.build.ant.workingDir== value==${destDir}== --configurationProperty name ==com.ibm.team.build.ant.propertiesFile== value==${destDir}/fromRTC.properties== --configurationProperty name ==com.ibm.team.build.ant.includeToolkit== value==true== --configurationProperty name ==com.ibm.team.build.engine.variable.substitution== value====
so it seems to me that only "com.ibm.team.build.ant" aka "IAntConfigurationElement.ELEMENT_ID" has a structure for getting IBuildConfigurationElement
Comments Notice that this behavior is similar to what is written in Nick Edgar comment about "SCM workspace UUID" here: https://jazz.net/forum/questions/140583/copy-build-definition-error-help/140696 |
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.