Maven Surefire

-Xmx JVM option is not used by the surefire process

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.4.2
  • Fix Version/s: 2.7
  • Component/s: process forking
  • Labels:
    None
  • Environment:
    Windows XP SP2, JDK 1.6, Maven 2.0.9, surefire 2.4.2
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

I use the jvm option "-Xmx1024m" to execute maven 2.0.9. I've got heavy integration tests.
When the process surefire forks, it does not use this option. His maximum heap size is only 65 MB.

Activity

Hide
Olivier Lamy added a comment -
Show
Olivier Lamy added a comment - have a look at argLine configuration (http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#argLine)
Hide
Sebastien Peyron added a comment -

Thanks you, but I don't know how to use it.

I am still thinking it's a strange.
The following lines are extracted from the documentation.

jvm Option to specify the jvm (or path to the java executable) to use with the forking options. For the default, the jvm will be the same as the one used to run Maven.
Type: java.lang.String
Since: 2.1
Required: No
Expression: $

Unknown macro: {jvm}

Show
Sebastien Peyron added a comment - Thanks you, but I don't know how to use it. I am still thinking it's a strange. The following lines are extracted from the documentation.
jvm Option to specify the jvm (or path to the java executable) to use with the forking options. For the default, the jvm will be the same as the one used to run Maven. Type: java.lang.String Since: 2.1 Required: No Expression: $
Unknown macro: {jvm}
Hide
Benjamin Bentmann added a comment -

but I don't know how to use it.

<configuration>
  <argLine>-Xmx1024m</argLine>
</configuration>

should do.

For the default, the jvm will be the same as the one used to run Maven.

In this context, "jvm" refers merely to the executable used to launch the JVM, this does not include the options for the JVM.

Show
Benjamin Bentmann added a comment -
but I don't know how to use it.
<configuration>
  <argLine>-Xmx1024m</argLine>
</configuration>
should do.
For the default, the jvm will be the same as the one used to run Maven.
In this context, "jvm" refers merely to the executable used to launch the JVM, this does not include the options for the JVM.
Hide
Brett Porter added a comment -

so, should the surefire plugin also inherit the Maven options? I think there's value in having a separate environment instead.

Show
Brett Porter added a comment - so, should the surefire plugin also inherit the Maven options? I think there's value in having a separate environment instead.
Hide
Kristian Rosenvold added a comment -

Documentation update ready for 2.7.1 in github

Show
Kristian Rosenvold added a comment - Documentation update ready for 2.7.1 in github
Hide
Kristian Rosenvold added a comment -

Got included in 2.7

Show
Kristian Rosenvold added a comment - Got included in 2.7

People

Vote (3)
Watch (4)

Dates

  • Created:
    Updated:
    Resolved: