Page 1 of 1

javarebel-maven-plugin & antrun execution

Posted: Thu Sep 22, 2011 5:37 am
by sloin
Hey,

I modified build.properties, mvn install, everything is fine, but I have this problem with m2e

Plugin execution not covered by lifecycle configuration: org.zeroturnaround:javarebel-maven-plugin:1.0.5:generate (execution: generate-rebel-xml, phase: process-resources)

and the same error for maven-antrun-plugin or maven-war-plugin ...m2s doesn't agree with some plugins that have execution and it trows that error

which relates to http://wiki.eclipse.org/M2E_plugin_execution_not_covered

m2e - Maven Integration for Eclipse 1.0.100.20110804-1717
Eclipse Indigo 20110615-0604

It looks that without those pluginManagement changes to lifecycle-mapping it won't disappear...

Re: javarebel-maven-plugin & antrun execution

Posted: Sat Oct 08, 2011 3:20 am
by bgaillard
Hi, I have the same errors as yours.

You can add the following lines in the 'pluginManagement' section of the 'BrodleafCommerce' pom.xml file :

Code: Select all

 
<plugin>
    <groupId>org.eclipse.m2e</groupId>
    <artifactId>lifecycle-mapping</artifactId>
    <version>1.0.0</version>
    <configuration>
        <lifecycleMappingMetadata>
            <pluginExecutions>
                <pluginExecution>
                    <pluginExecutionFilter>
                        <groupId>org.zeroturnaround</groupId>
                        <artifactId>javarebel-maven-plugin</artifactId>
                        <versionRange>1.0.5</versionRange>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </pluginExecutionFilter>
                    <action>
                        <ignore />
                    </action>
                </pluginExecution>
            </pluginExecutions>
        </lifecycleMappingMetadata>
    </configuration>
</plugin>


This will make the Javarebel plugin error disappear, but their is still a Maven War Plugin error and an Ant run plugin error.

To remove the Maven Ant Run Plugin Error apply the patch 'broadleaf-usps-schemas.patch' I have provided in Jira: http://www.broadleafcommerce.org/jira/browse/BLC-108 (perhaps the first patch is also needed)

The last error to be fixed is the Maven War Plugin error of the 'broadleaf-demo' project.

I propose to delete the following lines from the 'broadleaf-demo' pom.xml file :

Code: Select all

<executions>
    <execution>
        <phase>compile</phase>
        <goals>
            <goal>exploded</goal>
        </goals>
    </execution>
</executions>


I think the exploded goal here is not needed because the GWT and the Jetty Maven plugins will work without.

To test (on the Broadleaf demo project) :
mvn clean install
mvn jetty:run
http://localhost:8080/broadleafdemo/welcome.htm or http://localhost:8080/broadleafdemo/admin.html

It should work.

Baptiste

Re: javarebel-maven-plugin & antrun execution

Posted: Sat Oct 08, 2011 10:52 am
by jefffischer
These items should be addressed as part of the resolution for http://www.broadleafcommerce.org/jira/browse/BLC-108

Re: javarebel-maven-plugin & antrun execution

Posted: Mon Oct 10, 2011 2:12 pm
by bgaillard
Hi Jeff,

I think compilation warnings in Eclipse should be addressed in a new issue because the issue "BLC-108" is dedicated to generated code problems.

Can I create a new issue and provide several patches to fix those Eclipse warning ?

For now I thinks those problems can be fixed quickly (and reported into a new issue in JIRA) :
- Their are Maven 3 warnings because some plugin versions have not been specified;
- The Javarebel plugin makes Eclipse generate an error because a M2e lifecyle mapping ignore should be specified
- Their is a Maven exploded War problem which should not be their
- Cobertura Maven plugin is defined in pluginManagement and plugins, this makes Eclipse generate a warning
- The version of BLC child projects should be inherited from the parent pom (this makes Eclipse m2e generate the following warning 'Version is duplicate of parent version')
- The group id of BLC child projects should be inherited from the parent pom (this makes Eclipse m2e generate the following warning 'GroupId is duplicate of parent groupId')
- BLC demo re defines the greenmail dependency version (this makes eclipse m2e generate the following warning 'Overriding managed version 1.3 for greenmail')
- BLC 'broadleaf-framework', 'broadleaf-instrument', 'integration' re defines the maven jar plugin version (this makes eclipse m2e generate the following warning 'Overriding managed version 2.3.2 for maven-jar-plugin')

Baptiste

Re: javarebel-maven-plugin & antrun execution

Posted: Tue Oct 11, 2011 10:07 am
by jefffischer
sure - go for it