According to m2e wiki:
m2e matches plugin executions to actions using combination of plugin groupId, artifactId, version range and goal. There are three basic actions that m2e can be instructed to do with a plugin execution -- ignore, execute and delegate to a project configurator.
Further I can read that to ignore a plugin I need to do:
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<versionRange>[2.0.5,)</versionRange>
<goals>
<goal>process</goal>
</goals>
</pluginExecutionFilter>
<action>
<delegate />
</action>
</pluginExecution>
So it seems logical that to delegate execution I should do the same but with:
<action>
<delegate />
</action>
But it doesn't work. I'm getting following error:
No enum constant org.eclipse.m2e.core.lifecyclemapping.model.PluginExecutionAction.delegate
So what is the way to delegate plugin execution? Should I just omit pluginExecution
element for plugins that I want to delegate?
Regarding to the M2E compatible maven plugins. There are only
1. <ignore/> mapping
2. <execute/> mapping
There is no mentioned tag for delegate.
If I understand correctly, It is a default configuration without any required configuration. It's just let the Eclipse M2E / M2E extension to decide. Please note, for me, I'm using the "m2e project configurators for Eclipse WTP" from JBoss for working with the web project. You may need to use some M2E extension which is matched with your requirement.
I always use the ignore for managing the customized resources and it work correctly.
Update:
At the Eclipse, please click menu Windows ---> preferences --> Maven ---> Discovery. Then click the "Open Catalog" button. The system will give you a list of extension (m2e connector) for installing. For example, there are the Android connector, antlr, AspectJ and so on. I hope that there may be an extension which will help you to achieve the requirement.