Uploaded image for project: 'Maven Archetype'
  1. Maven Archetype
  2. ARCHETYPE-637

PomUtils.addNewModule Pretty-Printing has issue on java 9+

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.3.0
    • Generator
    • None

    Description

       

      As of Java 9, the Transformer class's pretty-print feature doesn't define the actual format. Therefore, whitespace-only nodes will be outputted as well. This has been discussed in this JDK bug ticket. Also, Java 9's release note has explained this in the xml/jaxp section.

      If we want our pretty-print method to always generate the same format under various Java versions, we need to provide a stylesheet file.

      ref:

         https://bugs.openjdk.java.net/browse/JDK-8262285?attachmentViewMode=list

         https://www.baeldung.com/java-pretty-print-xml#pretty-printing-xml-with-the-transformer-class

      Attachments

        Issue Links

          Activity

            People

              cstamas Tamas Cservenak
              qxo qxo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: