Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1052

Use "project.build.sourceEncoding"-Property by default for forked jvm

    XMLWordPrintableJSON

Details

    Description

      maven-surefire-plugin is ignoring "project.build.sourceEncoding"-property when forking jvm for testcase execution.

      The attached testcase fails with surefire for a project configured as UTF-8 but is successful when executed in eclipse.

      Known Workaround:
      Configure surefire in the following way <configuration><argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine></configuration>

      P.S.: Unfortunately the oracle jvm itself is also unsafe. Executing the testcase with java.exe (without file.encoding-argument) gives AssertionError, executing with javaw.exe (without file.encoding-argument) is successful.

      Attachments

        1. SurefireEncodingTestCase.java
          0.5 kB
          Dieter König
        2. pom.xml
          0.6 kB
          Dieter König

        Activity

          People

            Unassigned Unassigned
            amiddima Dieter König
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: