Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1749

Add possibility to maven plugin to skip report generation for sub-modules

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      For multi-module projects clover2:clover generates report for main module and for all sub-modules. For big projects this can take some time (as the total size of reports for every single module is comparable to the size of the aggregated report), and it's not necessarily expected (typically users want to see one consolidated report only).

      Please implement flag which allows user to configure if report generation for a module should be skipped if it's not a root project.

      Workaround, which includes profile usages:

      Change your modules configuration in parent pom.xml such as:

      <profiles>
          <profile>
              <id>reportOnly</id>
              <!-- for this profile we don't want to have any modules -->
          </profile>
          <profile>
              <id>default</id>
              <activation>
                  <activeByDefault>true</activeByDefault>
              </activation>
              <modules>
                  <module>jar1</module>
                  <module>jar2</module>
                  <module>war1</module>
                  <module>ear1</module>
      <!-- all modules here-->
              </modules>
          </profile>
      

      With such configuration please perform report generation in two commands:

      mvn clover2:setup test clover2:aggregate
      

      which will instrument code, generate coverage and aggregate results to the root project, and afterwards:

      mvn clover2:clover -P reportOnly
      

      which will generate reports only for root project, because within this profile there aren't any submodules.

      Attachments

        Activity

          People

            Unassigned Unassigned
            glewandowski Grzegorz Lewandowski
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: