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

Bug 367758

Summary: Stale snapshot sources after "Update Dependencies..."
Product: z_Archived Reporter: Björn Thelberg <bjorn.thelberg>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED INVALID QA Contact:
Severity: minor    
Priority: P3 CC: Daniel.Ebert, igor, reto.hoehener, shca08-eclipse, shr31223
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Björn Thelberg CLA 2012-01-03 08:02:32 EST
Build Identifier: 20110916-0149

If there is a new snapshot version of one of my projects dependencies available in Nexus I can update the local repository (and Eclipse) by doing a "Maven->Update Dependencies..." and check "Force Update of Snapshots/Releases".
The pom and jar files are updated nicely but the sources jar is not updated until I right click the specific jar under "Maven Dependencies" and perform a "Maven->Download Sources".
Until that, the sources for that artifact in my local repsitory are from the first snapshot version I downloaded. I have the option "Download Artifact Sources" checked in the Maven preferences.

I am using m2e 1.0.100.20110804-1717 and have updated the Embedded Maven Runtime Bundle to version 1.0.1.201106291304.

Reproducible: Always

Steps to Reproduce:
1. Deploy a new snapshot version to the repository manager, for example add a method to an existing class.
2. In a project that depends on that snapshot do a "Maven->Update Dependencies..." and check "Force Update of Snapshots/Releases".
3. Try to call the new method from another class and verify that the jar is updated and it compiles. Sometimes a refresh on the project is needed to make Eclipse use the new version.
4. Open the class file with the new method in Eclipse (for example using "Navigate->Open Type...") and now observe that the change is not in the source code.
5. Look in the local repository folder and observe the old date on the sources jar. The pom and the jar are up to date.
6. Now right click the specific jar under "Maven Dependencies" and perform a "Maven->Download Sources" and hopefully the source is also updated. Sometimes the repository is updated but not the source in Eclipse. Here as well, a refresh on the project does the magic.
Comment 1 Igor Fedorenko CLA 2013-09-29 09:53:08 EDT
closing old/stale bugreports
Comment 2 Denis Roy CLA 2021-04-19 13:22:48 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/