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

Beautify debug output for mojo parameters of type array

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment