Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-372

Wrong pom.xml encoding in archetypes with modules

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Generator
    • Labels:
      None
    • Number of attachments :
      0

      Description

      In archetypes with modules, the parent pom.xml is written in the system default encoding instead of UTF-8 (encoding for poms according to DefaultFilesetArchetypeGenerator.java)

      The problem is located at method DefaultPomManager.addModule(), at line 86:

      86 SAXReader reader = new SAXReader();
      87 Document document = reader.read( fileReader );

      Encoding property of SAXReader object is not set and according to org.dom4j.io.SAXReader API

      public void setEncoding(String encoding)

      Sets encoding used for InputSource (null means system default encoding)

      the default encoding is used for reading the pom.xml when adding a module, but UTF-8 was used to generate that file.

        Activity

        Hide
        Michael Osipov added a comment -

        Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

        Show
        Michael Osipov added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

          People

          • Assignee:
            Unassigned
            Reporter:
            Emilio Jose Mena Cebrian
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: