Maven 1.x Test Plugin
  1. Maven 1.x Test Plugin
  2. MPTEST-31

Incorrect processing of JVM parameters in test:match

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Linux
    • Number of attachments :
      0

      Description

      I put some asserts inside my code and gave the following options in the project.properties file:
      maven.junit.fork=true
      maven.junit.jvmargs=-ea

      When running "maven -X test", I clearly see that the JVM is invoked with the "-ea" option. However when I invoke "maven -X -D testmach="TestSingle" test:match", the JVM is invoked without the "-ea" options my asserts do not generate any exception.

      Digging a little bit into the plugin code, I realized that jvm args are not processed the same way in both cases:

      goals test:test and test:single
      <u:tokenize var="listOfJvmArgs" delim=" ">$

      {maven.junit.jvmargs}

      </u:tokenize>
      <j:forEach var="somejvmarg" items="$

      {listOfJvmArgs}

      ">
      <jvmarg value="$

      {somejvmarg}

      "/>
      </j:forEach>

      goal test:match
      <maven:pluginVar var="jvmargs" plugin="maven-test-plugin" property="maven.junit.jvmargs" />
      <j:if test="$

      {!empty(jvmArgs)}

      ">
      <jvmarg line="$

      {jvmargs}

      "/>
      </j:if>

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Brett Porter
            Reporter:
            Frederic Gedin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: