0

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.

Ram
  • 11
  • 2
  • 1
    First why is a maven-antrun-plugin seen in your post ...second why is the `-Dmaven.test.skip` option set ? To get code coverage you have to have unit tests running ..? – khmarbaise Apr 02 '22 at 16:17
  • Hi @khmarbaise, Yes the main issue is the jacoco report for the multi module maven application, I am not sure why maven-antrun-plugin is coming ...But the only issue is how to handle jacoco in the azure pipeline for multi-module maven application. – Ram Apr 02 '22 at 17:19
  • If you don't know why antrun is in there I would recommend to find out..second you should check the build locally first so see if jacoco reports are being built...Also I would check the the pipeline uses `mvn clean install` ? Is the `install`necessary? – khmarbaise Apr 02 '22 at 17:33
  • In local its working fine but in the azure pipeline when using maven task its getting an issue, below is the link where the same issue was faced : https://github.com/microsoft/azure-pipelines-tasks/issues/12067 – Ram Apr 02 '22 at 19:59

0 Answers0