Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342768 - Adding a managed dependency in the POM editor adds version to that dependency
Summary: Adding a managed dependency in the POM editor adds version to that dependency
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: Matthew Piggott CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-13 16:54 EDT by Konrad Windszus CLA
Modified: 2021-04-19 13:22 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konrad Windszus CLA 2011-04-13 16:54:47 EDT
In the dependencies tab of the POM editor I click on Add and search for a dependency from the management section of the parent pom. The managed versions are displayed at the top of the result list, but adding one dependency also adds the version information to the POM, which should not be set, since the dependency is managed after all.
Comment 1 Daniel Serodio CLA 2011-04-18 13:16:56 EDT
I believe this is the correct behaviour, because depending on unversioned artifacts is bad.
Comment 2 Matthew Piggott CLA 2011-04-18 13:50:28 EDT
(In reply to comment #1)
> I believe this is the correct behaviour, because depending on unversioned
> artifacts is bad.

Wouldn't that defeat the purpose of dependencyManagement? :)  I will probably take a look this week and see if there is a good fix.  I imagine we introduced the problem when we moved from the EMF model.
Comment 3 Matthew Piggott CLA 2011-04-19 17:25:46 EDT
I've released a fix for this, still working on some tests

http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=c0c5ddb0a296fafdededd4756289fc84824d65cf
Comment 4 Matthew Piggott CLA 2011-04-20 11:44:06 EDT
Added tests for the three cases: unmanaged, managed, and overriding managed version
Comment 5 Denis Roy CLA 2021-04-19 13:22:49 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/