Standardize Build

Fixes gh-769
This commit is contained in:
Rob Winch
2017-02-03 22:31:18 -06:00
parent e23aaeca5f
commit d590ca58e4
87 changed files with 710 additions and 1257 deletions

View File

@@ -1,78 +0,0 @@
apply from: JAVA_GRADLE
apply from: SAMPLE_GRADLE
apply from: TOMCAT_7_GRADLE
apply plugin: "application"
dependencies {
compile project(':spring-session-data-gemfire'),
"org.springframework:spring-web:$springVersion",
"org.webjars:bootstrap:$bootstrapVersion",
"org.webjars:webjars-taglib:$webjarsTaglibVersion",
jstlDependencies
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
runtime "org.springframework.shell:spring-shell:1.1.0.RELEASE"
testCompile "junit:junit:$junitVersion",
"org.assertj:assertj-core:$assertjVersion"
integrationTestCompile seleniumDependencies
integrationTestRuntime "org.springframework.shell:spring-shell:1.1.0.RELEASE"
}
mainClassName = 'sample.Application'
def port
def process
task availablePort() {
doLast {
def serverSocket = new ServerSocket(0)
port = serverSocket.localPort
serverSocket.close()
}
}
task runGemFireServer(dependsOn: availablePort) {
doLast {
println "Starting GemFire Server on port [$port]..."
def out = new StringBuilder()
def err = new StringBuilder()
String classpath = sourceSets.main.runtimeClasspath.collect { it }.join(File.pathSeparator)
String gemfireLogLevel = System.getProperty('spring.session.data.gemfire.log-level', 'warning')
String[] commandLine = [
'java', '-server', '-ea', '-classpath', classpath,
//"-Dgemfire.log-file=gemfire-server.log",
//"-Dgemfire.log-level=config",
"-Dspring.session.data.gemfire.log-level=" + gemfireLogLevel,
"-Dspring.session.data.gemfire.port=$port",
'sample.Application'
]
//println commandLine
process = commandLine.execute()
process.consumeProcessOutput(out, err)
//println 'OUT: ' + out
//println 'ERR: ' + err
}
}
integrationTest.doLast {
println 'Stopping GemFire Server...'
process?.destroyForcibly()
}
integrationTomcatRun {
dependsOn runGemFireServer
doFirst {
System.setProperty("spring.session.data.gemfire.port", "$port");
}
}

View File

@@ -0,0 +1,22 @@
apply plugin: 'io.spring.convention.spring-sample-war'
apply plugin: "gemfire-server"
dependencies {
compile project(':spring-session-data-gemfire')
compile "org.springframework:spring-web"
compile "org.webjars:bootstrap"
compile "org.webjars:webjars-taglib"
compile jstlDependencies
compile slf4jDependencies
providedCompile "javax.servlet:javax.servlet-api"
runtime "org.springframework.shell:spring-shell"
testCompile "junit:junit"
testCompile "org.assertj:assertj-core"
integrationTestCompile seleniumDependencies
integrationTestRuntime "org.springframework.shell:spring-shell"
}

View File

@@ -53,7 +53,7 @@ public class HomePage {
}
private static void get(WebDriver driver, String get) {
String baseUrl = "http://localhost:" + System.getProperty("tomcat.port", "8080");
String baseUrl = "http://localhost:" + System.getProperty("app.port", "8080");
driver.get(baseUrl + get);
}

View File

@@ -1,20 +0,0 @@
apply from: JAVA_GRADLE
apply from: TOMCAT_7_GRADLE
apply from: SAMPLE_GRADLE
dependencies {
compile project(':spring-session-data-gemfire'),
"org.springframework:spring-web:$springVersion",
"org.webjars:bootstrap:$bootstrapVersion",
"org.webjars:webjars-taglib:$webjarsTaglibVersion",
jstlDependencies
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
testCompile "junit:junit:$junitVersion"
integrationTestCompile seleniumDependencies,
"org.assertj:assertj-core:$assertjVersion"
integrationTestRuntime "org.springframework.shell:spring-shell:1.1.0.RELEASE"
}

View File

@@ -0,0 +1,19 @@
apply plugin: 'io.spring.convention.spring-sample-war'
dependencies {
compile project(':spring-session-data-gemfire')
compile "org.springframework:spring-web"
compile "org.webjars:bootstrap"
compile "org.webjars:webjars-taglib"
compile jstlDependencies
compile slf4jDependencies
providedCompile "javax.servlet:javax.servlet-api"
testCompile "junit:junit"
integrationTestCompile seleniumDependencies
integrationTestCompile "org.assertj:assertj-core"
integrationTestRuntime "org.springframework.shell:spring-shell"
}

View File

@@ -53,7 +53,7 @@ public class HomePage {
}
private static void get(WebDriver driver, String get) {
String baseUrl = "http://localhost:" + System.getProperty("tomcat.port", "8080");
String baseUrl = "http://localhost:" + System.getProperty("app.port", "8080");
driver.get(baseUrl + get);
}

View File

@@ -1,19 +0,0 @@
apply from: JAVA_GRADLE
apply from: TOMCAT_7_GRADLE
apply from: SAMPLE_GRADLE
dependencies {
compile project(':spring-session-jdbc'),
"org.springframework:spring-web:$springVersion",
"org.webjars:bootstrap:$bootstrapVersion",
"org.webjars:webjars-taglib:$webjarsTaglibVersion",
"com.h2database:h2:$h2Version",
jstlDependencies
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
testCompile "junit:junit:$junitVersion",
"org.assertj:assertj-core:$assertjVersion"
integrationTestCompile seleniumDependencies
}

View File

@@ -0,0 +1,18 @@
apply plugin: 'io.spring.convention.spring-sample-war'
dependencies {
compile project(':spring-session-jdbc')
compile "org.springframework:spring-web"
compile "org.webjars:bootstrap"
compile "org.webjars:webjars-taglib"
compile "com.h2database:h2"
compile jstlDependencies
compile slf4jDependencies
providedCompile "javax.servlet:javax.servlet-api"
testCompile "junit:junit"
testCompile "org.assertj:assertj-core"
integrationTestCompile seleniumDependencies
}

View File

@@ -50,7 +50,7 @@ public class HomePage {
}
private static void get(WebDriver driver, String get) {
String baseUrl = "http://localhost:" + System.getProperty("tomcat.port", "8080");
String baseUrl = "http://localhost:" + System.getProperty("app.port", "8080");
driver.get(baseUrl + get);
}

View File

@@ -1,21 +0,0 @@
apply from: JAVA_GRADLE
apply from: TOMCAT_7_GRADLE
apply from: SAMPLE_GRADLE
dependencies {
compile(project(':spring-session-data-redis')) {
exclude module: 'jedis'
}
compile "org.springframework:spring-web:$springVersion",
"io.lettuce:lettuce-core:$lettuceVersion",
"org.webjars:bootstrap:$bootstrapVersion",
"org.webjars:webjars-taglib:$webjarsTaglibVersion",
jstlDependencies
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
testCompile "junit:junit:$junitVersion",
"org.assertj:assertj-core:$assertjVersion"
integrationTestCompile seleniumDependencies
}

View File

@@ -0,0 +1,20 @@
apply plugin: 'io.spring.convention.spring-sample-war'
dependencies {
compile(project(':spring-session-data-redis')) {
exclude module: 'jedis'
}
compile "org.springframework:spring-web"
compile "io.lettuce:lettuce-core"
compile "org.webjars:bootstrap"
compile "org.webjars:webjars-taglib"
compile jstlDependencies
compile slf4jDependencies
providedCompile "javax.servlet:javax.servlet-api"
testCompile "junit:junit"
testCompile "org.assertj:assertj-core"
integrationTestCompile seleniumDependencies
}

View File

@@ -50,7 +50,7 @@ public class HomePage {
}
private static void get(WebDriver driver, String get) {
String baseUrl = "http://localhost:" + System.getProperty("tomcat.port", "8080");
String baseUrl = "http://localhost:" + System.getProperty("app.port", "8080");
driver.get(baseUrl + get);
}