Why does my Maven build work perfectly fine on the command line but when I run in Eclipse, it requires I add this section to my pom.xml, otherwise I get this error:
Plugin execution not covered by lifecycle configuration
: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile
(execution: default-testCompile, phase: test-compile)
Isn't it strange that this occurs around the 'maven-compiler-plugin' plugin?? I cannot find another question like this anywhere on google, although I find many fix suggestions around 3rd party plugins. I've done a great deal of researching and searching and found no explanation of this, not even from here.
And the pom.xml required to fix this:
<!--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>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[3.1,)</versionRange>
<goals>
<goal>testCompile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
And , here is my simple project on GitHub if you want to see my source.
I finally solved it. It appears that the "pluginManagement" section I posted above is required by an Eclipse Maven project in general, even though I resisted it, and even though no documentation that I can find on the internet ever mentions this explicitly.
ALso, the "versionRange" in the lifecycle exclusion section seems to also require the version number of the "gmaven-plugin" rather than the "version of Maven" which I was trying to give it above.
<pluginExecutionFilter>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<versionRange>[1.5,)</versionRange>
<goals>
<goal>testCompile</goal>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
You may require an M2E "connector" to understand maven-compiler-plugin using the Eclipse (JDT) compiler.
Select "discover connectors" and choose M2E connector for Eclipse JDT compiler provided by JBoss, or install it manually.
M2E connector for the Eclipse JDT Compiler 1.0.1.201209200903
You may also be offered a Groovy connector -- maybe it uses similar technology under the hood? -- but unless you are using Groovy, it probably does not make sense to install such integration.
Help -> Install new Software
Install the Groovy Compiler 2.2 / 2.1 Feature
Install Groovy-Eclipse M2E integration
Window -> Preferences -> Maven -> Lifecycle Mappings -> Open workspace lifecycle mappings metadata
Add the following xml:
<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<versionRange>[1.3,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
Reload the Lifecycle Mappings and invoke a projekt update on your maven project. (ALT+F5)
Related
The Eclipse IDE requires the snippet below in the <pluginManagement> (details don't matter).
Is there a way to import such a Maven fragment from another file? Does Maven have any macro/import/snippet/sub-pob support?
I would like to obtain this:
</pluginManagement>
<plugins>
...
<!-- import some plugin configurations from another file -->
<import from="another/file.pom.or.xml" />
</plugins>
</pluginManagement>
and another/file.pom.or.xml has the corresponding <plugin> definitions/configurations:
<plugin>
...
<plugin>
or
<plugins>
<plugin>
...
<plugin>
<plugins>
or whatever other form of file-based Maven pom import mechanism.
Details:
This is the snippet I would like to move out of the main Maven pom file:
<!--
This is in order to please the Eclipse m2e plugin:
https://stackoverflow.com/questions/7638562/import-maven-project-to-eclipse-and-fix-the-errors/8103824#8103824
Eclipse m2e complains that:
"Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-antrun-plugin:1.8:run (execution: default, phase: process-resources)"
Adapter the SO answer with the correct artifactId, versionRange and goals reported by the error.
-->
<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-antrun-plugin</artifactId>
<versionRange>[1.8,)</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
The reason is a religious one: InteliJ IDEA developers are fighting with the Eclipse IDE developers and don't accept an Eclipse-specific configuration to land in the code. Without that configuration, the Eclipse m2e would complain (and this is the single solution I found to fix that m2e error)
No, this is not possible. There were discussions about "mixins", but this not a feature at present or the foreseeable future.
We moved all plugin configuration to the company parent POM, so it remains more or less invisible to the mortal developer.
Furthermore, notice that modern m2e versions support tags like <?m2e ignore?> in the POM that allow for smoother configuration.
I've just downloaded the OEPE (Kepler) and installed m2e and m2e-wtp connectors.
I found out that under this path: Preferences ->Maven->Lifecycle mappings->Open workspace lifecycle mapping data there is a preconfigured xml file which says that maven should ignore the compile goal for AspectJ and I assume that's why the AspectJ runtime libraries are not added to the project hence the project is not recognized as an AspectJ project by eclipse.
<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<versionRange>1.6</versionRange>
<goals>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
I commented out these lines in the xml file and reloaded it once again.
Now the IDE does not ignore AspectJ plugin tag in the lifecycle but pom file is complaining that it cannot recognize the execution tag.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.4</version>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
Using indigo the m2e-wtp was able to recognize the <execution> tag for aspectj plugin and able to add the AspectJ runtime libraries
automatically to the project, though this is not the case in Kepler. (I think it is m2e-wtp's job to make an AspectJ project out of the pom but not quite sure.)
Btw. the how can I make things work like in Indigo?
I know I can right click on the project and convert it to aspect project in order to solve the problem but I want the IDE and plugins realize from the pom file that this project needs AspectJ jars. Any idea?
This is how I got it working, first verify you have installed AJDT support by installing "AspectJ Development Tools (AJDT)" and "AspectJ compiler for Eclipse" from the AJDT update site: http://download.eclipse.org/tools/ajdt/43/update
You can do this through the "Help / Install new software" menu item.
Then, install the M2E connector manually by installing AJDT M2E using this update site:
http://dist.springsource.org/release/AJDT/configurator/
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>
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
anyway it's too late but my solution was simple right-click on error-message in Eclipse and choosing Quick Fix >> Ignore for every pom with such errors
Eclipse has got the concept of incremental builds.This is incredibly useful as it saves a lot of time.
How is this Useful
Say you just changed a single .java file. The incremental builders will be able to compile the code without having to recompile everything(which will take more time).
Now what's the problem with Maven Plugins
Most of the maven plugins aren't designed for incremental builds and hence it creates trouble for m2e. m2e doesn't know if the plugin goal is something which is crucial or if it is irrelevant. If it just executes every plugin when a single file changes, it's gonna take lots of time.
This is the reason why m2e relies on metadata information to figure out how the execution should be handled. m2e has come up with different options to provide this metadata information and the order of preference is as below(highest to lowest)
pom.xml file of the project
parent, grand-parent and so on pom.xml files
[m2e 1.2+] workspace preferences
installed m2e extensions
[m2e 1.1+] lifecycle mapping metadata provided by maven plugin
default lifecycle mapping metadata shipped with m2e
1,2 refers to specifying pluginManagement section in the tag of your pom file or any of it's parents. M2E reads this configuration to configure the project.Below snippet instructs m2e to ignore the jslint and compress goals of the yuicompressor-maven-plugin
<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.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>compress</goal>
<goal>jslint</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
3) In case you don't prefer polluting your pom file with this metadata, you can store this in an external XML file(option 3). Below is a sample mapping file which instructs m2e to ignore the jslint and compress goals of the yuicompressor-maven-plugin
<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>compress</goal>
<goal>jslint</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
4) In case you don't like any of these 3 options, you can use an m2e connector(extension) for the maven plugin.The connector will in turn provide the metadata to m2e. You can see an example of the metadata information within a connector at this link . You might have noticed that the metadata refers to a configurator. This simply means that m2e will delegate the responsibility to that particular java class supplied by the extension author.The configurator can configure the project(like say add additional source folders etc) and decide whether to execute the actual maven plugin during an incremental build(if not properly managed within the configurator, it can lead to endless project builds)
Refer these links for an example of the configuratior(link1,link2). So in case the plugin is something which can be managed via an external connector then you can install it. m2e maintains a list of such connectors contributed by other developers.This is known as the discovery catalog. m2e will prompt you to install a connector if you don't already have any lifecycle mapping metadata for the execution through any of the options(1-6) and the discovery catalog has got some extension which can manage the execution.
The below image shows how m2e prompts you to install the connector for the build-helper-maven-plugin.
.
5)m2e encourages the plugin authors to support incremental build and supply lifecycle mapping within the maven-plugin itself.This would mean that users won't have to use any additional lifecycle mappings or connectors.Some plugin authors have already implemented this
6) By default m2e holds the lifecycle mapping metadata for most of the commonly used plugins like the maven-compiler-plugin and many others.
Now back to the question :You can probably just provide an ignore life cycle mapping in 1, 2 or 3 for that specific goal which is creating trouble for you.
A good workaround to remind you that m2e could be better configured, without the project inheriting a false positive error marker, is to just downgrade those errors to warnings:
Window -> Preferences -> Maven -> Errors/Warnings -> Plugin execution not covered by lifecycle configuration = Warning
I tried to execute specific plugging right after clean up i.e. post-clean (default is clean phase). This worked for me with eclipse indigo. Just added post-clean resolved the problem for me.
<executions>
<execution>
<configuration>
</configuration>
<phase>post-clean</phase>
<goals>
<goal>update-widgetset</goal>
</goals>
</execution>
</executions>
I was able to resolve the same problem with maven-antrun-plugin and jaxb2-maven-plugin in Eclipse Kepler 4.3 by appying this solution:
http://wiki.eclipse.org/M2E_plugin_execution_not_covered#Eclipse_4.2_add_default_mapping
So the content of my %elipse_workspace_name%/.metadata/.plugins/org.eclipse.m2e.core/lifecycle-mapping-metadata.xml is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<versionRange>1.3</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<versionRange>1.2</versionRange>
<goals>
<goal>xjc</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
*Had to restart Eclipse to see the errors gone.
As of Maven Eclipse (m2e) version 0.12 all Maven life-cycle goals must map to an installed m2e extension. In this case, the maven-ear-plugin had an-unmapped goal default-generate-application-xml.
You can exclude un-mapped life-cycle goals by simply following the instructions here:
https://wiki.eclipse.org/M2E_plugin_execution_not_covered
Alternatively, simply right-click on the error message in Eclipse and choosing Quick Fix -> Ignore for every pom with such errors.
You should be careful when ignoring life-cycle goals: typically goals do something useful and if you configure them to be ignored in Eclipse you may miss important build steps. You might also want to consider adding support to the Maven Eclipse EAR extension for the unmapped life-cycle goal.
With the mechanism explained in the answer of Jan I have instructed the m2e pluging to ignore the goal "generate-application-xml". This gets rid of the error and seems to work since m2e creates application.xml.
So basically the error forced us to decide which mechanism is in charge for generating application.xml when the Maven build runs inside Eclipse under the control of the m2e plugin. And we have decided that m2e is in charge.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.6</version>
<configuration>
<version>6</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
</configuration>
</plugin>
</plugins>
<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>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<versionRange>[2.1,)</versionRange>
<goals>
<goal>generate-application-xml</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>**
</plugins>
</pluginManagement>
</build>
You need to understand the content in M2E_plugin_execution_not_covered and follow the steps mentioned below:
Pick org.eclipse.m2e.lifecyclemapping.defaults jar from the eclipse plugin folder
Extract it and open lifecycle-mapping-metadata.xml where you can find all the pluginExecutions.
Add the pluginExecutions of your plugins which are shown as errors with <ignore/> under <action> tags.
eg: for write-project-properties error, add this snippet under the <pluginExecutions> section of the lifecycle-mapping-metadata.xml file:
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<versionRange>1.0-alpha-2</versionRange>
<goals>
<goal>write-project-properties</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
Replace that XML file in the JAR
Replace the updated JAR in Eclipse's plugin folder
Restart Eclipse
You should see no errors in the future for any project.
Even though the question is too old, but I would like to share the solution that worked for me because I already checked everything when it comes to this error. It was a pain, I spent two days trying and at the end the solution was:
update the M2e plugin in eclipse
clean and build again
I am trying to import a project into Spring Source Tool Suite (latest version).
The project was previously created from maven archetype cataloge.
I am getting the errors shown on the screenshot.
I was able to import the same project on a different machine but with the same maven repository (I copied the whole .m2 directory) without any problems.
Note: all of those tree bundles: com.springsource.bundlor.maven1.0.0.RELEASE, i18n-maven-plugin, maven-dependency-plugin are present in .m2/repository dir
Any idea on how to fix it?
screenshot with my error on the address below:
http://imageshack.us/photo/my-images/64/mavenpluginconnectors.png/
Your error has nothing to do with the project or the maven configuration. It has to do with the fact that the new versions of Eclipse have the M2E (previously known as M2Eclipse) project built into it now.
The new version has been improved so that as it imports your Maven project it reads the pom and properly sets up the Eclipse project. To do this it needs various connectors, most of which are already available and configured to do the Right Thing. However, your plugin executions have not been pre-configured and so you need to tell M2E what you want to have happen when Eclipse does a Maven build.
For me, I configured M2E to "ignore" these executions by adding the following to BuildManagement:
<plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<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-dependency-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>copy-dependencies</goal>
<goal>unpack</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<versionRange>[2.2,)</versionRange>
<goals>
<goal>hbm2ddl</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<versionRange>[4.0-RC2,)</versionRange>
<goals>
<goal>compile-swc</goal>
<goal>compile-swf</goal>
<goal>copy-flex-resources</goal>
<goal>generate</goal>
<goal>test-compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
Read all about it here:
How to solve "Plugin execution not covered by lifecycle configuration" for Spring Data Maven Builds
I ran into this issue as well. I found the problem was that my project required an older version of Maven than what came installed with eclipse.
In my case, eclipse came with version 3.3.3 installed. I needed version 3.0.5
I downloaded and installed the appropriate version of maven I needed and added it to eclipse by going to: preferences > maven > installations.
When you build, if you're building through eclipse, make sure to select the correct version of maven. You should have two to choose from now.
Run as -> Maven Build... -> Maven Runtime: *select the proper version*
You try creating new mavin project from IDE tool itself, it can pick available maven version by default. This way you can get rideoff this compiler time plugin errors.
After a long search for a JavaScript compressor I could use in Maven, I finally found one:
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<jswarn>false</jswarn>
</configuration>
</plugin>
Now in the latest version of m2e in Eclipse, I get the following error:
Plugin execution not covered by lifecycle configuration: net.alchim31.maven:yuicompressor-maven-plugin:1.1:compress (execution: default, phase: process-resources)
Lovely. I don't get it---it's just a plugin. Why can't m2e simply call any old plugin I have? What's wrong with this one? How do I fix this?
See http://wiki.eclipse.org/M2E_plugin_execution_not_covered
To solve some long-standing issues,
m2e 1.0 requires explicit instructions
what to do with all Maven plugins
bound to "interesting" phases (see M2E
interesting lifecycle phases) of
project build lifecycle. We call these
instructions "project build lifecycle
mapping" or simply "lifecycle mapping"
because they define how m2e maps
information from project pom.xml file
to Eclipse workspace project
configuration and behaviour during
Eclipse workspace build.
Project build lifecycle mapping
configuration can be specified in
project pom.xml, contributed by
Eclipse plugins and there is also
default configuration for some
commonly used Maven plugins shipped
with m2e. We call these "lifecycle
mapping metadata sources". m2e will
create error marker like below for all
plugin executions that do not have
lifecycle mapping in any of the
mapping metadata sources.
Plugin execution not covered by lifecycle configuration:
org.apache.maven.plugins:maven-antrun-plugin:1.3:run
(execution: generate-sources-input, phase: generate-sources)
m2e matches plugin
executions to actions using
combination of plugin groupId,
artifactId, version range and goal.
There are three basic actions that m2e
can be instructed to do with a plugin
execution -- ignore, execute and
delegate to a project configurator.
If you search around, you'll find a lot of links showing you how to suppress that error. However, I found a way to actually have the default Maven Project Builder execute these plugins within eclipse. The key is to change the <ignore> you find in many suggestions to <execute>. After adding this to my pom, I have automatic aggregation, compression, and deployment off of just a user saving a javascript resource:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
net.alchim31.maven
</groupId>
<artifactId>
yuicompressor-maven-plugin
</artifactId>
<versionRange>
[1.1,)
</versionRange>
<goals>
<goal>compress</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute></execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Maybe you have to provide the id and phase?
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>compressyui</id>
<phase>process-resources</phase>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<jswarn>false</jswarn>
</configuration>
</plugin>
At least i don't get that message with this configuration.