1
votes

In Eclipse, I am trying to import an existing Maven Project that runs on Websphere Application Server. (I have websphere liberty profile server deployed in eclipse)

My pom.xml it is givng me the below error

Plugin execution not covered by lifecycle configuration: org.jacoco:jacoco-maven-plugin:0.7.1.201405082137:prepare-agent (execution: agent, phase: initialize).

Can anyone please help with this error.

P.S - I found in the below link that adding a dependency resolves the error but eclipse points to error in parent pom. So I am confused.

jacoco-maven-plugin causes site plugin to fail in multimodule project

1
Welcome to Stack Overflow! You might want to check out how to ask a question. Formatting your question correctly will go a long way to getting you the answer you are looking for.Gary Storey
Easiest way install jacoco plugin, it comes along with maven related plugins I believe, other way is modifying the your pom.xml(you can add the lifecycle defination where the plugin is defined) to define the lifecycle of the pluginKarthik Prasad
Thanks Gary,I will try to follow it from now on.Alekhya M
Hi Karthik,Thanks for the reply.There is jacoco dependency added in pom file.Should I still install jacoco plugin?Also could you be more specific please about where to add the lifecycle definition.Thanks a lot for your time..Alekhya M

1 Answers

1
votes

Install the jacoco dependency in pom.xml file. Also add the EclEMMA plugin from eclipse marketplace.The reason why you need the EclEMMA plugin is that "m2e" by default does not recognize the Jacoco Maven goal "prepare-agent". Restart Eclipse and then again import your project. This should solve your problem.