Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin


I am unable to get code coverage report from SonarQube remaining issues has been passed except code coverage, so i added jacoco plugin in projcet pom.xml file but while running the maven build pipeline by added code coverage tool jacoco and enabled code analysis tool it is troughing error as Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (default) on project VstsReport: An Ant BuildException has occured: Error while creating report

could you please help me on this.

Thanks you…!

Hey there.

I suggest focusing on having a JaCoCo report produced successfully, and then worry about importing it into SonarQube. SonarQube just reads the report its given, it isn’t involved in producing it.

For example: you might want to look at the example given in the [jacoco] repository: jacoco/org.jacoco.examples/build at master · jacoco/jacoco · GitHub

it’s resolved, but code coverage report showing 9.1%, we are working with multi module java project i need to expose only module-2 on overall review code coverage instead of all modules. i am attaching details please find it below.

  1. build tool: azure devops
  2. build plugin: Maven
  3. sonarQube 9.9 LTS version

Could you please help me on this.

Setting Code Coverage Exclusions is documented here

But can you explain why you want to analyze all your code but only show coverage for module 2?

i don’t want to analyze all the modules, how can i skip the modules from the build test.

I’d really suggest searching around the documentation, like the docs on SonarScanner for Maven > Excluding a module from analysis!

can you give me the direct syntax with module-2 for analysis scope for code coverage exclusions.

Thanks Colin, Now issue got resolved, after added modules on analysis scope in SonarQube administration menu.

attaching path please find it below.

Administration–>configuration–>general settings–>analysis scope -->code coverage exclusions

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.