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

Bug 340164

Summary: No obvious way to force dep updates, overriding Maven cached check time
Product: z_Archived Reporter: Jeff Jensen <jjensen>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: igor
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Jeff Jensen CLA 2011-03-16 10:31:14 EDT
Build Identifier: 20110301-1815

I couldn't determine a way to have m2eclipse obtain new dependencies.  My *uneducated guess* is it had marked the metadata as checked/not found, and the recheck time hadn't expired.  "Update dependencies" had no effect.

Using CLI and -U made it work.  Then the Eclipse builds were clean.

How this became a problem: I run Nexus locally on my laptop as a great way to speedup the dep and plugin checks both online and when disconnected.

Occasionally I forget to start it before launching Eclipse (I don't want it always running, so I manually start it).  Usually this is not a problem; typically m2eclipse still behaves well, even though I often restart Eclipse after starting Nexus as a precaution.

This time, there were framework and plugin dep version upgrades pulled from scm, so these versions were not in my local Maven repo nor the laptop Nexus repo.

There were lots of deps not found error messages in Maven console.

I started Nexus, but problems still existed.  I restarted Eclipse, but problems still existed.  I did Maven -> Update deps, and another option or two, but no change.  I also expired the cache on public and central repos on my local Nexus.  Eclipse builds still had missing deps.

I looked in my local Nexus repo and saw the deps were there.  I was confused as to why m2eclipse did not get them.

It made me think of the "not re-checking" until a timeout behavior, so I then simply ran "mvn -U compile" from the parent module CLI, and it "downloaded" them and the build was clean.

I then returned to Eclipse and it built clean as well.


Reproducible: Didn't try

Steps to Reproduce:
1.  Configure settings.xml to use an artifact manager, e.g. Nexus.
2.  Ensure some needed deps are missing from the local Maven repo.
3.  Ensure the same deps are missing from the artifact manager.
4.  Stop the artifact manager.
5.  Start Eclipse.
6.  Note the "can't find deps" messages in the Maven console.  For me, the list was huge, listing many deps (including ones I'm pretty sure the local repo had).
7.  Start the artifact manager.
8.  Try Maven -> Update dependencies on an Eclipse project that's missing them/build error.  Note the missing ones are still not found.

Restarting Eclipse does not resolve.

As an afterthought, my guess is a workaround is:
"Run-As -> Maven build..." and specify -U
but I didn't try it as CLI resolved it.
Comment 1 Igor Fedorenko CLA 2011-03-16 10:58:43 EDT

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