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

Log what developers care about and not what they don't

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.24.0
    • None
    • None

    Description

      Here's output from a recent PMD plugin run that failed:

      [INFO] >>> maven-pmd-plugin:3.21.2:check (default-cli) > :pmd @ commons-io >>>
      [INFO]
      [INFO] — maven-pmd-plugin:3.21.2:pmd (pmd) @ commons-io —
      [INFO] PMD version: 6.55.0
      [INFO] Rendering content with org.apache.maven.skins:maven-default-skin:jar:1.3 skin.
      [INFO]
      [INFO] <<< maven-pmd-plugin:3.21.2:check (default-cli) < :pmd @ commons-io <<<
      [INFO]
      [INFO]
      [INFO] — maven-pmd-plugin:3.21.2:check (default-cli) @ commons-io —
      [INFO] PMD version: 6.55.0
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 05:22 min
      [INFO] Finished at: 2024-01-14T14:11:30Z
      [INFO] ------------------------------------------------------------------------
      Error: Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.21.2:check (default-cli) on project commons-io: You have 1 PMD violation. For more details see: /home/runner/work/commons-io/commons-io/target/pmd.xml -> [Help 1]
      Error:
      Error: To see the full stack trace of the errors, re-run Maven with the -e switch.
      Error: Re-run Maven using the -X switch to enable full debug logging.
      Error:
      Error: For more information about the errors and possible solutions, please read the following articles:
      Error: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
      Error: Process completed with exit code 1.

      Things I don't care about that are printed:

      • PMD version
      • Doxia skin
      • Blank lines
      • Total time
      • Timestamp when it finished
      • Generic information about Mojo failures
      • Exit code from Mojo

      The one thing I care about:

      • The actual error that caused the failure

      Everything in the first list can be hidden in some random log file no one will ever look at. Everything in the second list should be front and center. Instead Maven gets this exactly backwards,

      Attachments

        Issue Links

          Activity

            People

              michael-o Michael Osipov
              elharo Elliotte Rusty Harold
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: