SCM add-comp
Hi, I'm using ant to delete and add components to a workspace. Getting an "Ambiguous component" error. Is there a way to identify rtc.component_1 + rtc.component_2 come from stream_a and the remaining components come from stream_b?
<exec executable="${rtc.scm}" failonerror="true">
<arg value="workspace"/>
<arg value="add-comp"/>
<arg value="-r"/>
<arg value="${rtc.login.alias}"/>
<arg value="${rtc.workspace}" />
<arg value="${rtc.component_1}" />
<arg value="${rtc.component_2}" />
<arg value="${rtc.component_3}" />
<arg value="${rtc.component_4}" />
<arg value="${rtc.component_5}" />
</exec>
<exec executable="${rtc.scm}" failonerror="true">
<arg value="workspace"/>
<arg value="add-comp"/>
<arg value="-r"/>
<arg value="${rtc.login.alias}"/>
<arg value="${rtc.workspace}" />
<arg value="${rtc.component_1}" />
<arg value="${rtc.component_2}" />
<arg value="${rtc.component_3}" />
<arg value="${rtc.component_4}" />
<arg value="${rtc.component_5}" />
</exec>
Accepted answer
As you might have figured out the error is caused if there are multiple components with the same name in the repository. One way to deal with this error is to provide an UUID. You can list the components of stream_a and stream_b to get the UUID. For ex: scm -u y list components <workspace name/uuid>
Comments
Evan Hughes
JAZZ DEVELOPER Feb 09 '15, 10:09 a.m.Out of curiosity, why are you adding/removing components from a workspace in a script?
Steven Drogoszewski
Feb 09 '15, 10:56 a.m.We refactored some code and I did not see refactored code in the WS until I deleted the component and added it back.
Evan Hughes
JAZZ DEVELOPER Feb 09 '15, 4:56 p.m.Thanks. So you don't run this script repeatedly?
Steven Drogoszewski
Feb 10 '15, 4:53 a.m.I had moved java code which was mistakenly placed in a resource folder to a src folder. The src folder did not exist at the time of move. I ran the build twice and there was no src directory on the server where the code was extracted to. Manually, I removed and added back the the component to the WS. Ran the build and scr directory was there.