2

I’m upgrading an old Eclipse setup and ran into a strange issue with m2e workspace resolution.

I moved from Eclipse 2021 to Eclipse 2025.
I created a completely clean Eclipse installation and workspace, imported all my projects, and installed all required plugins.

However, I now have this problem:

  • Project A has a Maven dependency on Project B (declared in A's pom.xml)

  • If Project B is open in the workspace, then Project A cannot resolve imports or references to Project B

  • If Project B is closed, then Project A compiles fine (but now under Maven Dependencies the jar of Project B is present, not the project folder)

  • If I disable "Resolve dependencies from workspace projects" in Project A it also works, but this slows down development, as I have to build Project B after each change for Project A to pick up the changes.

So workspace resolution itself seems broken.

New contributor
toreitc is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
6
  • Did you try Alt + F5 ? Commented 2 days ago
  • Also try configuring Maven as an external tool rather than using the embedded one. (It works fine for me this way) Commented 2 days ago
  • Please provide a minimal reproducible example. If a project B depends on project A, then in project B can only access what has been exported by project A (see Java Build Path of project A, tab Order and Export). Commented 2 days ago
  • 2
    How are you determining that the imports and references are not being resolved? Is this because of red squiggles in the editor or because of listings in the Problems view(or Errors view). Hopefully the Problems view. Is "Build Automatically" on? Is having Project B closed(bullet point 3) also an undesirable situation like disabling "Resolve dependencies from workspace projects"? Commented 2 days ago
  • Some time such a config simply doesn't work even so everything is correctly configured. In such a case you can try to fix dependency problems by executing in the context menu Maven -> Maven Update -> Update all projects. Commented 2 days ago

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.