diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/run-fork/verify.groovy b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/run-fork/verify.groovy index 54e7b17fa2a..f675a4fa612 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/run-fork/verify.groovy +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/run-fork/verify.groovy @@ -1,6 +1,21 @@ +import java.lang.reflect.Method; + import static org.junit.Assert.assertTrue +def boolean isJava13OrLater() { + for (Method method : String.class.getMethods()) { + if (method.getName().equals("stripIndent")) { + return true; + } + } + return false; +} + def file = new File(basedir, "build.log") assertTrue file.text.contains("I haz been run from '$basedir'") -assertTrue file.text.contains("JVM argument(s): -Xverify:none -XX:TieredStopAtLevel=1") - +if (isJava13OrLater()) { + assertTrue file.text.contains("JVM argument(s): -XX:TieredStopAtLevel=1") +} +else { + assertTrue file.text.contains("JVM argument(s): -Xverify:none -XX:TieredStopAtLevel=1") +}