Jonathan Bell [2013-11-14 16:44:49]
diff --git a/Ant-JUnitFormatterVMVM/jar-descriptor.jardesc b/Ant-JUnitFormatterVMVM/jar-descriptor.jardesc
index 6fc5589..3b04114 100644
--- a/Ant-JUnitFormatterVMVM/jar-descriptor.jardesc
+++ b/Ant-JUnitFormatterVMVM/jar-descriptor.jardesc
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="US-ASCII" standalone="no"?>
-    <jar path="VMVM/ant-formatter.jar"/>
+    <jar path="VMVM/ant-mvn-formatter.jar"/>
     <options buildIfNeeded="true" compress="false" descriptionLocation="/Ant-JUnitFormatterVMVM/jar-descriptor.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="true" overwrite="true" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
     <storedRefactorings deprecationInfo="true" structuralOnly="false"/>
diff --git a/Ant-JUnitFormatterVMVM/src/edu/columbia/cs/psl/vmvm/ b/Ant-JUnitFormatterVMVM/src/edu/columbia/cs/psl/vmvm/
new file mode 100644
index 0000000..b8b413a
--- /dev/null
+++ b/Ant-JUnitFormatterVMVM/src/edu/columbia/cs/psl/vmvm/
@@ -0,0 +1,17 @@
+package edu.columbia.cs.psl.vmvm;
+import org.junit.runner.Description;
+import org.junit.runner.notification.RunListener;
+public class MvnVMVMListener extends RunListener{
+	String lastTestClass = null;
+	@Override
+	public void testStarted(Description description) throws Exception {
+		if(lastTestClass != null && ! lastTestClass.equals(description.getClassName()))
+		{
+			VirtualRuntime.resetStatics();
+		}
+		lastTestClass=description.getClassName();
+	}
diff --git a/ b/
index f549096..f22475a 100644
--- a/
+++ b/
@@ -2,7 +2,7 @@
 **VMVM** is a system for isolating unit tests with very low overhead.

-This repository contains the source and a [runnable binary]( for **VMVM**.
+This repository contains the source and a [runnable binary]( for **VMVM**.

 ###For more information
 Please refer to our [Technical Report]( or email [Jonathan Bell](
@@ -16,7 +16,63 @@ Example:

 ### Modifying your build scripts
+To automatically have VMVM be called by ant, modify the `junit` task of your `build.xml` file to add the following elements:
+<pathelement path="ant-mvn-formatter.jar" />
+<pathelement location="vmvm.jar"/>
+<formatter classname="edu.columbia.cs.psl.vmvm.AntJUnitTestListener" extension=".xml"/>
+<jvmarg value="-Xbootclasspath/a:vmvm.jar:asm-all-4.1.jar"/>`
+Make sure that the paths are correct to [vmvm.jar]( and [ant-mvn-formatter.jar]( Also be sure that your `junit` task has the argument `forkMode="once"` (e.g. that it won't fork a new process for each test, defating the purpose of VMVM).
+That's it. You may also need to include the vmvm.jar in the ant master classpath, by adding the argument `-lib=vmvm.jar` when you invoke ant.
+To automatically have VMVM be called by mvn, modify the `pom.xml` file for your project as follows:
+1.	Make sure that you are using a recent version of the surefire plugin (e.g., 2.15)
+1.	Add the [vmvm.jar]( and [ant-mvn-formatter.jar]( to the surefire additional classpath (e.g. within the plugin configuration for surefire add):
+2.	Register the VMVM test listener with surefire. If you don't have any other properties set for the surefire plugin, then that would look like this:
+Here's an example of a complete pom.xml block declaring the surefire plugin and registering VMVM with it:
+	<groupId>org.apache.maven.plugins</groupId>
+	<artifactId>maven-surefire-plugin</artifactId>
+	<version>2.16</version>
+	<configuration>
+		<additionalClasspathElements>
+		<additionalClasspathElement>../../vmvm.jar</additionalClasspathElement>
+		<additionalClasspathElement>../../ant-mvn-formatter.jar</additionalClasspathElement>
+	</additionalClasspathElements>
+		<properties>
+		<property>
+			<name>listener</name>
+			<value>edu.columbia.cs.psl.vmvm.MvnVMVMListener</value>
+		</property>
+		</properties>
+	</configuration>
+	<executions>
+		<execution>
+		<id>plain</id>
+		<configuration>
+			<includes>
+				<include>**/*</include>
+			</includes>
+		</configuration>
+		</execution>
+	</executions>

 In case of problems..
diff --git a/binaries/ant-mvn-formatter.jar b/binaries/ant-mvn-formatter.jar
new file mode 100644
index 0000000..e0ff521
Binary files /dev/null and b/binaries/ant-mvn-formatter.jar differ