Polish
This commit is contained in:
@@ -149,8 +149,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
|
||||
|
||||
/**
|
||||
* Flag to indicate if the run processes should be forked. {@code fork} is
|
||||
* automatically enabled if an agent, jvmArguments or working directory are
|
||||
* specified, or if devtools is present.
|
||||
* automatically enabled if an agent, jvmArguments or working directory are specified,
|
||||
* or if devtools is present.
|
||||
* @since 1.2
|
||||
*/
|
||||
@Parameter(property = "fork")
|
||||
@@ -206,7 +206,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
|
||||
}
|
||||
|
||||
private boolean hasWorkingDirectorySet() {
|
||||
return (this.workingDirectory != null);
|
||||
return this.workingDirectory != null;
|
||||
}
|
||||
|
||||
private void findAgent() {
|
||||
|
||||
@@ -64,9 +64,11 @@ public class RunMojo extends AbstractRunMojo {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runWithForkedJvm(File workingDirectory, List<String> args) throws MojoExecutionException {
|
||||
protected void runWithForkedJvm(File workingDirectory, List<String> args)
|
||||
throws MojoExecutionException {
|
||||
try {
|
||||
RunProcess runProcess = new RunProcess(workingDirectory, new JavaExecutable().toString());
|
||||
RunProcess runProcess = new RunProcess(workingDirectory,
|
||||
new JavaExecutable().toString());
|
||||
Runtime.getRuntime()
|
||||
.addShutdownHook(new Thread(new RunProcessKiller(runProcess)));
|
||||
int exitCode = runProcess.run(true, args.toArray(new String[args.size()]));
|
||||
|
||||
Reference in New Issue
Block a user