File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/main/java/org/scalatest/tools/maven Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,13 @@ abstract class AbstractScalaTestMojo extends AbstractMojo {
224
224
*/
225
225
double spanScaleFactor = 1.0 ;
226
226
227
+ /**
228
+ * The current working directory for forked process. Optional. If not specified, basedir will be used.
229
+ *
230
+ * @parameter property="workingDirectory"
231
+ */
232
+ String workingDirectory ;
233
+
227
234
// runScalaTest is called by the concrete mojo subclasses TODO: make it protected and others too
228
235
// Returns true if all tests pass
229
236
boolean runScalaTest (String [] args ) throws MojoFailureException {
@@ -259,7 +266,11 @@ private boolean runWithoutForking(String[] args) {
259
266
private boolean runForkingOnce (String [] args ) throws MojoFailureException {
260
267
261
268
final Commandline cli = new Commandline ();
262
- cli .setWorkingDirectory (project .getBasedir ());
269
+ if ((this .workingDirectory == null || this .workingDirectory .isEmpty ())) {
270
+ cli .setWorkingDirectory (project .getBasedir ());
271
+ } else {
272
+ cli .setWorkingDirectory (workingDirectory );
273
+ }
263
274
cli .setExecutable (getJvm ());
264
275
265
276
// Set up environment
You can’t perform that action at this time.
0 commit comments