1

Im testing a multi module maven project, where jacoco or sonar is not defined as part of the pom.xml, but during the command line invocation.

Problem being, Im not allowed to disturb the existing pom.xml to configure jacoco, that leaves me only with the command line options to generate the aggregated coverage report.

Project structure.

Root
- lib
  - module A
    - target
      - site/jacoco-aggregate
        - index.html -- which generates Coverage report
      - surefire-reports
      - jacoco.exec
  - module B
      - target
        - site/jacoco-aggregate
          - index.html -- which generates Coverage report
        - surefire-reports
        - jacoco.exec
target/site/jacoco-aggregate
  - index.html- Has empty coverage report, but Im looking here to get an aggregate coverage report.

Command:

mvn --batch-mode pmd:pmd org.codehaus.mojo:findbugs-maven-plugin:3.0.4:findbugs org.jacoco:jacoco-maven-plugin:prepare-agent --activate-profiles jenkinsci org.apache.maven.plugins:maven-dependency-plugin:properties surefire:test org.jacoco:jacoco-maven-plugin:report-aggregate

What should I doing right, so that I get an aggregated coverage report at the parent directory ? thanks.

Chel MS
  • 386
  • 1
  • 10
  • 1
    If the problem continues despite of applying workarounds, you may have a look at my answer on [maven jacoco: not generating code coverage report](https://stackoverflow.com/questions/25395255/maven-jacoco-not-generating-code-coverage-report/71661614#71661614). – Murat Yıldız Mar 29 '22 at 12:03
  • @MuratYıldız : appreciate your help here.. – Chel MS Apr 18 '22 at 11:19

0 Answers0