Merge branch '2.1.x'

Closes gh-16960
pull/16972/head
Andy Wilkinson 6 years ago
commit bf670d0a5a

@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,10 +16,12 @@
package org.test;
import java.io.File;
public class SampleApplication {
public static void main(String[] args) {
System.out.println("I haz been run");
System.out.println("I haz been run from '" + new File("").getAbsolutePath() + "'");
}
}

@ -1,3 +1,3 @@
def file = new File(basedir, "build.log")
return file.text.contains("I haz been run")
return file.text.contains("I haz been run from '$basedir'")

@ -287,7 +287,10 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
addClasspath(args);
args.add(startClassName);
addArgs(args);
runWithForkedJvm(this.workingDirectory, args, determineEnvironmentVariables());
runWithForkedJvm(
(this.workingDirectory != null) ? this.workingDirectory
: this.project.getBasedir(),
args, determineEnvironmentVariables());
}
/**

Loading…
Cancel
Save