Browse Source

Merge branch '2.1.x'

Closes gh-16960
pull/16972/head
Andy Wilkinson 7 years ago
parent
commit
bf670d0a5a
  1. 6
      spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/run-fork/src/main/java/org/test/SampleApplication.java
  2. 2
      spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/run-fork/verify.groovy
  3. 5
      spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java

6
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/run-fork/src/main/java/org/test/SampleApplication.java

@ -1,5 +1,5 @@ @@ -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 @@ @@ -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() + "'");
}
}

2
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/run-fork/verify.groovy

@ -1,3 +1,3 @@ @@ -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'")

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

@ -287,7 +287,10 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { @@ -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