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

Bug 350777

Summary: m2e refuses to update classpath
Product: z_Archived Reporter: Aaron Digulla <digulla>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: igor
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Aaron Digulla CLA 2011-06-30 04:03:14 EDT
I have an old Maven project which worked for two years. All of a sudden, I get this error:

The container 'Maven Dependencies' references non existing library '$HOME/.m2/repository/ch/qos/logback/logback-classic/0.9.28/logback-classic-0.9.28.jar'

There are two problems here:

1. The file exists, it's readable, the JAR archive is not corrupt and it contains the correct classes.

2. The project depends on version 0.9.29 which m2e shows when I switch to the "Dependency Hierarchy" view.

Before m2e 1.0, I could fix problems like this one by touching the pom.xml (add a space, delete it, save) or by executing "Update Project Configuration..." but both have no effect.

Update the config prints "2011-06-30 10:00:01,337 [Worker-0] INFO  o.e.m.c.u.i.UpdateConfigurationJob - Update completed: 0 sec" but doesn't do anything.

I tried to close and reopen the project without any luck. Restarting Eclipse has no effect.

As a last resort, I deleted the project and imported it again. This finally made m2e update the classpath.
Comment 1 Aaron Digulla CLA 2011-07-08 07:59:31 EDT
Maybe related: When I close a project and open it again, projects from the workspace are not resolved correctly anymore.

Say I have three projects A, B and C. A depends on B depends on C. All are open. I can see B and C in the "Maven Dependencies" of A.

I close B and C. I open B. Sometimes, B can't be compiled because "Project 'B' is missing required Java project 'C'" There is no way to get rid of the error but opening C.

If A compiles (it pulls B and C from the local m2 repo) and I open B, it doesn't appear on the classpath of A.

It seems that opening and closing projects fails to trigger a refresh of the m2e caches. Even restarting Eclipse doesn't help.

I'm using m2e 1.0.0-20110607-2117.

This bug was introduced in one of the last releases. I'm pretty sure I never saw this before June.
Comment 2 Igor Fedorenko CLA 2011-07-08 09:47:09 EDT
Problem with re-opened workspace project is bug 350956, which is supposed to be fixed already. Can you try m2e from [1] to see if it solves the original problem?


[1] https://repository.sonatype.org/content/repositories/forge-sites/m2e/1.0.100/N/LATEST/
Comment 3 Aaron Digulla CLA 2011-07-08 10:40:22 EDT
(In reply to comment #2)
> Problem with re-opened workspace project is bug 350956, which is supposed to be
> fixed already. Can you try m2e from [1] to see if it solves the original
> problem?
> 
> 
> [1]
> https://repository.sonatype.org/content/repositories/forge-sites/m2e/1.0.100/N/LATEST/

Well, it's different. I'll add my comments to bug 350956.
Comment 4 Igor Fedorenko CLA 2011-08-01 03:20:00 EDT
based on your comments, I assume this is a duplication of Bug 350956.

*** This bug has been marked as a duplicate of bug 350956 ***
Comment 5 Denis Roy CLA 2021-04-19 13:27:09 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/