File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
src/main/java/org/scalatest/tools/maven Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 13
13
<groupId >org.scalatest</groupId >
14
14
<artifactId >scalatest-maven-plugin</artifactId >
15
15
<packaging >maven-plugin</packaging >
16
- <version >2.0.2 </version >
16
+ <version >2.0.3 </version >
17
17
<name >ScalaTest Maven Plugin</name >
18
18
<description >Integrates ScalaTest into Maven</description >
19
19
<url >https://www.scalatest.org/user_guide/using_the_scalatest_maven_plugin</url >
Original file line number Diff line number Diff line change @@ -227,6 +227,13 @@ abstract class AbstractScalaTestMojo extends AbstractMojo {
227
227
*/
228
228
double spanScaleFactor = 1.0 ;
229
229
230
+ /**
231
+ * The current working directory for forked process. Optional. If not specified, basedir will be used.
232
+ *
233
+ * @parameter property="workingDirectory"
234
+ */
235
+ String workingDirectory ;
236
+
230
237
// runScalaTest is called by the concrete mojo subclasses TODO: make it protected and others too
231
238
// Returns true if all tests pass
232
239
boolean runScalaTest (String [] args ) throws MojoFailureException {
@@ -262,7 +269,11 @@ private boolean runWithoutForking(String[] args) {
262
269
private boolean runForkingOnce (String [] args ) throws MojoFailureException {
263
270
264
271
final Commandline cli = new Commandline ();
265
- cli .setWorkingDirectory (project .getBasedir ());
272
+ if ((this .workingDirectory == null || this .workingDirectory .isEmpty ())) {
273
+ cli .setWorkingDirectory (project .getBasedir ());
274
+ } else {
275
+ cli .setWorkingDirectory (workingDirectory );
276
+ }
266
277
cli .setExecutable (getJvm ());
267
278
268
279
// Set up environment
You can’t perform that action at this time.
0 commit comments