This plugin allows you to create tools that operate on Java (JUnit) tests with fine-grained control (e.g., running them in arbitrary orders).
First, create a class that extends the following abstract class:
public abstract class TestPlugin {
public TestPlugin() {}
public abstract void execute(final MavenProject project);
}Then, add the following plugin to the pom.xml of the Maven project you wish to run your TestPlugin on.
<plugin>
<groupId>com.reedoei</groupId>
<artifactId>testrunner-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<className>FULLY_QUALIFIED_CLASS_NAME_GOES_HERE</className>
</configuration>
</plugin>Then run:
mvn testrunner:testplugin
If you want the latest version of this plugin (or for some reason you can't get if off Maven central), you can run:
git clone https://github.com/ReedOei/testrunner-maven-plugin
cd testrunner-maven-plugin
mvn installYou can generate documentation using:
mvn javadoc:javadoc scala:doc
See the wiki.