Jasper-report-maven-plugin
Jasper-report-maven-plugin copied to clipboard
Do you use any lifecycleMappingMetadata for m2e configuration of this plugin?
When this plugin in in a project in Eclipse with m2e, Eclipse will complain that "Plugin Execution not covered by lifecycle configuration".
Reason for this is here - https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html
You can set the lifecyclemappingmetadata to ignore this plugin (see below) which (correct me if I'm wrong), will prevent for example that if you bind the jasper goal to "compile", Eclipse will run the plugin's jasper goal when compiling the project.
I was wondering if other users have managed to create lifecycleMappingMetadata to bind the plugin to m2e's execution. If so, it might be useful to add to the plugin's documentation!
Example m2e mapping configuration that ignores this plugin:
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
com.alexnederlof
</groupId>
<artifactId>
jasperreports-plugin
</artifactId>
<versionRange>
[1.9,)
</versionRange>
<goals>
<goal>jasper</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
@mmalmeida
I was wondering if other users have managed to create lifecycleMappingMetadata to bind the plugin to m2e's execution. If so, it might be useful to add to the plugin's documentation!
If I get it right: you want the Eclipse build to compile .jrxml into .jasper, right?
You practically posted the answer, just change the xml snippet a bit, as well as talk about the M2E link you put here.
I tested it and it worked! Thank you for your post because it helped me.
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.alexnederlof</groupId>
<artifactId>jasperreports-plugin</artifactId>
<versionRange>[1.9,)</versionRange>
<goals>
<goal>jasper</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>false</runOnIncremental>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>