Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Default lifecycle mapping should map org.bsc.maven:maven-processor-plugin process and process test to m2e-apt #35

Open
kwin opened this issue Sep 22, 2014 · 5 comments

Comments

@kwin
Copy link

kwin commented Sep 22, 2014

Currently there is no way to enforce the installation of m2e-apt through the pom.xml only. That would be possible with lifecycle-mapping. Could you make the m2e-apt Configurator the default for both goals of the maven-processor-plugin: https://maven-annotation-plugin.googlecode.com/svn/docs/plugin-info.html.
That way only a POM change will make every Eclipse user install that plugin automatically (similar to what is done for maven-bundle-plugin with the tycho m2e plugin

according mapping from the generated lifecycle mapping

 <pluginExecution>
          <pluginExecutionFilter>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <versionRange>[1.0.0,)</versionRange>
            <goals>
              <goal>manifest</goal>
              <goal>bundle</goal>
            </goals>
          </pluginExecutionFilter>
          <action>
            <configurator>
              <id>maven-bundle-plugin</id>
            </configurator>
          </action>
          <comment>source: extension(org.sonatype.tycho.m2e_0.6.0.201207302152),extension(org.apache.sling.ide.eclipse-m2e-ui_1.0.2)</comment>
        </pluginExecution>

What would be the appropriate comment to add to the lifecycle mapping to my own pom.xml to make it install that extension automatically?

@fbricon
Copy link
Member

fbricon commented Sep 22, 2014

Here's what I get when importing m2e-apt's test projects as Maven projects from https://github.com/jbosstools/m2e-apt/tree/master/org.jboss.tools.maven.apt.tests/projects

m2e-apt discovery
http://content.screencast.com/users/fbricon/folders/Jing/media/7867f7a3-d4b7-4a20-98f6-3c214dbddfb7/00000018.png

The discovery mechanism is not relying on the comment section in your pluginExecution block, but on m2e's discovery catalog, listing m2e-apt here : https://github.com/takari/m2e-discovery-catalog/blob/master/org.eclipse.m2e.discovery.oss/src/main/resources-filtered/connectors.xml#L935.

The catalog is built by reading m2e-apt's own lifecycle mapping definition https://github.com/jbosstools/m2e-apt/blob/master/org.jboss.tools.maven.apt.core/lifecycle-mapping-metadata.xml#L30

@kwin
Copy link
Author

kwin commented Sep 22, 2014

You are right, that is triggered during import. Any chance to get that dialog with just clicking on an existing Maven project and Maven->Update Project...?

@kwin
Copy link
Author

kwin commented Sep 22, 2014

Maybe you can add that information also to the readme, that this is the default plugin being installed in Eclipse whenever the maven-processor-plugin is found in a pom.xml.

@fbricon
Copy link
Member

fbricon commented Sep 22, 2014

Not sure that's a good idea, that'd likely slow down the update project mechanism.

Why don't you quick fix the "plugin execution not covered..." markers and select "Discover new m2e connectors"?

@mickaelistria
Copy link

m2e-apt's code is now included in https://github.com/eclipse-m2e/m2e-core , please consider reporting issue to https://github.com/eclipse-m2e/m2e-core/issues if it's still relevant.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants