1
votes

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!

1
Found an answer here Answered by @neuriteChetan Hireholi

1 Answers

1
votes

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