Maven PMD Plugin
  1. Maven PMD Plugin
  2. MPMD-143

module site(s) created in the wrong place

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.6, 2.7
    • Fix Version/s: None
    • Component/s: CPD, PMD
    • Labels:
      None
    • Environment:
      Linux, Maven 2.2.1
    • Testcase included:
      yes
    • Number of attachments :
      1

      Description

      having this project structure:
      pom.xml[type=pom, defines the pmd plugin in the reporting section]
      modules/part1/pom.xml[type=jar]
      modules/part2/pom.xml[type=jar]

      running "mvn site" on the parent project generates all reports on the parent target/site/ folder (Project License, CheckStyle, FindBugs, ...), except PMD and CPD, which get generated in the two modules target/site/ dirs, and thus do not show up in the main report.
      tested with maven PMD plugin versions 2.6 and 2.7.

      if more info is needed, or testing, tell me please.
      i attached a a zip file with a quite minimal test project.
      The zip contains a folder TestProject with the above structure inside. try running "mvn site" in folder TestProject, and have a loot at:
      target/site/
      modules/part1/target/site/
      modules/part2/target/site/

        Activity

        Hide
        Dennis Lundberg added a comment -

        This is the expected behavior. The PMD Plugin by default does not create an aggregated report for a multi-module build. You need to configure that yourself, by setting the "aggregate" parameter to true.

        http://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html#aggregate

        Show
        Dennis Lundberg added a comment - This is the expected behavior. The PMD Plugin by default does not create an aggregated report for a multi-module build. You need to configure that yourself, by setting the "aggregate" parameter to true. http://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html#aggregate
        Hide
        Robin Vobruba added a comment -

        i see, thanks!
        but... if all other plugins do aggregate (by default, or always), why does the PMD plugin not do this too? it is quite unintuitive and .. the way i currently see it, also a wrong/bad choice. i'd be glad to be enlightend though, if there is a good reason for it.

        Show
        Robin Vobruba added a comment - i see, thanks! but... if all other plugins do aggregate (by default, or always), why does the PMD plugin not do this too? it is quite unintuitive and .. the way i currently see it, also a wrong/bad choice. i'd be glad to be enlightend though, if there is a good reason for it.
        Hide
        Dennis Lundberg added a comment -

        Plugins handle aggregated reports differently. The old way, which maven-pmd-plugin uses, has an aggregate parameter. The new way has two different reports - one aggregated and one non-aggregated. Hopefully we can converge all plugins so that they all work in the same way, but that will take some time...

        Show
        Dennis Lundberg added a comment - Plugins handle aggregated reports differently. The old way, which maven-pmd-plugin uses, has an aggregate parameter. The new way has two different reports - one aggregated and one non-aggregated. Hopefully we can converge all plugins so that they all work in the same way, but that will take some time...

          People

          • Assignee:
            Unassigned
            Reporter:
            Robin Vobruba
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: