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

Can't set system properties by <systemPropertyVariables> or <argLine> on Maven 3.0.2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Incomplete
    • 2.7.2
    • None
    • None
    • None

    Description

      I upgraded from Maven 2.2.1 to 3.0.2.
      I found an issue that I haven't occurred when I was using Maven 2.2.1.

      I'd like to overwrite the system property "file.encoding".
      So I set an value at pom.xml like below.

      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>2.7.2</version>
      <configuration>
      <systemPropertyVariables>
      <file.encoding>utf-8</file.encoding>
      </systemPropertyVariables>
      <excludes>
      <exclude>**/TestUtils.java</exclude>
      <exclude>learning/*/.java</exclude>
      </excludes>
      <forkMode>always</forkMode>
      <argLine>-Dfile.encoding=utf-8</argLine>
      </configuration>
      </plugin>

      But "file.encoding" value wasn't loaded when testing.
      I attach an file when I ran the command below.
      mvn -DskipTests=false -Dtest=*LabelNodeTest -X surefire:test > build.log

      Attachments

        1. build.log
          37 kB
          Hiroki Kondo

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kompiro Hiroki Kondo
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: