Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335366 - XML Editor allows managed dependency with no version
Summary: XML Editor allows managed dependency with no version
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Milos Kleint CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 14:03 EST by Matthew Piggott CLA
Modified: 2021-04-19 13:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Piggott CLA 2011-01-25 14:03:50 EST
If the version associated with a managed dependency is removed there is no error or warning.

If a child relies on the dependency then the child has a build error:
  "Project build error: 'dependencies.dependency.version' for 
  org.apache.httpcomponents:httpclient:jar is missing."

If the child overrides the dependency then we have a warning: 
  Overriding managed version null for httpclient
Comment 1 Milos Kleint CLA 2011-01-26 09:25:27 EST
not sure I understand the problem. can you give steps to reproduce?

this could be related to https://issues.sonatype.org/browse/MNGECLIPSE-2636 in the sense that our project loading might swallow the warning emitted by maven (if there is any)
Comment 2 Matthew Piggott CLA 2011-01-26 10:45:08 EST
Sorry, I think I had a description of the setup in another bug.

Create a project and a module, add a dependency into the module then manage a dependency in the project and remove the version element.  At this point there should be a build error in the module but no problems marked in the project.

Add a version to the dependency in the module, and a warning marker is added for overriding version null.
Comment 3 Milos Kleint CLA 2011-08-05 08:37:54 EDT
http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=f59b86b5b44a0d2ada42f5fc35edc5817a785782

fixes the part of editor warning marker appearing for version null.

The missing marker for missing PM version is likely a consequence  of us reading the maven model with no validation.. in that sense this part is duplicate of #350466
Comment 4 Denis Roy CLA 2021-04-19 13:25:04 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/