1

I'm encountering the following error:

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

I tried searching the internet but didn't get any sufficient responses and ideas to it

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
                       <artifactId>jacoco-maven-plugin</artifactId>
                       <version>0.7.4.201502262128</version>
        <configuration>
            <destFile>${basedir}/../../target/coverage-reports/jacoco_domain-rest-service.exec</destFile>
            <dataFile>${basedir}/../../target/coverage-reports/jacoco_domain-rest-service.exec</dataFile>
        </configuration>
        <executions>
            <execution>
                <id>jacoco-initialize</id>
                 <goals>
                  <goal>prepare-agent</goal>
                 </goals>
            </execution>
            <execution>
                <id>jacoco-site</id>
                <phase>package</phase>
                <goals>
                  <goal>report</goal>
                </goals>
            </execution>
        </executions>
      </plugin>
    </plugins>
</build>

Any help and suggestions much appreciated!

Thank you!

Chetan Hireholi
  • 79
  • 3
  • 13
  • Found an answer [here](http://stackoverflow.com/questions/14843892/jacoco-maven-plugin-plugin-execution-not-covered-by-lifecycle-configuration) Answered by @neurite – Chetan Hireholi May 18 '17 at 06:55

1 Answers1

1

smart987 says:

Replace the jacoco version part in pom.xml with the following it will work. I too faced the same issue and resolved with this and is working fine now.

<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.5.201505241946</version>

So delete the content in between version tags and replace that with .7.5.201505241946. It will work

Jeff Wang
  • 1,837
  • 1
  • 15
  • 29
LearnJ
  • 11
  • 3