Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-10779

"Plugin execution not covered by lifecycle configuration" for maven-compiler-plugin when importing Seam 2.3 examples

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.Beta1
    • 3.3.0.M5
    • build, maven
    • None

      When importing Seam 2.3 examples (ex booking from http://anonsvn.jboss.org/repos/seam/branches/community/Seam_2_3/examples/booking/), Java projects are not configured properly and you get red error markers like

      Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (execution: default-compile, phase: compile)

      The problem is some parent configures the maven-compiler-plugin to use compilerId=eclipse, which is not supported out of the box by m2e (it only supports the default compilerId=javac).

      To fix this issue, you have to either :

      • Modify your parent pom.xml to map the compilerId=eclipse pluginExecution to the org.eclipse.m2e.jdt.javaConfigurator by adding
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.eclipse.m2e</groupId>
              <artifactId>lifecycle-mapping</artifactId>
              <version>1.0.0</version>
              <configuration>
                <lifecycleMappingMetadata>
                  <pluginExecutions>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <versionRange>[2.0,)</versionRange>
                        <goals>
                          <goal>compile</goal>
                          <goal>testCompile</goal>
                        </goals>
                      <parameters>
                        <compilerId>eclipse</compilerId>
                      </parameters>
                     </pluginExecutionFilter>
                     <action>
                       <configurator>
                         <id>org.eclipse.m2e.jdt.javaConfigurator</id>
                       </configurator>
                     </action>
                   </pluginExecution>
                  </pluginExecutions>
                </lifecycleMappingMetadata>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
        
      • or install m2e-jdt-compiler from http://download.jboss.org/jbosstools/builds/staging/m2e-jdt-compiler/all/repo/

      2nd option is obviously far less intrusive. It requires m2e-jdt-compiler to be made available from a stable URL and added as a build requirement.

              fbricon@redhat.com Fred Bricon
              fbricon@redhat.com Fred Bricon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: