Preloader image

Maven2

In maven2 you can enable the javaagent for your tests by adding this to your pom.xml file:

<build>
  <plugins>
    <!-- this configures the surefire plugin to run your tests with the

javaagent enabled -→ org.apache.maven.plugins maven-surefire-plugin pertest

-javaagent:\(${basedir}/target/openejb-javaagent-3.0.jar</argLine> <workingDirectory>$\){basedir}/target

    <!-- this tells maven to copy the openejb-javaagent jar into your

target/ directory -→ org.apache.maven.plugins maven-dependency-plugin copy process-resources copy org.apache.openejb openejb-javaagent 3.0

$\{project.build.directory}

  </plugins>
</build>