Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Environment:Linux
-
Number of attachments :
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=" ">$
</u:tokenize>
<j:forEach var="somejvmarg" items="$
">
<jvmarg value="$
"/>
</j:forEach>
goal test:match
<maven:pluginVar var="jvmargs" plugin="maven-test-plugin" property="maven.junit.jvmargs" />
<j:if test="$
">
<jvmarg line="$
"/>
</j:if>