Maven
  1. Maven
  2. MNG-2254

the encoding parameter in xml declaration of POM is ignored

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.8
    • Component/s: POM::Encoding
    • Labels:
      None
    • Complexity:
      Intermediate
    • Patch Submitted:
      Yes
    • Number of attachments :
      8

      Description

      DefaultMavenProjectBuilder reads POM in system default character encoding, and the encoding parameter in xml declartion is ignored.
      to fix this problem, We should

      • fix modello-plugin-xpp3 to use the xml parser which is able to handle the encoding parameter properly
      • regenerate maven-model using fixed modello-plugin-xpp3
      • fix DefaultMavenProjectBuilder to use regenerated maven-model properly.
      1. DefaultMavenProjectBuilder.diff
        3 kB
        Naoki Nose
      2. MNG-2254_artifact.diff
        2 kB
        Herve Boutemy
      3. MNG-2254_components.diff
        12 kB
        Herve Boutemy
      4. MNG-2254_components-new.diff
        13 kB
        Herve Boutemy
      5. MNG-2254.diff
        3 kB
        Herve Boutemy
      6. MNG-2254-2.diff
        10 kB
        Herve Boutemy
      7. mng-2254-PomEncoding.tgz
        2 kB
        Herve Boutemy
      8. modello-plugin-xpp3.diff
        8 kB
        Naoki Nose

        Issue Links

          Activity

          Hide
          brianfox brianfox added a comment -

          Can someone make an IT for this? See the instructions here: http://docs.codehaus.org/display/MAVEN/Creating+a+Maven+Integration+Test

          Show
          brianfox brianfox added a comment - Can someone make an IT for this? See the instructions here: http://docs.codehaus.org/display/MAVEN/Creating+a+Maven+Integration+Test
          Hide
          Herve Boutemy added a comment -

          Hi Brian,

          Here is an IT to check that pom.xml encoding is properly detected: the sample pom.xml is in utf-16, then if encoding is not detected, the build simply fails (no complicated test to check that an accentuated character would have been correctly read)

          I checked that it fails without the patch, not that it works with the patch applied...

          Show
          Herve Boutemy added a comment - Hi Brian, Here is an IT to check that pom.xml encoding is properly detected: the sample pom.xml is in utf-16, then if encoding is not detected, the build simply fails (no complicated test to check that an accentuated character would have been correctly read) I checked that it fails without the patch, not that it works with the patch applied...
          Hide
          brianfox brianfox added a comment -

          Thanks Herve, the test looks good. I wasn't able to get the patches applied cleanly. Can you update them and then I'll apply and test? (i'm going to add the test to the core suite)

          Show
          brianfox brianfox added a comment - Thanks Herve, the test looks good. I wasn't able to get the patches applied cleanly. Can you update them and then I'll apply and test? (i'm going to add the test to the core suite)
          Hide
          Herve Boutemy added a comment -

          ok: here is a new patch

          Show
          Herve Boutemy added a comment - ok: here is a new patch
          Hide
          Herve Boutemy added a comment -

          work done:

          • r585265 for trunk
          • r585268 for 2.0.x branch
          Show
          Herve Boutemy added a comment - work done: r585265 for trunk r585268 for 2.0.x branch

            People

            • Assignee:
              Herve Boutemy
              Reporter:
              Naoki Nose
            • Votes:
              9 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: