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

Bug 441506

Summary: LifecycleMappingMetadata cannot be resolved to a type after cloning and importing m2e-core
Product: z_Archived Reporter: Lars Vogel <Lars.Vogel>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: igor, Lars.Vogel
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Lars Vogel CLA 2014-08-11 08:54:04 EDT
I cloned m2e-core and imported the projects but I get lots of errors saying that LifecycleMappingMetadata cannot be resolved.

Looks like it should exists in org.eclipse.m2e.core, but the following Export-Package statements are also marked as error:
 org.eclipse.m2e.core.internal.lifecyclemapping.model;x-internal:=true,
 org.eclipse.m2e.core.internal.lifecyclemapping.model.io.xpp3;x-internal:=true,
Comment 1 Igor Fedorenko CLA 2014-08-11 09:00:40 EDT
Can you confirm you followed m2e development environment setup documented in https://wiki.eclipse.org/M2E_Development_Environment . These steps worked for m2e last time I tried them, so I'd like to understand what at what step there is a deviation.
Comment 2 Lars Vogel CLA 2014-08-11 09:09:25 EDT
(In reply to Igor Fedorenko from comment #1)
> Can you confirm you followed m2e development environment setup documented in
> https://wiki.eclipse.org/M2E_Development_Environment . These steps worked
> for m2e last time I tried them, so I'd like to understand what at what step
> there is a deviation.

Yes I did, I only skipped the clone and import of the m2e-core-tests plug-ins. I don't think core requires test.

Looks to me that LifecycleMappingMetadata, PluginExecutionMetadata and LifecycleMappingMetadataSource are missing in the core git repo / related projects.
Comment 3 Lars Vogel CLA 2014-08-11 09:10:48 EDT
Ah, and I used the Luna update site for installation of m2e. But as it installed m2e 1.5 this should be OK according to the wiki.
Comment 4 Igor Fedorenko CLA 2014-08-11 09:15:48 EDT
Project import dialog was supposed to offer installation of required m2e extensions, m2e/modello and m2e/tycho in particular (and probably few more, don't remember exact list). Can you confirm you allowed the installation and restarted Eclipse when requested?
Comment 5 Lars Vogel CLA 2014-08-11 09:27:36 EDT
(In reply to Igor Fedorenko from comment #4)
> Project import dialog was supposed to offer installation of required m2e
> extensions, m2e/modello and m2e/tycho in particular (and probably few more,
> don't remember exact list). Can you confirm you allowed the installation and
> restarted Eclipse when requested?

Yes, this popup come up at least 5 times. Can I retrigger it to ensure that I installed everything correctly?
Comment 6 Igor Fedorenko CLA 2014-08-11 09:31:34 EDT
(In reply to Lars Vogel from comment #5)
> (In reply to Igor Fedorenko from comment #4)
> > Project import dialog was supposed to offer installation of required m2e
> > extensions, m2e/modello and m2e/tycho in particular (and probably few more,
> > don't remember exact list). Can you confirm you allowed the installation and
> > restarted Eclipse when requested?
> 
> Yes, this popup come up at least 5 times. Can I retrigger it to ensure that
> I installed everything correctly?

This does not sound right. There should be single popup pre-populated with required m2e extensions. Any chance you can record a screencast of the import process?

If you just dismissed the popup, you should see "Plugin execution not covered" error marker on pom.xml file(s), there is a quick-fix associated with the error marker you can use to install required extensions.
Comment 7 Lars Vogel CLA 2014-08-11 09:48:25 EDT
(In reply to Igor Fedorenko from comment #6)
> This does not sound right. There should be single popup pre-populated with
> required m2e extensions. Any chance you can record a screencast of the
> import process?
> 
> If you just dismissed the popup, you should see "Plugin execution not
> covered" error marker on pom.xml file(s), there is a quick-fix associated
> with the error marker you can use to install required extensions.

I tried with a different workspace unfortunately now with a different error. Looks like the Git repo org.eclipse.m2e.workspace is also required, at least org.eclipse.m2e.core requires org.eclipse.m2e.workspace.cli which seems to be located in org.eclipse.m2e.workspace. Could you update the wiki if that is correct?
Comment 8 Lars Vogel CLA 2014-08-11 09:54:18 EDT
After I removed the imported m2e projects from the old workspace and re-imported them, the error went also away. 

Hard to reproduce, so I think we can close this, only the wiki needs update AFAICS looks like org.eclipse.m2e.workspace is also required.
Comment 9 Igor Fedorenko CLA 2014-08-14 14:14:27 EDT
Updated the wiki. Feel free to reopen if you can provide steps to reproduce  "LifecycleMappingMetadata cannot be resolved" problem.
Comment 10 Lars Vogel CLA 2015-07-29 15:31:22 EDT
I just had this error again. Initial imported reported lots of errors, after deleting the projects and re-importing them everything worked. Looks like the installation of the modules just before the project import.
Comment 11 Denis Roy CLA 2021-04-19 13:23:18 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/