Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

maven - Plugin execution not covered by lifecycle configuration (JBossas 7 EAR archetype)

I am using Eclipse 3.7 Indigo with Maven M2E Plugin 1.0.100.

Using the JBoss 7.x JavaEE 6 EAR archetype, the pom for EAR is giving me this error:

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-ear-plugin:2.6:generate-application-xml (execution: default-generate-application-xml, phase: generate-resources)

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-ear-plugin</artifactId>
   <version>2.6</version>
   <configuration>
      <!-- Tell Maven we are using Java EE 6 -->
      <version>6</version>
      <!-- Use Java EE ear libraries as needed. Java EE ear libraries 
                  are in easy way to package any libraries needed in the ear, and automatically 
                  have any modules (EJB-JARs and WARs) use them -->
      <defaultLibBundleDir>lib</defaultLibBundleDir>
      <modules></modules>
   </configuration>
<plugin>
Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This is a "feature" of the M2E plugin that had been introduced a while ago. It's not directly related to the JBoss EAR plugin but also happens with most other Maven plugins.

If you have a plugin execution defined in your pom (like the execution of maven-ear-plugin:generate-application-xml), you also need to add additional config information for M2E that tells M2E what to do when the build is run in Eclipse, e.g. should the plugin execution be ignored or executed by M2E, should it be also done for incremental builds, ... If that information is missing, M2E complains about it by showing this error message:

"Plugin execution not covered by lifecycle configuration"

See here for a more detailed explanation and some sample config that needs to be added to the pom to make that error go away:

https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...