Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Do you use any lifecycleMappingMetadata for m2e configuration of this plugin? #42

Open
mmalmeida opened this issue Aug 11, 2016 · 1 comment · Fixed by pro-crafting/Jasper-report-maven-plugin#14

Comments

@mmalmeida
Copy link
Contributor

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>
@mhagnumdw
Copy link

@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>

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

Successfully merging a pull request may close this issue.

2 participants