Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 364032

Summary: Import Existing Maven Projects takes absolute path as Project location
Product: z_Archived Reporter: Konrad Windszus <konrad_w>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: chrislong, igor, st.mailinglists
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Konrad Windszus CLA 2011-11-17 08:49:53 EST
Whenever you have imported an existing maven project B which lies below your already existing maven project A (due to A being a multimodule project and B being a module of A), the reference to this project is stored as absolute path. 

This leads to problems if you move the whole workspace, because then only the original project A is found but not B, because the given absolute path does not exist anymore. Please always import projects with relative paths to prevent this behaviour.

This does also occur with the subversive-plugin when you checkout a complete multimodule maven project.
Comment 1 Igor Fedorenko CLA 2011-11-17 09:19:01 EST
I am not sure I understand what you mean. Can you please provide exact steps to reproduce the problem?
Comment 2 Konrad Windszus CLA 2011-11-17 10:06:39 EST
Here are the steps to reproduce:

1. Import a multimodule maven project into a clean Eclipse workspace
2. The root project and all submodules are correctly imported as separate projects within Eclipse.
2. Close Eclipse
3. Move the workspace folder to another location
4. Open the moved workspace in Eclipse

What you see is, that only the top project can be found anymore. This is due to 
the location of all other projects are given as absolute paths, although they should have been given as relative workspace paths, since the projects are within the workspace.

You can easily check by looking at the .metadata/.plugins/org.eclipse.core.resources/.projects/<projectname>/.location file within the workspace folder. There an absolute path is given.
Comment 3 Stefan Thurnherr CLA 2012-05-10 10:31:25 EDT
Discovered this today and happy that this bug report already exists.

Use case: Before we converted our project to a multi-module maven project, it was very easy to backup the Eclipse workspace, e.g. when testing Eclipse/Eclipse-plugins upgrades (shared Eclipse installation for many developers). Now that is not possible anymore.
Comment 4 Igor Fedorenko CLA 2013-09-29 09:51:03 EDT
closing old/stale bugreports
Comment 5 Denis Roy CLA 2021-04-19 13:26:00 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/