Get Started

To use vmlens with maven configure in your pom.xml:

  1. vmlens as plugin pluginRepository
  2. a goal when the vmlens plugin should be executed.

The following example pom.xml shows you how to set the pluginRepository using the pluginRepositories tag and how to attach the vmlens plugin to the goal test.

<project>
      ...
<pluginRepositories>
  <pluginRepository>
    <id>vmlens</id>
    <url>http://vmlens.com/download</url>
  </pluginRepository>
</pluginRepositories>
     ...  
<build>
  <plugins>
    <plugin>
    <groupId>com.vmlens</groupId>
    <artifactId>vmlens-maven-plugin</artifactId>
    <version>1.0.0</version>
    <executions>
      <execution>
        <goals>
          <goal>test</goal>
        </goals>
      </execution>
    </executions>
    </plugin>
     ...
    </plugins>
</build>
      ...
</project>

Using this config the vmlens plugin will be run when all other unit tests are run. vmlens automatically includes all test classes with the following wildcard patterns:

After running your maven build the found race conditions and deadlock are show in the file file target/vmlens-reports/index.html. The content of this file is explained here. And read here on how to configure the vmlens plugin, for example to exclude unit tests or to not fail the build when a race or deadlock was found.

Next Steps