Various cleanups

Changed gradle-all.sh so that Gradle JVM settings are picked up from grade.properties
Added Gradle plugin that verifies that SPRING_DATA_MONGODB_URI is set before running any tests that need MongoDB
This commit is contained in:
Chris Richardson
2015-01-05 15:35:27 -08:00
parent 1084dbe3a8
commit b5a34c6045
9 changed files with 37 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
import org.gradle.api.*
class VerifyMongoDBConfigurationPlugin implements Plugin<Project> {
void apply(Project project) {
project.test {
beforeSuite { x ->
if (x.parent == null) {
if (System.getenv("SPRING_DATA_MONGODB_URI") == null)
throw new RuntimeException("Please make sure that the environment variable SPRING_DATA_MONGODB_URI is set, e.g. export SPRING_DATA_MONGODB_URI=mongodb://192.168.59.103/mydb")
}
}
}
}
}