Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,14 @@ abstract class AbstractScalaTestMojo extends AbstractMojo {
*/
String workingDirectory;

/**
* Option to specify an alternative path to JVM (or path to the java executable) to use with
* the forked process.
*
* @parameter property="jvm"
*/
String jvm;

// runScalaTest is called by the concrete mojo subclasses TODO: make it protected and others too
// Returns true if all tests pass
boolean runScalaTest(String[] args) throws MojoFailureException {
Expand Down Expand Up @@ -274,7 +282,12 @@ private boolean runForkingOnce(String[] args) throws MojoFailureException {
} else {
cli.setWorkingDirectory(workingDirectory);
}
cli.setExecutable(getJvm());

if (this.jvm == null || this.jvm.isEmpty()) {
cli.setExecutable(getJvm());
} else {
cli.setExecutable(this.jvm);
}

// Set up environment
if (environmentVariables != null) {
Expand Down