'Jacoco reports failing for maven multi module project in azure Devops pipeline

I have configured the azure pipeline for the maven multi-module project in azure Devops and Got the jacoco report error.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (default) on project VstsReport: An Ant BuildException has occured: Unable to read execution data file /__w/2/s/CCReport43F6D5EF/jacoco.exec [ERROR] around Ant part ...<report>... @ 8:11 in /__w/2/s/target/antrun/build-main.xml: /__w/2/s/CCReport43F6D5EF/jacoco.exec (No such file or directory) [ERROR] -> [Help 1]

And pipeline task :

task: Maven@3           
inputs:             
 mavenPomFile: 'pom.xml'             
 goals: 'clean install'             
 publishJUnitResults: true             
 testResultsFiles: '**/surefire-reports/TEST-*.xml'             
 codeCoverageToolOption: JaCoCo             
 javaHomeOption: 'JDKVersion'             
 mavenVersionOption: 'Default'             
 mavenAuthenticateFeed: false             
 effectivePomSkip: false             
 sonarQubeRunAnalysis: false             
 isJacocoCoverageReportXML: true             
 options: '-Dmaven.test.skip'

Any idea how to resolve the above issue.

I have tried adding the jacoco plugin and specifying the path but got no success.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source