Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350956 - Workspace resolution doesn't find newly opened projects
Summary: Workspace resolution doesn't find newly opened projects
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 350777 353082 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-01 13:58 EDT by Rich Seddon CLA
Modified: 2021-04-19 13:24 EDT (History)
3 users (show)

See Also:


Attachments
Sample project. (5.25 KB, application/zip)
2011-07-01 13:58 EDT, Rich Seddon CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rich Seddon CLA 2011-07-01 13:58:05 EDT
Created attachment 198982 [details]
Sample project.

Newly opened projects are not detected as workspace dependencies.

Sample attached.

1) Import the proejcts into M2E, observe that "bar" shows up as a workspace dependency of "foo".

2) Select "bar", and run a maven install.

3) Close "bar"

Observe that the "bar" dependency of "foo" is now resolving to the artifact in the local maven repository.

4) Open "bar"

The "bar" dependency of "foo" is incorrectly resolving to the local maven repository.

It seems the only way to fix this is to run a full build.
Comment 2 Igor Fedorenko CLA 2011-07-06 03:29:32 EDT
Forgot to mention, workaround is to Maven->UpdateDependencies on the projects being opened.
Comment 3 Aaron Digulla CLA 2011-07-08 10:50:19 EDT
I have the same problem even after updating to 1.0.100.201107060301.

I have three project A, B, C. A depends on B depends on C. All three are open. I close B and C. Then I open B again.

Before the update 1.0.100, I would get an error in "B" that C is missing. A would have no error but B would be resolved from the local repo and not from the workspace.

With 1.0.100, I get an error in "A" that "C" is missing but "B" is happy now.

Invoking "Maven->Update Dependencies..." on the broken project solved the problem.

Then I closed B. That gave me an error in A saying that "B" is missing. At this point, "Update Dependencies" didn't do anything. There are more projects in my workspace which depend in B but those did the switch. It seems this doesn't happen for all projects but only for some.
Comment 4 Aaron Digulla CLA 2011-07-08 10:52:08 EDT
Damn. I just noticed that I actually had the project B as a Java project dependency in B (it was in the .classpath).

Please ignore my last report; I'll come back if I get the error again.
Comment 5 Igor Fedorenko CLA 2011-07-26 04:29:45 EDT
*** Bug 353082 has been marked as a duplicate of this bug. ***
Comment 6 Igor Fedorenko CLA 2011-08-01 03:20:00 EDT
*** Bug 350777 has been marked as a duplicate of this bug. ***
Comment 7 Denis Roy CLA 2021-04-19 13:24:28 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/