Fixing Maven Execution Error Markers in Eclipse

A common problem I have with eclipse is adding plugins to my maven pom and seeing the dreaded red squiggly error line rear its ugly head. The accompanying text kindly informs me that “Plugin execution not covered by lifecycle configuration”.

This simply means that m2e (the eclipse maven integration) doesn’t know how to handle this plugin. I’ve found two ways to bypass this error. I’ll detail both methods below:

1. Bind to a different lifecycle phase

M2e only seems to be concerned by plugins bound to the “Compile” lifecycle phase or earlier. If possible, try binding your plugin executions to a later lifecycle phase. An example of this is below:


2. Exclude the plugin from M2e’s executions

By adding the following code, you can exclude plugins from M2e’s execution (this doesn’t affect your command line maven build)

<!-- Fix for certain plugins not being supported in eclipse. This gets rid of the error marker -->

                <ignore />

<!-- End Fix -->

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s