Merge branch '1.5.x' into 2.0.x
This commit is contained in:
@@ -70,8 +70,9 @@ abstract class AbstractApplicationLauncher extends ExternalResource {
|
||||
|
||||
private Process startApplication() throws Exception {
|
||||
File workingDirectory = getWorkingDirectory();
|
||||
File serverPortFile = workingDirectory == null ? new File("target/server.port")
|
||||
: new File(workingDirectory, "target/server.port");
|
||||
File serverPortFile = (workingDirectory != null
|
||||
? new File(workingDirectory, "target/server.port")
|
||||
: new File("target/server.port"));
|
||||
serverPortFile.delete();
|
||||
File archive = this.applicationBuilder.buildApplication();
|
||||
List<String> arguments = new ArrayList<>();
|
||||
|
||||
@@ -107,14 +107,14 @@ class BootRunApplicationLauncher extends AbstractApplicationLauncher {
|
||||
}
|
||||
|
||||
private String getClassesPath(File archive) {
|
||||
return archive.getName().endsWith(".jar") ? "BOOT-INF/classes"
|
||||
: "WEB-INF/classes";
|
||||
return (archive.getName().endsWith(".jar") ? "BOOT-INF/classes"
|
||||
: "WEB-INF/classes");
|
||||
}
|
||||
|
||||
private List<String> getLibPaths(File archive) {
|
||||
return archive.getName().endsWith(".jar")
|
||||
return (archive.getName().endsWith(".jar")
|
||||
? Collections.singletonList("BOOT-INF/lib")
|
||||
: Arrays.asList("WEB-INF/lib", "WEB-INF/lib-provided");
|
||||
: Arrays.asList("WEB-INF/lib", "WEB-INF/lib-provided"));
|
||||
}
|
||||
|
||||
private void explodeArchive(File archive) throws IOException {
|
||||
|
||||
@@ -54,9 +54,9 @@ class ExplodedApplicationLauncher extends AbstractApplicationLauncher {
|
||||
|
||||
@Override
|
||||
protected List<String> getArguments(File archive) {
|
||||
String mainClass = archive.getName().endsWith(".war")
|
||||
String mainClass = (archive.getName().endsWith(".war")
|
||||
? "org.springframework.boot.loader.WarLauncher"
|
||||
: "org.springframework.boot.loader.JarLauncher";
|
||||
: "org.springframework.boot.loader.JarLauncher");
|
||||
try {
|
||||
explodeArchive(archive);
|
||||
return Arrays.asList("-cp", this.exploded.getAbsolutePath(), mainClass);
|
||||
|
||||
@@ -128,14 +128,14 @@ class IdeApplicationLauncher extends AbstractApplicationLauncher {
|
||||
}
|
||||
|
||||
private String getClassesPath(File archive) {
|
||||
return archive.getName().endsWith(".jar") ? "BOOT-INF/classes"
|
||||
: "WEB-INF/classes";
|
||||
return (archive.getName().endsWith(".jar") ? "BOOT-INF/classes"
|
||||
: "WEB-INF/classes");
|
||||
}
|
||||
|
||||
private List<String> getLibPaths(File archive) {
|
||||
return archive.getName().endsWith(".jar")
|
||||
return (archive.getName().endsWith(".jar")
|
||||
? Collections.singletonList("BOOT-INF/lib")
|
||||
: Arrays.asList("WEB-INF/lib", "WEB-INF/lib-provided");
|
||||
: Arrays.asList("WEB-INF/lib", "WEB-INF/lib-provided"));
|
||||
}
|
||||
|
||||
private void explodeArchive(File archive, File destination) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user