Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350136 - Dependency is added to the wrong pom
Summary: Dependency is added to the wrong pom
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Milos Kleint CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-23 08:46 EDT by Julien HENRY CLA
Modified: 2021-04-19 13:26 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 Julien HENRY CLA 2011-06-23 08:46:43 EDT
Build Identifier: 20110609-2236

When adding a dependency to a Maven project, the dependency is incorrectly added to the latest opened pom in the editor.

Reproducible: Always

Steps to Reproduce:
1. I have 2 Maven projects in my workspace.
2. Open the pom of project A in the editor
3. Right click on project B -> Maven -> Add dependency
4. Search a dependency in the dialog then OK
5. Dependency is added to project A !
Comment 1 Milos Kleint CLA 2011-06-23 12:36:31 EDT
the most likely culprit is MavenActionSupport.getPomFileFromPomEditorOrViewSelection()
Comment 2 Milos Kleint CLA 2011-06-27 03:16:31 EDT
http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=20333002e8e521f399d661449f4d05ba82447e2a

current selection needs to be processed primarily, the active editor is a relict of time when we had actions in main menu (and back even then it was wrong)
Comment 3 Denis Roy CLA 2021-04-19 13:26:04 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/