Uploaded image for project: 'Maven PMD Plugin'
  1. Maven PMD Plugin
  2. MPMD-283

Create a real aggregate goal

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.15.0
    • CPD, PMD
    • None

    Description

      PMD needs to have the project compiled, before it can analyze it. This is required to support typeresolution.

      For Multi-modules projects, you can currently set the "aggregate" parameter, to create an aggregated report. However, this is executed at the root project before all other modules have been built, leading to a potentially inaccurate PMD result and false positives.

      A separate goal should be introduced, that can execute the compile lifecycle prior to executing PMD (similar what javadoc:aggregate does).

       

      @Mojo( name = "aggregate", aggregator = true, requiresDependencyResolution = ResolutionScope.TEST )
      @Execute( phase = LifecyclePhase.COMPILE )
      public class AggregatorPMDReport {
      ...

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              adangel Andreas Dangel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: