Skip to content

Commit 28ed59c

Browse files
committed
Polish contribution
Closes spring-projectsgh-6645
1 parent 3cccc73 commit 28ed59c

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/RunProcess.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public int run(boolean waitForProcess, String... args) throws IOException {
7777
protected int run(boolean waitForProcess, Collection<String> args)
7878
throws IOException {
7979
ProcessBuilder builder = new ProcessBuilder(this.command);
80-
builder.directory(workingDirectory);
80+
builder.directory(this.workingDirectory);
8181
builder.command().addAll(args);
8282
builder.redirectErrorStream(true);
8383
boolean inheritedIO = inheritIO(builder);

spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
8888
private Boolean noverify;
8989

9090
/**
91-
* The working directory of the application. If specified by default the process
92-
* will be started by forking a new JVM.
91+
* Current working directory to use for the application. If not specified, basedir
92+
* will be used NOTE: the use of working directory means that processes will be
93+
* started by forking a new JVM.
9394
* @since 1.5
9495
*/
9596
@Parameter(property = "run.workingDirectory")

spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RunMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
package org.springframework.boot.maven;
1818

19-
import java.net.URL;
2019
import java.io.File;
20+
import java.net.URL;
2121
import java.net.URLClassLoader;
2222
import java.util.List;
2323

spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2015 the original author or authors.
2+
* Copyright 2012-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -90,7 +90,7 @@ public class StartMojo extends AbstractRunMojo {
9090
@Override
9191
protected void runWithForkedJvm(File workingDirectory, List<String> args)
9292
throws MojoExecutionException, MojoFailureException {
93-
RunProcess runProcess = runProcess(args, workingDirectory);
93+
RunProcess runProcess = runProcess(workingDirectory, args);
9494
try {
9595
waitForSpringApplication();
9696
}
@@ -104,9 +104,11 @@ protected void runWithForkedJvm(File workingDirectory, List<String> args)
104104
}
105105
}
106106

107-
private RunProcess runProcess(List<String> args, File workingDirectory) throws MojoExecutionException {
107+
private RunProcess runProcess(File workingDirectory, List<String> args)
108+
throws MojoExecutionException {
108109
try {
109-
RunProcess runProcess = new RunProcess(workingDirectory, new JavaExecutable().toString());
110+
RunProcess runProcess = new RunProcess(workingDirectory,
111+
new JavaExecutable().toString());
110112
runProcess.run(false, args.toArray(new String[args.size()]));
111113
return runProcess;
112114
}

0 commit comments

Comments
 (0)