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

Bug 335366

Summary: XML Editor allows managed dependency with no version
Product: z_Archived Reporter: Matthew Piggott <matthew>
Component: m2eAssignee: Milos Kleint <mkleint>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mkleint
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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/