Maven Changes Plugin
  1. Maven Changes Plugin
  2. MCHANGES-66

The changes plugin scatters white space over its Changes report

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: changes.xml
    • Labels:
      None
    • Number of attachments :
      6

      Description

      The changelog plugin reads the contents of the changes.xml file and scatters \n characters into it. The attached patch fixes this and also improves performance by using a string buffer.

      1. changes.xml
        6 kB
        Benjamin Bentmann
      2. changes4.patch
        2 kB
        Henning Schmiedehausen
      3. changes7.patch
        3 kB
        Henning Schmiedehausen
      4. changes-report.html
        9 kB
        Benjamin Bentmann
      5. sax-parsing.patch
        2 kB
        Benjamin Bentmann

        Activity

        Hide
        Benjamin Bentmann added a comment -

        The removal of line breaks is simply caused by

        replace( '\n', ' ' )
        

        which can be easily spotted in the patch and removed if required.

        I adopted this behavior from Henning's patch which I considered useful as some kind of white-space normalization since one (at least me and my IDE) usually uses white-space in XML only for formatting of the XML input itself, and not for formatting of the output generated from the XML. Or is there any spec about the changes.xml that dictates to preserve white-space in certain elements?

        If white-space normalization is OK, then however my patch should be further improved to deliver a proper normalization. I would define a proper normalization as

        • no leading/trailing white-space (trim() in place)
        • no consecutive white-space (missing)
        • only 0x20 as white-space character (missing)

        The last two aspects should be easily realizable via

        replaceAll("\\s+", " ")
        

        instead of the existing replace() calls.

        Show
        Benjamin Bentmann added a comment - The removal of line breaks is simply caused by replace( '\n', ' ' ) which can be easily spotted in the patch and removed if required. I adopted this behavior from Henning's patch which I considered useful as some kind of white-space normalization since one (at least me and my IDE) usually uses white-space in XML only for formatting of the XML input itself, and not for formatting of the output generated from the XML. Or is there any spec about the changes.xml that dictates to preserve white-space in certain elements? If white-space normalization is OK, then however my patch should be further improved to deliver a proper normalization. I would define a proper normalization as no leading/trailing white-space (trim() in place) no consecutive white-space (missing) only 0x20 as white-space character (missing) The last two aspects should be easily realizable via replaceAll( "\\s+" , " " ) instead of the existing replace() calls.
        Hide
        Dennis Lundberg added a comment -

        I have applied the patch, but I opted not to remove line breaks. Thanks!
        A new SNAPSHOT has been deployed. Please give a try.

        Show
        Dennis Lundberg added a comment - I have applied the patch, but I opted not to remove line breaks. Thanks! A new SNAPSHOT has been deployed. Please give a try.
        Hide
        Henning Schmiedehausen added a comment - - edited

        <offending comment deleted>.

        Apologies to Dennis, this venting of steam actually hit the wrong person (because he is one of the few that actually cares for the open issues against maven plugin).

        Show
        Henning Schmiedehausen added a comment - - edited <offending comment deleted>. Apologies to Dennis, this venting of steam actually hit the wrong person (because he is one of the few that actually cares for the open issues against maven plugin).
        Hide
        Dennis Lundberg added a comment -

        That's an utterly disrespectful thing to say.

        Show
        Dennis Lundberg added a comment - That's an utterly disrespectful thing to say.
        Hide
        Benjamin Bentmann added a comment -

        51 weeks and one day after the initial bug report, a new snapshot has been deployed.

        Henning, how many weeks have passed since Dennis asked you to provide a changes.xml to nail the issue down? I guess you had something better to do, just like the committers. This issue has just one vote and there are lots of other, higher voted issues waiting to be investigated and solved.

        Show
        Benjamin Bentmann added a comment - 51 weeks and one day after the initial bug report, a new snapshot has been deployed. Henning, how many weeks have passed since Dennis asked you to provide a changes.xml to nail the issue down? I guess you had something better to do, just like the committers. This issue has just one vote and there are lots of other, higher voted issues waiting to be investigated and solved.

          People

          • Assignee:
            Dennis Lundberg
            Reporter:
            Henning Schmiedehausen
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: