The great thing is to be able to run a simple
test -D MyTest command quickly. You first start Maven with
mvn cli:execute-phase, which gives you a
maven2> command prompt to start Maven lifecycle phases. As Maven is already started, phases run much quicker than when starting from scratch.
In my experiments, the
test command ran about five times faster than using
mvn -o test, but the difference depends how fast your tests are, of course.
To setup the plugin, I’m adding the following to my
settings.xml, so as to not interfere with project’s POMs, as the CLI is more an environment feature than a project thing:
<!-- mvn settings.xml that enable the CLI plugin described at http://tinyurl.com/maven-cli-plugin (For example "mvn cli:execute-phase") --> <settings> <pluginGroups> <pluginGroup>org.twdata.maven</pluginGroup> </pluginGroups> <profiles> <profile> <id>cli-plugin</id> <activation> <activeByDefault>true</activeByDefault> </activation> <pluginRepositories> <pluginRepository> <id>repository.jboss.org</id> <name>JBoss Repository</name> <url>http://repository.jboss.org/maven2</url> </pluginRepository> </pluginRepositories> </profile> </profiles> </settings>
Find more info on the mojavelinux page.
Great tool – thanks Don Brown and mojavelinux!