Maven Checkstyle Plugin
  1. Maven Checkstyle Plugin
  2. MCHECKSTYLE-173

Embedded error: Cannot set property 'charset' in module Checker to 'UTF-8,UTF-8': UTF-8,UTF-8

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 2.9.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows and linux, same problem
    • Number of attachments :
      2

      Description

      Changes are checkstyle-plugin update from 2.8 to 2.9.
      Same problem with 'mvn checkstyle:check' and 'mvn site'

      Logging added in this issue report.

      1. checkstyle.log
        76 kB
        Harald Lammers
      2. site.log
        637 kB
        Harald Lammers

        Issue Links

          Activity

          Hide
          Dennis Lundberg added a comment -

          Hi Harald,

          We need more info to be able tell what is wrong. Please supply the smallest sample project you can that shows your problem. It might have to do with your Checkstyle configuration, so please include that to. You can also try to build your project using one of the standard Checkstyle configurations, to see if you still get this error.

          Show
          Dennis Lundberg added a comment - Hi Harald, We need more info to be able tell what is wrong. Please supply the smallest sample project you can that shows your problem. It might have to do with your Checkstyle configuration, so please include that to. You can also try to build your project using one of the standard Checkstyle configurations, to see if you still get this error.
          Hide
          Kohányi Róbert added a comment -

          I have the same problem using this configuration. If I comment out <property name="charset" value="UTF-8"/> checkstyle don't bark at me.

          I didn't look at the code or anything, but given the error message I think the plugin appends the project's default encoding to whatever encoding the charset property holds. To prove myself I've modified the above configuration by changing the charset to ISO-8859-1, in which case the error message I received changed to "blabla 'ISO-8859-1,UTF-8' blabla". Hope it helped.

          Show
          Kohányi Róbert added a comment - I have the same problem using this configuration . If I comment out <property name="charset" value="UTF-8"/> checkstyle don't bark at me. I didn't look at the code or anything, but given the error message I think the plugin appends the project's default encoding to whatever encoding the charset property holds. To prove myself I've modified the above configuration by changing the charset to ISO-8859-1, in which case the error message I received changed to "blabla 'ISO-8859-1,UTF-8' blabla". Hope it helped.
          Hide
          Dennis Lundberg added a comment -

          This is because of the fix in MCHECKSTYLE-152. It will only happen if you configure the charset property in your checkstyle configuration file. In version 2.9 the plugin adds the Maven project's encoding to the Checkstyle configuration, after the configuration file has been read. I'll try to tweak this so that the plugin won't add the encoding if it already exists.

          Show
          Dennis Lundberg added a comment - This is because of the fix in MCHECKSTYLE-152 . It will only happen if you configure the charset property in your checkstyle configuration file. In version 2.9 the plugin adds the Maven project's encoding to the Checkstyle configuration, after the configuration file has been read. I'll try to tweak this so that the plugin won't add the encoding if it already exists.
          Hide
          Dennis Lundberg added a comment -

          I've deployed a 2.9.1-SNAPSHOT version. Can you please give it a try and test that it fixes this issue for you?

          Show
          Dennis Lundberg added a comment - I've deployed a 2.9.1-SNAPSHOT version. Can you please give it a try and test that it fixes this issue for you?
          Hide
          Kohányi Róbert added a comment -

          No errors are reported using the snapshot. Thanks!

          Show
          Kohányi Róbert added a comment - No errors are reported using the snapshot. Thanks!
          Hide
          Harald Lammers added a comment -

          Hi Dennis Lundberg and Kohányi Róbert. Thanks for the support. Today I had a problem with our proxy server to get to the snapshot repo. I'll tried but can't get the snapshot jar. I'll try it tomorrow. But I believe Kohányi Róbert that is works. Thanks for your quick reaction.

          Show
          Harald Lammers added a comment - Hi Dennis Lundberg and Kohányi Róbert. Thanks for the support. Today I had a problem with our proxy server to get to the snapshot repo. I'll tried but can't get the snapshot jar. I'll try it tomorrow. But I believe Kohányi Róbert that is works. Thanks for your quick reaction.
          Hide
          Dennis Lundberg added a comment -

          Kohányi,

          Thanks for testing. I'll give Harald tomorrow to test as well, and if all is well I'll push a fix release out.

          Show
          Dennis Lundberg added a comment - Kohányi, Thanks for testing. I'll give Harald tomorrow to test as well, and if all is well I'll push a fix release out.
          Hide
          Harald Lammers added a comment -

          Hello Dennis,

          I've test it and problem is solved.

          Thanks a lot.

          Show
          Harald Lammers added a comment - Hello Dennis, I've test it and problem is solved. Thanks a lot.
          Hide
          Dennis Lundberg added a comment -

          Fixed in r1291005 and r1291009.

          Show
          Dennis Lundberg added a comment - Fixed in r1291005 and r1291009 .

            People

            • Assignee:
              Dennis Lundberg
              Reporter:
              Harald Lammers
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: