It's all about the answers!

Ask a question

SCM add-comp


Steven Drogoszewski (524) | asked Feb 06 '15, 8:43 a.m.
edited Feb 06 '15, 10:18 a.m.
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>


Comments
Evan Hughes commented Feb 09 '15, 10:09 a.m.
JAZZ DEVELOPER

Out of curiosity, why are you adding/removing components from a workspace in a script?


Steven Drogoszewski commented 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 commented Feb 09 '15, 4:56 p.m.
JAZZ DEVELOPER

Thanks. So you don't run this script repeatedly?


I wonder if a reload would have gotten the content into your sandbox.


Steven Drogoszewski commented 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.    

Accepted answer


permanent link
Shashikant Padur (4.2k27) | answered Feb 08 '15, 9:54 p.m.
JAZZ DEVELOPER
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>

Steven Drogoszewski selected this answer as the correct answer

Comments
Steven Drogoszewski commented Feb 09 '15, 6:49 a.m.

Thank you Shashikant. I appreciate the help. Steve

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.