From c724b81f7c4aa1dd0d441113716215d968f0b472 Mon Sep 17 00:00:00 2001 From: Holger Stolzenberg Date: Thu, 27 Mar 2014 14:37:25 +0100 Subject: [PATCH] The spring-boot-gradle-plugin now delegates configured project properties to the JavaExec of the runApp tasks. This fixes a issue that caused sytem properties that are provided to gradle via command line were not known to the spring boot application. For example, running 'gradle bootRun -Pspring.config.location=/some/custom/location/application.properties' did not work and the external config file was not loaded. --- .../groovy/org/springframework/boot/gradle/task/RunApp.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/task/RunApp.java b/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/task/RunApp.java index 111415de908e..209eea923f23 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/task/RunApp.java +++ b/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/task/RunApp.java @@ -34,7 +34,7 @@ /** * Run the project from Gradle. - * + * * @author Dave Syer */ public class RunApp extends DefaultTask { @@ -77,6 +77,7 @@ public String call() throws Exception { removeDuplicatesFromOutputDir(directory, outputDir); } } + exec.setSystemProperties(project.getProperties()); exec.exec(); }