File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
src/main/java/org/scalatest/tools/maven Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,14 @@ abstract class AbstractScalaTestMojo extends AbstractMojo {
234
234
*/
235
235
String workingDirectory ;
236
236
237
+ /**
238
+ * Option to specify an alternative path to JVM (or path to the java executable) to use with
239
+ * the forked process.
240
+ *
241
+ * @parameter property="jvm"
242
+ */
243
+ String jvm ;
244
+
237
245
// runScalaTest is called by the concrete mojo subclasses TODO: make it protected and others too
238
246
// Returns true if all tests pass
239
247
boolean runScalaTest (String [] args ) throws MojoFailureException {
@@ -274,7 +282,12 @@ private boolean runForkingOnce(String[] args) throws MojoFailureException {
274
282
} else {
275
283
cli .setWorkingDirectory (workingDirectory );
276
284
}
277
- cli .setExecutable (getJvm ());
285
+
286
+ if (this .jvm == null || this .jvm .isEmpty ()) {
287
+ cli .setExecutable (getJvm ());
288
+ } else {
289
+ cli .setExecutable (this .jvm );
290
+ }
278
291
279
292
// Set up environment
280
293
if (environmentVariables != null ) {
You can’t perform that action at this time.
0 commit comments