Polish contribution
Closes gh-6645
This commit is contained in:
@@ -77,7 +77,7 @@ public class RunProcess {
|
||||
protected int run(boolean waitForProcess, Collection<String> args)
|
||||
throws IOException {
|
||||
ProcessBuilder builder = new ProcessBuilder(this.command);
|
||||
builder.directory(workingDirectory);
|
||||
builder.directory(this.workingDirectory);
|
||||
builder.command().addAll(args);
|
||||
builder.redirectErrorStream(true);
|
||||
boolean inheritedIO = inheritIO(builder);
|
||||
|
||||
@@ -88,8 +88,9 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
|
||||
private Boolean noverify;
|
||||
|
||||
/**
|
||||
* The working directory of the application. If specified by default the process
|
||||
* will be started by forking a new JVM.
|
||||
* Current working directory to use for the application. If not specified, basedir
|
||||
* will be used NOTE: the use of working directory means that processes will be
|
||||
* started by forking a new JVM.
|
||||
* @since 1.5
|
||||
*/
|
||||
@Parameter(property = "run.workingDirectory")
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
package org.springframework.boot.maven;
|
||||
|
||||
import java.net.URL;
|
||||
import java.io.File;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
* Copyright 2012-2016 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.
|
||||
@@ -90,7 +90,7 @@ public class StartMojo extends AbstractRunMojo {
|
||||
@Override
|
||||
protected void runWithForkedJvm(File workingDirectory, List<String> args)
|
||||
throws MojoExecutionException, MojoFailureException {
|
||||
RunProcess runProcess = runProcess(args, workingDirectory);
|
||||
RunProcess runProcess = runProcess(workingDirectory, args);
|
||||
try {
|
||||
waitForSpringApplication();
|
||||
}
|
||||
@@ -104,9 +104,11 @@ public class StartMojo extends AbstractRunMojo {
|
||||
}
|
||||
}
|
||||
|
||||
private RunProcess runProcess(List<String> args, File workingDirectory) throws MojoExecutionException {
|
||||
private RunProcess runProcess(File workingDirectory, List<String> args)
|
||||
throws MojoExecutionException {
|
||||
try {
|
||||
RunProcess runProcess = new RunProcess(workingDirectory, new JavaExecutable().toString());
|
||||
RunProcess runProcess = new RunProcess(workingDirectory,
|
||||
new JavaExecutable().toString());
|
||||
runProcess.run(false, args.toArray(new String[args.size()]));
|
||||
return runProcess;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user