Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3544

Beautify debug output for mojo parameters of type array

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.0.9
    • 2.0.11, 2.1.0, 3.0-alpha-1
    • Logging
    • None
    • Patch

    Description

      Currently:

      [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-jar-plugin:2.2:jar' -->
      [DEBUG]   (f) excludes = [Ljava.lang.String;@c3c315
      [DEBUG] -- end configuration --
      

      i.e. arrays won't show up nicely.

      The attached patch returns a string similar to the result of

        Arrays.asList( (Object[]) value ).toString()
      

      but uses reflection to handle arrays of primitives as well.

      Attachments

        1. debug-mojo-array-params.patch
          2 kB
          Benjamin Bentmann

        Activity

          People

            bentmann Benjamin Bentmann
            bentmann Benjamin Bentmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: