String line = getPlay2().getAbsolutePath();
CommandLine cmdLine = CommandLine.parse(line);
cmdLine.addArguments(getPlay2SystemPropertiesArguments(), false);
cmdLine.addArgument("test");
DefaultExecutor executor = new DefaultExecutor();
if (timeout > 0) {
ExecuteWatchdog watchdog = new ExecuteWatchdog(timeout);
executor.setWatchdog(watchdog);
}
executor.setWorkingDirectory(project.getBasedir());
executor.setExitValue(0);
try {
executor.execute(cmdLine, getEnvironment());
} catch (IOException e) {
if (testFailureIgnore) {
getLog().error("Test execution failures ignored");
} else {
throw new MojoExecutionException("Error during compilation", e);