Standardize Build
Fixes gh-769
This commit is contained in:
@@ -1,66 +0,0 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url "https://repo.spring.io/plugins-snapshot" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'io.spring.gradle:dependency-management-plugin:1.0.2.RELEASE'
|
||||
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
|
||||
}
|
||||
}
|
||||
|
||||
apply from: JAVA_GRADLE
|
||||
apply from: SAMPLE_GRADLE
|
||||
|
||||
apply plugin: 'org.springframework.boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
group = 'samples'
|
||||
ext {
|
||||
jsonassertVersion="1.3.0"
|
||||
assertjVersion = "2.4.0"
|
||||
}
|
||||
|
||||
ext['spring-security.version'] = springSecurityVersion
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-session'),
|
||||
"org.springframework.data:spring-data-redis:$springDataRedisVersion",
|
||||
"io.lettuce:lettuce-core:$lettuceVersion",
|
||||
"org.springframework.boot:spring-boot-starter-web",
|
||||
"org.springframework.boot:spring-boot-starter-thymeleaf",
|
||||
"org.springframework.boot:spring-boot-starter-security",
|
||||
"nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect",
|
||||
"org.apache.httpcomponents:httpclient"
|
||||
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test",
|
||||
"org.assertj:assertj-core:$assertjVersion"
|
||||
testCompile "org.skyscreamer:jsonassert:$jsonassertVersion"
|
||||
integrationTestCompile seleniumDependencies
|
||||
|
||||
}
|
||||
//
|
||||
integrationTest {
|
||||
doFirst {
|
||||
def port = reservePort()
|
||||
|
||||
systemProperties['server.port'] = port
|
||||
systemProperties['management.port'] = 0
|
||||
|
||||
systemProperties['spring.session.redis.namespace'] = project.name
|
||||
}
|
||||
jvmArgs "-XX:-UseSplitVerifier"
|
||||
}
|
||||
|
||||
integrationTest {
|
||||
testLogging {
|
||||
events "passed", "skipped", "failed"
|
||||
}
|
||||
}
|
||||
|
||||
def reservePort() {
|
||||
def socket = new ServerSocket(0)
|
||||
def result = socket.localPort
|
||||
socket.close()
|
||||
result
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
apply plugin: 'io.spring.convention.spring-sample-boot'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-session')
|
||||
compile"org.springframework.data:spring-data-redis"
|
||||
compile"io.lettuce:lettuce-core"
|
||||
compile"org.springframework.boot:spring-boot-starter-web"
|
||||
compile"org.springframework.boot:spring-boot-starter-thymeleaf"
|
||||
compile"org.springframework.boot:spring-boot-starter-security"
|
||||
compile"nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect"
|
||||
compile"org.apache.httpcomponents:httpclient"
|
||||
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
testCompile"org.assertj:assertj-core"
|
||||
testCompile "org.skyscreamer:jsonassert"
|
||||
|
||||
integrationTestCompile seleniumDependencies
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user