Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2011-02-26 05:56:27 +0000
committerIgor Fedorenko2011-02-26 05:56:27 +0000
commit83bba72a8c3e6702df1f642be342c73296444796 (patch)
treec773b28f72f24e306bbcb6c3510dad896981dfc0 /org.eclipse.m2e.jdt/lifecycle-mapping-metadata.xml
parenteb6c4ed746a1eac5995b552585bef2e368f8a8a3 (diff)
downloadm2e-core-83bba72a8c3e6702df1f642be342c73296444796.tar.gz
m2e-core-83bba72a8c3e6702df1f642be342c73296444796.tar.xz
m2e-core-83bba72a8c3e6702df1f642be342c73296444796.zip
337010 better detect java projects
Java project project configurator is enabled for maven-compiler-plugin with compilerId=javac regardless of project packaging type. To allow such conditional enablement, introduced new optional <pluginExecutionFilter> <parameters> element. For example <parameters> <compilerId>javac</compilerId> </parameters> Current implementation uses string comparison to match parameter value, i.e. ``javac'', to the corresponding mojo execution configuration parameter, i.e. ``compilerId'', and ignored plugin execution mapping if values do not match. Additionally, relaxed requirement to have specific lifecycle mapping for project packaging type. New lifecycle mapping with id=DEFAULT will be used for projects without specific lifecycle mapping. Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
Diffstat (limited to 'org.eclipse.m2e.jdt/lifecycle-mapping-metadata.xml')
-rw-r--r--org.eclipse.m2e.jdt/lifecycle-mapping-metadata.xml41
1 files changed, 23 insertions, 18 deletions
diff --git a/org.eclipse.m2e.jdt/lifecycle-mapping-metadata.xml b/org.eclipse.m2e.jdt/lifecycle-mapping-metadata.xml
index eff31290..87300ed7 100644
--- a/org.eclipse.m2e.jdt/lifecycle-mapping-metadata.xml
+++ b/org.eclipse.m2e.jdt/lifecycle-mapping-metadata.xml
@@ -5,24 +5,29 @@
<lifecycleMapping>
<packagingType>jar</packagingType>
<lifecycleMappingId>org.eclipse.m2e.jdt.JarLifecycleMapping</lifecycleMappingId>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <versionRange>[2.0,)</versionRange>
- <goals>
- <goal>compile</goal>
- <goal>testCompile</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <configurator>
- <id>org.eclipse.m2e.jdt.javaConfigurator</id>
- </configurator>
- </action>
- </pluginExecution>
- </pluginExecutions>
</lifecycleMapping>
</lifecycleMappings>
+
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <versionRange>[2.0,)</versionRange>
+ <goals>
+ <goal>compile</goal>
+ <goal>testCompile</goal>
+ </goals>
+ <parameters>
+ <compilerId>javac</compilerId>
+ </parameters>
+ </pluginExecutionFilter>
+ <action>
+ <configurator>
+ <id>org.eclipse.m2e.jdt.javaConfigurator</id>
+ </configurator>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+
</lifecycleMappingMetadata>

Back to the top