Community
Participate
Working Groups
Created attachment 202506 [details] Sample Eclipse project We're using the jspc-maven-plugin plugin to pre-compile our JSP files before bundling these up in to a WAR file. By default, M2E gives the error "M2E plugin execution not covered", and as per the instructions at http://wiki.eclipse.org/M2E_plugin_execution_not_covered I'm documenting my findings here. Because the jsp compilation is not required for WTP to work within Eclipse, simply disabling the plugin is sufficient for everything to work nicely; <pluginManagement> <!-- Disable the jspc plugin when running in Eclipse --> <plugins> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.codehaus.mojo.jspc</groupId> <artifactId>jspc-maven-plugin</artifactId> <versionRange>[1.0.0,)</versionRange> <goals> <goal>compile</goal> </goals> </pluginExecutionFilter> <action> <ignore/> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> I've also attached a trivial project that demonstrates this behaviour - with the above configuration jspc-maven-plugin is ignored when running in Eclipse, but is correctly used to pre-compile the JSP files when the project is packaged using Maven.
Created attachment 203762 [details] Improved solution to the problem I've attached what I think is a better solution to the problem; The attached ZIP file has two profiles; one is activated outside of m2e, and pre-compiles the JSP pages and use the modified web.xml file in the WAR file. by having two profiles The other is activated when running with m2e; it has no settings, so uses the default of no-precompiled JSP pages and the original web.xml file. This works well; when running in Eclipse, the source JSP files are used, and when packaged, the pre-compiled ones are used.
closing old/stale bugreports
Moved to https://github.com/eclipse-m2e/m2e-core/issues/