Customize the mvn command based on the OS when building the samples

See gh-33
This commit is contained in:
Andy Wilkinson
2015-03-17 14:06:33 +00:00
parent 45fe87995f
commit 8b133c7c66

View File

@@ -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 {