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

Bug 340514

Summary: m2e not detecting lifecycle mapping metadata
Product: z_Archived Reporter: Ricardo Gladwell <ricardo>
Component: m2eAssignee: Paul Tatavu <vladt>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: igor, ricardo, vladt
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Test output log
none
Sampe project source none

Description Ricardo Gladwell CLA 2011-03-20 11:44:29 EDT
Created attachment 191576 [details]
Test output log

Despite adding the org.eclipse.m2e.core.lifecycleMappingMetadataSource extension point and a lifecycle-mapping-metadata.xml to my tycho Eclipse plug-in project I still can't get m2e to call my project configurator.

Please see attached sample project and sample test log.

Code is also available from here:

http://svn.codespot.com/a/eclipselabs.org/m2eclipse-android-integration/trunk/
Comment 1 Ricardo Gladwell CLA 2011-03-20 11:46:03 EDT
Created attachment 191577 [details]
Sampe project source
Comment 2 Igor Fedorenko CLA 2011-03-20 13:13:24 EDT
You seem to have attached m2eclipse-android-integration zipped sources, but we need a sample project (eg, packaging=apk) and steps to reproduce "m2e does not call com.googlecode.eclipse.m2e.android.androidDevelopmentToolsProjectConfigurator project configurator" problem.
Comment 3 Paul Tatavu CLA 2011-03-25 18:14:15 EDT
There are two problems:
1. The com.googlecode.eclipse.m2e.android/lifecycle-mapping-metadata.xml syntax is not correct: there is a pluginExecution element outside of the pluginExecutions element.
2. In com.googlecode.eclipse.m2e.android/plugin.xml, the com.googlecode.eclipse.m2e.android.androidDevelopmentToolsProjectConfigurator configurator is defined as secondary to org.eclipse.m2e.jdt.javaConfigurator.  But org.eclipse.m2e.jdt.javaConfigurator is a project configurator for maven-compiler-plugin and com.googlecode.eclipse.m2e.android.androidDevelopmentToolsProjectConfigurator is a configurator for maven-android-plugin.  A primary and a secondary configurators must be associated with the same maven plugin.  Do you have a use case for having the primary and secondary configurators associated with different maven plugins?
Comment 4 Ricardo Gladwell CLA 2011-03-28 10:44:50 EDT
Thanks for the feedback, that seemed fixing both those problems seemed to fix the issue.


However, maybe m2eclipse should throw meaningful exceptions when invalid lifecycle-mapping-metadata.xml files are used?
Comment 5 Paul Tatavu CLA 2011-03-28 12:04:00 EDT
m2e logs the exception about the invalid lifecycle mapping metadata (from an extension in a bundle) as a warning.  Maybe we should log it as error...
Comment 6 Ricardo Gladwell CLA 2011-03-28 12:07:44 EDT
(In reply to comment #5)
> m2e logs the exception about the invalid lifecycle mapping metadata (from an
> extension in a bundle) as a warning.  Maybe we should log it as error...

Maybe this is an error for the m2e tycho plugin? Some sort of lifecycle-mapping-metadata.xml syntax checking?
Comment 7 Igor Fedorenko CLA 2011-03-28 12:50:59 EDT
I don't think m2e-tycho necessarily needs to do anything here, but lifecycle-mapping-metadata.xml syntax validation during cli build is something we wanted to add as part of our "m2e extension publishing" story. Not sure if we'll have time to do this for 1.0, so help will certainly be appreciated.
Comment 8 Denis Roy CLA 2021-04-19 13:26:49 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/