Wednesday, October 04, 2006

maven2 junit jvmargs

In the original maven you could put the following line in your project.properties to manage jvm args at testing time:

maven.junit.jvmargs=-server -Dconfiguration.resourceType=properties ... -Xrunjdwp:transport=dt_socket,address=8787,server=y -Xmx512m


In maven2, the easiset way is:

<project>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>
-server -Dconfiguration.resourceType=properties ... -Xrunjdwp:transport=dt_socket,address=8787,server=y -Xmx512m
</argLine>
</configuration>
</plugin>
</plugins>
</build>
...
</project>

No comments: