easysoa / EasySOA

A light, collaborative platform to make Service Oriented Architecture simple.
http://www.easysoa.org
35 stars 8 forks source link

Nuxeo POMs + m2eclipse compatibility #93

Closed mkalam-alami closed 12 years ago

mkalam-alami commented 12 years ago

When importing Nuxeo sources as Maven projects in Eclipse, a few errors appear due to incompatibility with m2e.

maven-resources-plugin error

maven-resources-plugin prior to 2.4 is not supported by m2e. Use maven-resources-plugin version 2.4 or later.

Caused by nuxeo-ecm

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.3</version>
        </plugin>

maven-resources-plugin error

Plugin execution not covered by lifecycle configuration: net.java.maven-incremental-build:incremental-build-plugin:1.4:incremental-build (execution: default, phase: validate)

Caused by nuxeo-ecm

      <plugin>
        <groupId>net.java.maven-incremental-build</groupId>
        <artifactId>incremental-build-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>incremental-build</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

Hacked for our project by keeping a custome nuxeo-ecm project open in Eclipse, see: https://github.com/easysoa/EasySOA/tree/master/easysoa-registry/nuxeo-ecm

jcarsique commented 12 years ago

I guess we can easily upgrade maven-resources-plugin to 2.4 in Nuxeo, that's not a big deal.

About the incremental-build-plugin, it is required to fix a Maven 2.x issue: being able to build, cleaning a module only if there was changes in its sources. m2e should at least ignore it, if it's not able to manage it. That's more an issue with m2e configuration or implementation, than with incremental-build-plugin. I'll look for a fix or workaround...

mkalam-alami commented 12 years ago

Indeed m2e suggests to add this bit of config to ignore the incremental-build-plugin:

  <build>
    <pluginManagement>
      <plugins>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>net.java.maven-incremental-build</groupId>
                    <artifactId>incremental-build-plugin</artifactId>
                    <versionRange>[1.4,)</versionRange>
                    <goals>
                      <goal>incremental-build</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

Adding this to nuxeo-ecm should solve the problem.

jcarsique commented 12 years ago

That's perfect. https://jira.nuxeo.com/browse/NXP-8625