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

Bug 359789

Summary: Allow configuring lifecycle mapping outside POM
Product: z_Archived Reporter: Adrian Shum <adrianshum>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: igor
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Adrian Shum CLA 2011-10-04 03:00:30 EDT
Build Identifier: 

The current available way to customize the life cycle mapping, without writing new Project Configurator, is to add a bunch of config in POM for org.eclipse.m2e:lifecycle-mapping.  

However, it is not really a good idea to pollute the POM with IDE specific settings. And, the lifecycle mapping should depends more on the installation of Eclipse, instead of POM.  For example, it is totally reasonable that there are 2 developers having different eclipse plugins installed, one can make use of project configurator, while the other one decide he want to ignore certain maven plugin execution.  Current implementation of m2e seems unable to achieve this.

It will be much better if we can define the lifecycle mapping in Eclipse, either in the preference pane, or in a configuration file.

I am thinking if I can develop a custom m2e extension for this.  However, a brief search on the documentation seems suggest that, for an m2e extension, the mapped lifecycle is defined in a static lifecycle-mapping-metadata.xml.  Unless the extension can report its mapped lifecycle through runtime interface, there seems no way to make such kind of configuration possible.

Reproducible: Always
Comment 1 Igor Fedorenko CLA 2011-10-04 07:43:21 EDT
Although m2e development team does not have immediate plans to implement this feature, we'll review and accept a quality patch. 

Also see https://bugs.eclipse.org/bugs/show_bug.cgi?id=350414#c1 for downside of storing lifecycle mapping outside of pom.xml files.

*** This bug has been marked as a duplicate of bug 350414 ***
Comment 2 Denis Roy CLA 2021-04-19 13:26:46 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/