Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335368 - Manage Dependency when other editor is closed results in build error
Summary: Manage Dependency when other editor is closed results in build error
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Milos Kleint CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 14:15 EST by Matthew Piggott CLA
Modified: 2021-04-19 13:25 EDT (History)
2 users (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:15:04 EST
I have two projects, one is the parent of the other. 

With only the child project pom editor open, add a depedency then manage it with the parent pom.  This results in the error:
  Project build error: 'dependencies.dependency.version' for 
  org.apache.httpcomponents:httpclient:jar is missing.
Comment 1 Milos Kleint CLA 2011-01-27 04:44:28 EST
first I thought it's just a matter of command execution ordering but it's not that simple. It's EMF<->SSE bridging at it's best.. 
if you never open the parent file in current session, do the manage action then
1. if you open the parent file then, the changes are visible in the parent's ui/xml. but have not been persisted to file. (restarting the IDE will "remove" the entry from the file.
2. if you don't open it at all, save the child and just exit, the changes will not be there on restart in the parent file.

if you have the parent file opened, it will be modified and will be marked as such until you save. the change does propagate to file.
Comment 2 Milos Kleint CLA 2011-02-14 07:29:55 EST
reworked the managing of dependencies persistence level, relying on PomEdits class and editing of raw DOM model now). seems to fix the problem.
Comment 3 Pascal Rapicault CLA 2011-02-28 13:39:15 EST
.
Comment 4 Denis Roy CLA 2021-04-19 13:25:23 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/