Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-beta-8
    • Component/s: None
    • Labels:
      None

      Description

      If the POM has utf-8 encoding and you make usage of entities to support extended characters, these characters are no longer encoded as entities in the repository (well, the effect is already visible in target/effective-pom.xml). This is not a rule of general, POMs with packaging "pom" are installed and deployed correctly.

      Multi module example. The attached archive contains a parent POM and a POM for a jar. Both UTF-8 encoded POMs contain a developer with a name using an entitiy. Releasing the POMs they are written with the expanded entitiy making the XML invalid.

      1. MNG-2362.zip
        1.0 kB
        Joerg Schaible

        Issue Links

          Activity

          Joerg Schaible created issue -
          Joerg Schaible made changes -
          Field Original Value New Value
          Link This issue is related to MNG-2362 [ MNG-2362 ]
          Hide
          Benjamin Bentmann added a comment -

          Another encoding problem: The plugin (2.0-beta-7) does not output an XML declaration in the rewritten POM. While this might be acceptable for UTF-8 encoded POMs (although I would consider it a betst practice to always output an XML declaration), it is in general wrong for any other encoding.

          Show
          Benjamin Bentmann added a comment - Another encoding problem: The plugin (2.0-beta-7) does not output an XML declaration in the rewritten POM. While this might be acceptable for UTF-8 encoded POMs (although I would consider it a betst practice to always output an XML declaration), it is in general wrong for any other encoding.
          Hide
          Nathan Beyer added a comment -

          +1 for ALWAYS including an XML prolog that includes the encoding.

          Since the POM file are often retrieve via HTTP, the lack of the encoding in the POM can be even more troublesome, as the encoding can be determined by the transport [1] if it's not in the XML prolog, so the "default" of UTF-8 doesn't always apply. This means that the encoding maybe determined by default content-type values set in the web server's configuration. This adds a significant amount of variability, which would be eliminated by explicitly setting the encoding in the prolog.

          [1] http://www.w3.org/TR/2006/REC-xml-20060816/#sec-prolog-dtd

          Show
          Nathan Beyer added a comment - +1 for ALWAYS including an XML prolog that includes the encoding. Since the POM file are often retrieve via HTTP, the lack of the encoding in the POM can be even more troublesome, as the encoding can be determined by the transport [1] if it's not in the XML prolog, so the "default" of UTF-8 doesn't always apply. This means that the encoding maybe determined by default content-type values set in the web server's configuration. This adds a significant amount of variability, which would be eliminated by explicitly setting the encoding in the prolog. [1] http://www.w3.org/TR/2006/REC-xml-20060816/#sec-prolog-dtd
          Benjamin Bentmann made changes -
          Link This issue is related to MRELEASE-87 [ MRELEASE-87 ]
          Hide
          Benjamin Bentmann added a comment -

          Fixed by MRELEASE-87. While the entities are still expanded by the Release Plugin, they are now properly encoded as given by the XML declaration (which is kept now).

          Show
          Benjamin Bentmann added a comment - Fixed by MRELEASE-87 . While the entities are still expanded by the Release Plugin, they are now properly encoded as given by the XML declaration (which is kept now).
          Benjamin Bentmann made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Benjamin Bentmann [ bentmann ]
          Fix Version/s 2.0-beta-8 [ 13812 ]
          Resolution Fixed [ 1 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 12:15:05 UTC 2015 [ 1428236105845 ]
          Mark Thomas made changes -
          Workflow jira [ 12724024 ] Default workflow, editable Closed status [ 12763250 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 00:52:26 UTC 2015 [ 1428281546237 ]
          Mark Thomas made changes -
          Workflow jira [ 12961831 ] Default workflow, editable Closed status [ 12998817 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          450d 5h 31m 1 Benjamin Bentmann 23/May/08 14:01

            People

            • Assignee:
              Benjamin Bentmann
              Reporter:
              Joerg Schaible
            • Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development