It's all about the answers!

Ask a question

How to fix a eclipse project that was shared without the root folder?

William Foster (111) | asked Mar 25 '15, 1:45 p.m.
Hi, we have a situation where a developer managed to somehow share a project in RTC without the root project folder. So the component repository files look like this:


Note that the .project file has the proper project name but the root project folder is not in the repository. This causes issues when the code is checked out because there is no project folder so one must be chosen during import to your workspace.

We would like to fix this by sharing the root project folder and moving the sub items back within the project folder in the repository but we have not been able to find a way. Note that this has been like this for some time as well and we would like to preserve the history of these files if at all possible.

We tried sharing a new project in the component thinking we could then move the files into the new project (once shared) and that this refactoring would clean it up and preserve history but for whatever reason the tool will not allow us to share any new projects in this component.

We considered creating a new component and using "Move in repository" to try and address but we are not sure if this will allow us to move into the new folder and if it will keep the history....and we really don't to blindly do something that could break what we have.

Note we are using RSA/RAD with RTC 5 but when the code was original checked in we were using RTC 3.12.

Any suggestions would be greatly appreciated!

2 answers

permanent link
Lily Wang (4.9k714) | answered Mar 26 '15, 2:58 a.m.
Hi William,
To achieve "We would like to fix this by sharing the root project folder and moving the sub items back within the project folder in the repository", you can try:
1. In Eclipse, use "Load as" option to load the component. This will create a component root directory under the sandbox
2. In the component root directory, create a new project folder. Check-in the change.
3. Close Eclipse client.
4. Open command line, under the sandbox, using "scm move path" command to move the sub items to the project folder.
For example:
cd <sandbox>/<component-root-dir>
scm move path -r <repository> lib project-root/lib
(Refer to
5. Then you can launch RTC Eclipse again, and check-in the changes from Pending Changes view.
In this way the history of all files can be preserved.

Hope above is helpful.

William Foster commented Mar 27 '15, 12:29 p.m.

Hi Lilly, thank you for the suggestion. The scm Move command sounds perfect but I am stuck before that step.

For Step 1: The code is added to my workspace as a Java project with the name of the component (note the ,project file, etc. is checked into RTC...just not the root project folder) - correct?

For Step 2: After I create the new project, when you say "check-in change", I assume you mean "Share" the new project to add to RTC? If so, the problem is it will not let me share any new projects into the component. The error returned is: "Overlaps detected in the items to be shared". Note this happens if I use the real project name or a dummy name to try and bypass this error. I can only speculate that RTC know that the component is a project (at the root there is a .project file) so it will not let me create another project in the Component. Do you have any other suggestions? For example, could it work to create a new folder (rather than project) in the component, move everything to the folder as you described and then in RTC change to a Java project somehow?

Thanks for your help!

Lily Wang commented Apr 08 '15, 10:50 p.m.

Hi William,
Sorry for the late response.
For step1, when you load the component using "Load as...", please select "Load the selected folders but do not create Eclipse project". As we don't want to have another ".project" file created on component level.

For step 2, as we didn't create Eclipse project in step 1, so you couldn't see the component from Eclipse Package Explorer. You need to open Windows Explorer to manually create the new folder under the component root folder of the sandbox.
Then switch back to Eclipse client, and refresh the sandbox in "Pending Changes" view. You will see the new folder in "Unresolved" and you can check-in it.

permanent link
SEC Servizi (97122854) | answered Nov 22 '18, 10:41 a.m.


Component A
Component A
How to get it:
  1. Create new Eclipse project AA
  2. Check-in project AA to component A
  3. Load component A's root folders as Eclipse projects AB, AC etc. but not the project AA
  4. For each projects AB, AC etc. select Team -> Move in Reposiotry Workspace... and choose project AA under component A
  5. Undo unresolved i.e. the new .project files created for projects AB, AC etc.
  6. Load component A's root folder
  7. Move (i.e. cut & paste) files under project AA
  8. Check-in unresolved into change-set from 2.
  9. Deliver change-set from 2.

Your answer

Register or to post your answer.