From 8b133c7c66b2d2427c6b22ef6ba0d4823fe6260e Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 17 Mar 2015 14:06:33 +0000 Subject: [PATCH] Customize the mvn command based on the OS when building the samples See gh-33 --- build.gradle | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index fe72e388..45429aa9 100644 --- a/build.gradle +++ b/build.gradle @@ -104,13 +104,15 @@ task buildRestNotesSpringDataRestSampleWithGradle(type: GradleBuild) { task buildRestNotesSpringHateoasSampleWithMaven(type: Exec) { dependsOn 'spring-restdocs:install' workingDir 'samples/rest-notes-spring-hateoas' - commandLine "${System.env.MAVEN_HOME}/bin/mvn", 'clean', 'package' + def suffix = File.separatorChar == '/' ? '' : '.bat' + commandLine "${System.env.MAVEN_HOME}/bin/mvn${suffix}", 'clean', 'package' } task buildRestNotesSpringDataRestSampleWithMaven(type: Exec) { dependsOn 'spring-restdocs:install' workingDir 'samples/rest-notes-spring-data-rest' - commandLine "${System.env.MAVEN_HOME}/bin/mvn", 'clean', 'package' + def suffix = File.separatorChar == '/' ? '' : '.bat' + commandLine "${System.env.MAVEN_HOME}/bin/mvn${suffix}", 'clean', 'package' } wrapper {