diff --git a/build.gradle b/build.gradle index 4866da15..887912f4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,92 +1,21 @@ buildscript { - repositories { - maven { url "https://repo.spring.io/plugins-release" } - } dependencies { - classpath 'io.spring.gradle:dependency-management-plugin:1.0.2.RELEASE' - classpath("com.bmuschko:gradle-tomcat-plugin:2.2.5") - classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7") - classpath("io.spring.gradle:spring-io-plugin:0.0.6.RELEASE") - classpath('me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1') - classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2' - classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0' + classpath 'io.spring.gradle:spring-build-conventions:0.0.1.BUILD-SNAPSHOT' + classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion" + } + repositories { + maven { url 'https://repo.spring.io/libs-snapshot' } + maven { url 'https://repo.spring.io/plugins-snapshot' } } } - -plugins { - id "org.sonarqube" version "2.1" - id "io.spring.dependency-management" version "1.0.2.RELEASE" -} +apply plugin: 'io.spring.convention.root' group = 'org.springframework.session' +description = 'Spring Session' -ext.springBootVersion = '2.0.0.BUILD-SNAPSHOT' -ext.IDE_GRADLE = "$rootDir/gradle/ide.gradle" -ext.JAVA_GRADLE = "$rootDir/gradle/java.gradle" -ext.SPRING3_GRADLE = "$rootDir/gradle/spring3.gradle" -ext.MAVEN_GRADLE = "$rootDir/gradle/publish-maven.gradle" -ext.BOM_GRADLE = "$rootDir/gradle/bom.gradle" -ext.SAMPLE_GRADLE = "$rootDir/gradle/sample.gradle" -ext.TOMCAT_GRADLE = "$rootDir/gradle/tomcat.gradle" -ext.TOMCAT_6_GRADLE = "$rootDir/gradle/tomcat6.gradle" -ext.TOMCAT_7_GRADLE = "$rootDir/gradle/tomcat7.gradle" ext.releaseBuild = version.endsWith('RELEASE') ext.snapshotBuild = version.endsWith('SNAPSHOT') ext.milestoneBuild = !(releaseBuild || snapshotBuild) -apply plugin: 'base' -apply from: JAVA_GRADLE -dependencyManagement { - imports { - mavenBom "org.springframework.data:spring-data-releasetrain:$springDataReleaseTrainVersion" - } -} - -def managedVersions = dependencyManagement.managedVersions - -//println "ManagedVersions Count: " + managedVersions.size() -//managedVersions.each { entry -> println entry } - -ext.springDataGemFireVersion = managedVersions['org.springframework.data:spring-data-gemfire'] -ext.springDataMongoDBVersion = managedVersions['org.springframework.data:spring-data-mongodb'] -ext.springDataRedisVersion = managedVersions['org.springframework.data:spring-data-redis'] - -sonarqube { - properties { - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.projectName", "Spring Session" - property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec" - property "sonar.links.homepage", 'https://github.com/spring-projects/spring-session' - property "sonar.links.ci", 'https://build.spring.io/browse/SESSION' - property "sonar.links.issue", 'https://github.com/spring-projects/spring-session/issues' - property "sonar.links.scm", 'https://github.com/spring-projects/spring-session' - property "sonar.links.scm_dev", 'https://github.com/spring-projects/spring-session.git' - property "sonar.java.coveragePlugin", "jacoco" - } -} - -task configDocsZip(dependsOn: [':docs:asciidoctor',':spring-session:javadoc']) { - doLast { - project.tasks.docsZip.from(project(':docs').asciidoctor) { - into('reference') - } - project.tasks.docsZip.from(project(':spring-session').javadoc) { - into('api') - } - } -} - - -task docsZip(type: Zip, dependsOn: 'configDocsZip') { - group = "Distribution" - baseName = "spring-session" - classifier = "docs" - description = "Builds -${classifier} archive containing api and reference " + - "for deployment." -} - -artifacts { - archives docsZip -} diff --git a/buildSrc/src/main/groovy/build/GemFireServerPlugin.groovy b/buildSrc/src/main/groovy/build/GemFireServerPlugin.groovy new file mode 100644 index 00000000..a056f371 --- /dev/null +++ b/buildSrc/src/main/groovy/build/GemFireServerPlugin.groovy @@ -0,0 +1,70 @@ +package build; + +import org.gradle.api.plugins.JavaPlugin +import org.gradle.api.tasks.bundling.Zip +import org.gradle.api.DefaultTask +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.tasks.TaskAction + +public class GemFireServerPlugin implements Plugin { + + @Override + public void apply(Project project) { + project.tasks.create('gemFireServer', GemFireServerTask) + + project.tasks.integrationTest.doLast { + println 'Stopping GemFire Server...' + project.tasks.gemFireServer.process?.destroyForcibly() + } + + project.tasks.prepareAppServerForIntegrationTests { + dependsOn project.tasks.gemFireServer + doFirst { + project.gretty { + jvmArgs = ["-Dspring.session.data.gemfire.port=${project.tasks.gemFireServer.port}"] + } + } + } + } + + static int availablePort() { + new ServerSocket(0).withCloseable { socket -> + socket.localPort + } + } + + static class GemFireServerTask extends DefaultTask { + def mainClassName = "sample.ServerConfig" + def process + def port + boolean debug + + @TaskAction + def greet() { + port = availablePort() + println "Starting GemFire Server on port [$port]..." + + def out = debug ? System.out : new StringBuilder() + def err = debug ? System.out : new StringBuilder() + + String classpath = project.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.ServerConfig' + ] + + //println commandLine + + project.tasks.appRun.ext.process = process = commandLine.execute() + + process.consumeProcessOutput(out, err) + } + } +} diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/gemfire-server.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/gemfire-server.properties new file mode 100644 index 00000000..bb6a3057 --- /dev/null +++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/gemfire-server.properties @@ -0,0 +1 @@ +implementation-class=build.GemFireServerPlugin \ No newline at end of file diff --git a/docs/build.gradle b/docs/build.gradle deleted file mode 100644 index 67fc7912..00000000 --- a/docs/build.gradle +++ /dev/null @@ -1,75 +0,0 @@ -buildscript { - repositories { - jcenter() - } - - dependencies { - classpath 'org.kordamp.gradle:livereload-gradle-plugin:0.2.1' - } -} - -apply plugin: 'org.kordamp.gradle.livereload' -apply from: JAVA_GRADLE -apply plugin: 'org.asciidoctor.convert' - -liveReload { - docRoot asciidoctor.sourceDir.canonicalPath -} - -asciidoctorj { - -} - -tasks.findByPath("artifactoryPublish")?.enabled = false - -dependencies { - testCompile project(':spring-session'), - project(':spring-session-data-gemfire'), - project(':spring-session-data-mongo'), - project(':spring-session-data-redis'), - "org.springframework:spring-jdbc:${springVersion}", - "org.springframework:spring-messaging:${springVersion}", - "org.springframework:spring-webmvc:${springVersion}", - "org.springframework:spring-websocket:${springVersion}", - "org.springframework.security:spring-security-config:${springSecurityVersion}", - "org.springframework.security:spring-security-web:${springSecurityVersion}", - "org.springframework.security:spring-security-test:${springSecurityVersion}", - "junit:junit:$junitVersion", - "org.mockito:mockito-core:$mockitoVersion", - "org.springframework:spring-test:$springVersion", - "org.assertj:assertj-core:$assertjVersion", - "com.hazelcast:hazelcast:$hazelcastVersion", - "io.lettuce:lettuce-core:$lettuceVersion", - "javax.servlet:javax.servlet-api:$servletApiVersion" -} - -asciidoctor { - def ghTag = snapshotBuild ? 'master' : project.version - def ghUrl = "https://github.com/spring-projects/spring-session/tree/$ghTag" - attributes 'version-snapshot': snapshotBuild, - 'version-milestone': milestoneBuild, - 'version-release': releaseBuild, - 'gh-url': ghUrl, - 'gh-samples-url': "$ghUrl/samples/", - 'download-url' : "https://github.com/spring-projects/spring-session/archive/${ghTag}.zip", - 'spring-session-version' : version, - 'spring-version' : springVersion, - 'lettuce-version' : lettuceVersion, - 'hazelcast-version' : hazelcastVersion, - 'docs-itest-dir' : rootProject.projectDir.path + '/docs/src/integration-test/java/', - 'docs-test-dir' : rootProject.projectDir.path + '/docs/src/test/java/', - 'docs-test-resources-dir' : rootProject.projectDir.path + '/docs/src/test/resources/', - 'samples-dir' : rootProject.projectDir.path + '/samples/', - 'session-main-resources-dir' : rootProject.projectDir.path + '/spring-session/src/main/resources/', - - 'source-highlighter' : 'coderay', - 'imagesdir':'./images', - 'icons': 'font', - 'sectanchors':'', - 'idprefix':'', - 'idseparator':'-', - 'docinfo1':'true', - 'revnumber' : project.version -} - -eclipse.project.name = 'spring-session-docs' diff --git a/docs/spring-session-docs.gradle b/docs/spring-session-docs.gradle new file mode 100644 index 00000000..cd67a951 --- /dev/null +++ b/docs/spring-session-docs.gradle @@ -0,0 +1,45 @@ +apply plugin: 'io.spring.convention.docs' +apply plugin: 'io.spring.convention.spring-test' + +dependencies { + testCompile project(':spring-session') + testCompile project(':spring-session-data-gemfire') + testCompile project(':spring-session-data-mongo') + testCompile project(':spring-session-data-redis') + testCompile "org.springframework:spring-jdbc" + testCompile "org.springframework:spring-messaging" + testCompile "org.springframework:spring-webmvc" + testCompile "org.springframework:spring-websocket" + testCompile "org.springframework.security:spring-security-config" + testCompile "org.springframework.security:spring-security-web" + testCompile "org.springframework.security:spring-security-test" + testCompile "junit:junit" + testCompile "org.mockito:mockito-core" + testCompile "org.springframework:spring-test" + testCompile "org.assertj:assertj-core" + testCompile "com.hazelcast:hazelcast" + testCompile "io.lettuce:lettuce-core" + testCompile "javax.servlet:javax.servlet-api" +} + +def versions = dependencyManagement.managedVersions + +asciidoctor { + def ghTag = snapshotBuild ? 'master' : project.version + def ghUrl = "https://github.com/spring-projects/spring-session/tree/$ghTag" + attributes 'version-snapshot': snapshotBuild, + 'version-milestone': milestoneBuild, + 'version-release': releaseBuild, + 'gh-url': ghUrl, + 'gh-samples-url': "$ghUrl/samples/", + 'download-url' : "https://github.com/spring-projects/spring-session/archive/${ghTag}.zip", + 'spring-session-version' : version, + 'spring-version' : versions['org.springframework:spring-core'], + 'lettuce-version' : versions['io.lettuce:lettuce-core'], + 'hazelcast-version' : versions['com.hazelcast:hazelcast'], + 'docs-itest-dir' : rootProject.projectDir.path + '/docs/src/integration-test/java/', + 'docs-test-dir' : rootProject.projectDir.path + '/docs/src/test/java/', + 'docs-test-resources-dir' : rootProject.projectDir.path + '/docs/src/test/resources/', + 'samples-dir' : rootProject.projectDir.path + '/samples/', + 'session-main-resources-dir' : rootProject.projectDir.path + '/spring-session/src/main/resources/' +} diff --git a/docs/src/docs/asciidoc/guides/java-redis.adoc b/docs/src/docs/asciidoc/guides/java-redis.adoc index a67a952a..b47fcf39 100644 --- a/docs/src/docs/asciidoc/guides/java-redis.adoc +++ b/docs/src/docs/asciidoc/guides/java-redis.adoc @@ -24,8 +24,8 @@ If you are using Maven, ensure to add the following dependencies: pom - biz.paluch.redis - lettuce + io.lettuce + lettuce-core {lettuce-version} diff --git a/docs/src/docs/asciidoc/guides/java-rest.adoc b/docs/src/docs/asciidoc/guides/java-rest.adoc index b8e73109..aa25d991 100644 --- a/docs/src/docs/asciidoc/guides/java-rest.adoc +++ b/docs/src/docs/asciidoc/guides/java-rest.adoc @@ -24,8 +24,8 @@ If you are using Maven, ensure to add the following dependencies: pom - biz.paluch.redis - lettuce + io.lettuce + lettuce-core {lettuce-version} diff --git a/docs/src/docs/asciidoc/guides/java-security.adoc b/docs/src/docs/asciidoc/guides/java-security.adoc index 44b6fc04..7187b4e6 100644 --- a/docs/src/docs/asciidoc/guides/java-security.adoc +++ b/docs/src/docs/asciidoc/guides/java-security.adoc @@ -25,8 +25,8 @@ If you are using Maven, ensure to add the following dependencies: pom - biz.paluch.redis - lettuce + io.lettuce + lettuce-core {lettuce-version} diff --git a/docs/src/docs/asciidoc/guides/xml-redis.adoc b/docs/src/docs/asciidoc/guides/xml-redis.adoc index 86134e27..6581e6af 100644 --- a/docs/src/docs/asciidoc/guides/xml-redis.adoc +++ b/docs/src/docs/asciidoc/guides/xml-redis.adoc @@ -24,8 +24,8 @@ If you are using Maven, ensure to add the following dependencies: pom - biz.paluch.redis - lettuce + io.lettuce + lettuce-core {lettuce-version} diff --git a/gradle.properties b/gradle.properties index 372f4128..646469f6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,25 +1,3 @@ -assertjVersion=2.5.0 -bootstrapVersion=2.3.2 -commonsLoggingVersion=1.2 -commonsPoolVersion=2.4.2 -h2Version=1.4.192 -hazelcastVersion=3.6.5 -html5ShivVersion=3.7.3 -htmlUnitVersion=2.24 -httpClientVersion=4.5.1 -jacksonVersion=2.9.0.pr2 -jedisVersion=2.9.0 -jspApiVersion=2.0 -jstlVersion=1.2.1 -jstlelVersion=1.2.5 -junitVersion=4.12 -lettuceVersion=5.0.0.BUILD-SNAPSHOT -mockitoVersion=2.5.4 -seleniumVersion=3.1.0 -servletApiVersion=3.0.1 -springVersion=5.0.0.BUILD-SNAPSHOT -springDataReleaseTrainVersion=Kay-BUILD-SNAPSHOT -springSecurityVersion=4.2.2.BUILD-SNAPSHOT -springShellVersion=1.1.0.RELEASE -webjarsTaglibVersion=0.3 version=2.0.0.BUILD-SNAPSHOT +springBootVersion=2.0.0.BUILD-SNAPSHOT +springIoVersion=Cairo-BUILD-SNAPSHOT \ No newline at end of file diff --git a/gradle/dependency-management.properties b/gradle/dependency-management.properties new file mode 100644 index 00000000..01a2583b --- /dev/null +++ b/gradle/dependency-management.properties @@ -0,0 +1,9 @@ +com.maxmind.geoip2\:geoip2=2.3.1 +edu.umd.cs.mtc\:multithreadedtc=1.01 +org.springframework.shell\:spring-shell=1.1.0.RELEASE +org.webjars\:bootstrap=2.3.2 +org.webjars\:html5shiv=3.7.3 +org.webjars\:knockout=2.3.0 +org.webjars\:sockjs-client=0.3.4 +org.webjars\:stomp-websocket=2.3.0 +org.webjars\:webjars-taglib=0.3 \ No newline at end of file diff --git a/samples/boot/findbyusername/build.gradle b/samples/boot/findbyusername/build.gradle deleted file mode 100644 index 4a478e9b..00000000 --- a/samples/boot/findbyusername/build.gradle +++ /dev/null @@ -1,57 +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['spring-data-releasetrain.version'] = springDataReleaseTrainVersion - -dependencies { - compile project(':spring-session-data-redis'), - "org.springframework.boot:spring-boot-starter-security", - "org.springframework.boot:spring-boot-starter-thymeleaf", - "org.springframework.boot:spring-boot-starter-web", - "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect", - "org.webjars:bootstrap:$bootstrapVersion", - "org.webjars:html5shiv:$html5ShivVersion", - "org.webjars:webjars-locator", - "com.maxmind.geoip2:geoip2:2.3.1", - "org.apache.httpcomponents:httpclient" - - testCompile "org.springframework.boot:spring-boot-starter-test", - "org.assertj:assertj-core:$assertjVersion" - - integrationTestCompile seleniumDependencies - -} - -integrationTest { - doFirst { - def port = reservePort() - - systemProperties['server.port'] = port - systemProperties['management.port'] = 0 - - systemProperties['spring.session.redis.namespace'] = project.name - } -} - -def reservePort() { - def socket = new ServerSocket(0) - def result = socket.localPort - socket.close() - result -} diff --git a/samples/boot/findbyusername/spring-session-sample-boot-findbyusername.gradle b/samples/boot/findbyusername/spring-session-sample-boot-findbyusername.gradle new file mode 100644 index 00000000..f765848f --- /dev/null +++ b/samples/boot/findbyusername/spring-session-sample-boot-findbyusername.gradle @@ -0,0 +1,31 @@ +apply plugin: 'io.spring.convention.spring-sample-boot' + +dependencies { + compile project(':spring-session-data-redis') + compile "org.springframework.boot:spring-boot-starter-security" + compile "org.springframework.boot:spring-boot-starter-thymeleaf" + compile "org.springframework.boot:spring-boot-starter-web" + compile "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect" + compile "org.webjars:bootstrap" + compile "org.webjars:html5shiv" + compile "org.webjars:webjars-locator" + compile "com.maxmind.geoip2:geoip2" + compile "org.apache.httpcomponents:httpclient" + + testCompile "org.springframework.boot:spring-boot-starter-test" + testCompile "org.assertj:assertj-core" + + integrationTestCompile seleniumDependencies + +} + +integrationTest { + doFirst { + systemProperties['spring.session.redis.namespace'] = project.name + } +} +integrationTest { + doFirst { + systemProperties['spring.session.redis.namespace'] = project.name + } +} \ No newline at end of file diff --git a/samples/boot/findbyusername/src/integration-test/java/sample/FindByUsernameTests.java b/samples/boot/findbyusername/src/integration-test/java/sample/FindByUsernameTests.java index b5ee133c..12ed00bc 100644 --- a/samples/boot/findbyusername/src/integration-test/java/sample/FindByUsernameTests.java +++ b/samples/boot/findbyusername/src/integration-test/java/sample/FindByUsernameTests.java @@ -53,9 +53,7 @@ public class FindByUsernameTests { @After public void tearDown() { - if (this.driver != null) { - this.driver.quit(); - } + this.driver.quit(); } @Test diff --git a/samples/boot/findbyusername/src/main/resources/templates/index.html b/samples/boot/findbyusername/src/main/resources/templates/index.html index 5ba3cb76..8681b4af 100644 --- a/samples/boot/findbyusername/src/main/resources/templates/index.html +++ b/samples/boot/findbyusername/src/main/resources/templates/index.html @@ -20,10 +20,10 @@ - + - +
diff --git a/samples/boot/gemfire/build.gradle b/samples/boot/gemfire/spring-session-sample-boot-gemfire.gradle similarity index 66% rename from samples/boot/gemfire/build.gradle rename to samples/boot/gemfire/spring-session-sample-boot-gemfire.gradle index 02d260d6..9765a9f1 100644 --- a/samples/boot/gemfire/build.gradle +++ b/samples/boot/gemfire/spring-session-sample-boot-gemfire.gradle @@ -1,37 +1,20 @@ -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: 'io.spring.convention.spring-sample-boot' apply plugin: "application" -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -ext['spring-data-releasetrain.version'] = springDataReleaseTrainVersion dependencies { - compile project(':spring-session-data-gemfire'), - "org.springframework.boot:spring-boot-starter-thymeleaf", - "org.springframework.boot:spring-boot-starter-web", - "org.webjars:bootstrap:$bootstrapVersion", - "org.webjars:webjars-locator" + compile project(':spring-session-data-gemfire') + compile "org.springframework.boot:spring-boot-starter-thymeleaf" + compile "org.springframework.boot:spring-boot-starter-web" + compile "org.webjars:bootstrap" + compile "org.webjars:webjars-locator" - runtime "org.springframework.shell:spring-shell:1.1.0.RELEASE" + runtime "org.springframework.shell:spring-shell" testCompile "org.springframework.boot:spring-boot-starter-test" integrationTestCompile seleniumDependencies - integrationTestRuntime "org.springframework.shell:spring-shell:1.1.0.RELEASE" + integrationTestRuntime "org.springframework.shell:spring-shell" } run { @@ -40,8 +23,8 @@ run { } } -springBoot { - mainClassName = 'sample.client.Application' +bootJar { + mainClass = 'sample.client.Application' } task runGemFireServer() { diff --git a/samples/boot/gemfire/src/integration-test/java/sample/pages/HomePage.java b/samples/boot/gemfire/src/integration-test/java/sample/pages/HomePage.java index 18cf1130..0f43fda0 100644 --- a/samples/boot/gemfire/src/integration-test/java/sample/pages/HomePage.java +++ b/samples/boot/gemfire/src/integration-test/java/sample/pages/HomePage.java @@ -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); } diff --git a/samples/boot/gemfire/src/main/java/sample/server/GemFireServer.java b/samples/boot/gemfire/src/main/java/sample/server/GemFireServer.java index 2bec7f7d..0f65756b 100644 --- a/samples/boot/gemfire/src/main/java/sample/server/GemFireServer.java +++ b/samples/boot/gemfire/src/main/java/sample/server/GemFireServer.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017 the original author or authors. + * Copyright 2014-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,6 @@ import org.apache.geode.cache.Cache; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; -import org.springframework.boot.WebApplicationType; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; @@ -51,7 +50,7 @@ public class GemFireServer { public static void main(String[] args) { SpringApplication springApplication = new SpringApplication(GemFireServer.class); - springApplication.setWebApplicationType(WebApplicationType.NONE); + springApplication.setWebEnvironment(false); springApplication.run(args); } diff --git a/samples/boot/jdbc/build.gradle b/samples/boot/jdbc/build.gradle deleted file mode 100644 index fc50b4bf..00000000 --- a/samples/boot/jdbc/build.gradle +++ /dev/null @@ -1,58 +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' - -dependencies { - compile project(':spring-session-jdbc'), - "org.springframework.boot:spring-boot-starter-jdbc", - "org.springframework.boot:spring-boot-starter-web", - "org.springframework.boot:spring-boot-starter-security", - "org.springframework.boot:spring-boot-starter-thymeleaf", - "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect", - "org.webjars:bootstrap:$bootstrapVersion", - "org.webjars:html5shiv:$html5ShivVersion", - "org.webjars:webjars-locator", - "com.h2database:h2" - - testCompile "org.springframework.boot:spring-boot-starter-test", - "org.assertj:assertj-core:$assertjVersion" - - integrationTestCompile seleniumDependencies - -} - -integrationTest { - doFirst { - def port = reservePort() - - def host = 'localhost:' + port - systemProperties['geb.build.baseUrl'] = 'http://'+host+'/' - systemProperties['geb.build.reportsDir'] = 'build/geb-reports' - systemProperties['server.port'] = port - systemProperties['management.port'] = 0 - - systemProperties['spring.session.redis.namespace'] = project.name - } -} - -def reservePort() { - def socket = new ServerSocket(0) - def result = socket.localPort - socket.close() - result -} diff --git a/samples/boot/jdbc/spring-session-sample-boot-jdbc.gradle b/samples/boot/jdbc/spring-session-sample-boot-jdbc.gradle new file mode 100644 index 00000000..e635c1ac --- /dev/null +++ b/samples/boot/jdbc/spring-session-sample-boot-jdbc.gradle @@ -0,0 +1,20 @@ +apply plugin: 'io.spring.convention.spring-sample-boot' + +dependencies { + compile project(':spring-session-jdbc') + compile "org.springframework.boot:spring-boot-starter-jdbc" + compile"org.springframework.boot:spring-boot-starter-web" + compile"org.springframework.boot:spring-boot-starter-security" + compile"org.springframework.boot:spring-boot-starter-thymeleaf" + compile"nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect" + compile"org.webjars:bootstrap" + compile"org.webjars:html5shiv" + compile"org.webjars:webjars-locator" + compile"com.h2database:h2" + + testCompile "org.springframework.boot:spring-boot-starter-test" + testCompile "org.assertj:assertj-core" + + integrationTestCompile seleniumDependencies + +} \ No newline at end of file diff --git a/samples/boot/mongo/build.gradle b/samples/boot/mongo/build.gradle deleted file mode 100644 index 330deed9..00000000 --- a/samples/boot/mongo/build.gradle +++ /dev/null @@ -1,54 +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' - -dependencies { - compile project(':spring-session'), - "org.springframework.data:spring-data-mongodb:$springDataMongoDBVersion", - "org.springframework.boot:spring-boot-starter-web", - "org.springframework.boot:spring-boot-starter-security", - "org.springframework.boot:spring-boot-starter-thymeleaf", - "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect", - "org.webjars:bootstrap:$bootstrapVersion", - "org.webjars:html5shiv:$html5ShivVersion", - "org.webjars:webjars-locator", - "de.flapdoodle.embed:de.flapdoodle.embed.mongo" - - testCompile "org.springframework.boot:spring-boot-starter-test" - - integrationTestCompile seleniumDependencies - -} - -integrationTest { - doFirst { - def port = reservePort() - - systemProperties['server.port'] = port - systemProperties['management.port'] = 0 - - systemProperties['spring.session.redis.namespace'] = project.name - } -} - -def reservePort() { - def socket = new ServerSocket(0) - def result = socket.localPort - socket.close() - result -} diff --git a/samples/boot/mongo/spring-session-sample-boot-mongo.gradle b/samples/boot/mongo/spring-session-sample-boot-mongo.gradle new file mode 100644 index 00000000..fe83eae1 --- /dev/null +++ b/samples/boot/mongo/spring-session-sample-boot-mongo.gradle @@ -0,0 +1,19 @@ +apply plugin: 'io.spring.convention.spring-sample-boot' + +dependencies { + compile project(':spring-session') + compile "org.springframework.data:spring-data-mongodb" + compile "org.springframework.boot:spring-boot-starter-web" + compile "org.springframework.boot:spring-boot-starter-security" + compile "org.springframework.boot:spring-boot-starter-thymeleaf" + compile "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect" + compile "org.webjars:bootstrap" + compile "org.webjars:html5shiv" + compile "org.webjars:webjars-locator" + compile "de.flapdoodle.embed:de.flapdoodle.embed.mongo" + + testCompile "org.springframework.boot:spring-boot-starter-test" + + integrationTestCompile seleniumDependencies + +} \ No newline at end of file diff --git a/samples/boot/redis-json/build.gradle b/samples/boot/redis-json/build.gradle deleted file mode 100644 index 87d9d907..00000000 --- a/samples/boot/redis-json/build.gradle +++ /dev/null @@ -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 -} diff --git a/samples/boot/redis-json/spring-session-sample-boot-redis-json.gradle b/samples/boot/redis-json/spring-session-sample-boot-redis-json.gradle new file mode 100644 index 00000000..b67773ea --- /dev/null +++ b/samples/boot/redis-json/spring-session-sample-boot-redis-json.gradle @@ -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 + +} \ No newline at end of file diff --git a/samples/boot/redis-json/src/integration-test/java/sample/pages/HomePage.java b/samples/boot/redis-json/src/integration-test/java/sample/pages/HomePage.java index 2dedd858..daeb6d1b 100644 --- a/samples/boot/redis-json/src/integration-test/java/sample/pages/HomePage.java +++ b/samples/boot/redis-json/src/integration-test/java/sample/pages/HomePage.java @@ -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); } diff --git a/samples/boot/redis/build.gradle b/samples/boot/redis/build.gradle deleted file mode 100644 index 9e749142..00000000 --- a/samples/boot/redis/build.gradle +++ /dev/null @@ -1,54 +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['spring-data-releasetrain.version'] = springDataReleaseTrainVersion - -dependencies { - compile project(':spring-session-data-redis'), - "org.springframework.boot:spring-boot-starter-security", - "org.springframework.boot:spring-boot-starter-thymeleaf", - "org.springframework.boot:spring-boot-starter-web", - "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect", - "org.webjars:bootstrap:$bootstrapVersion", - "org.webjars:html5shiv:$html5ShivVersion", - "org.webjars:webjars-locator" - - testCompile "org.springframework.boot:spring-boot-starter-test" - - integrationTestCompile seleniumDependencies - -} - -integrationTest { - doFirst { - def port = reservePort() - - systemProperties['server.port'] = port - systemProperties['management.port'] = 0 - - systemProperties['spring.session.redis.namespace'] = project.name - } -} - -def reservePort() { - def socket = new ServerSocket(0) - def result = socket.localPort - socket.close() - result -} diff --git a/samples/boot/redis/spring-session-sample-boot-redis.gradle b/samples/boot/redis/spring-session-sample-boot-redis.gradle new file mode 100644 index 00000000..ec1c7a20 --- /dev/null +++ b/samples/boot/redis/spring-session-sample-boot-redis.gradle @@ -0,0 +1,18 @@ +apply plugin: 'io.spring.convention.spring-sample-boot' + +dependencies { + compile project(':spring-session-data-redis') + compile "io.lettuce:lettuce-core" + compile"org.springframework.boot:spring-boot-starter-security" + compile"org.springframework.boot:spring-boot-starter-thymeleaf" + compile"org.springframework.boot:spring-boot-starter-web" + compile"nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect" + compile"org.webjars:bootstrap" + compile"org.webjars:html5shiv" + compile"org.webjars:webjars-locator" + + testCompile "org.springframework.boot:spring-boot-starter-test" + + integrationTestCompile seleniumDependencies + +} diff --git a/samples/boot/websocket/build.gradle b/samples/boot/websocket/build.gradle deleted file mode 100644 index c31c5c9c..00000000 --- a/samples/boot/websocket/build.gradle +++ /dev/null @@ -1,48 +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: TOMCAT_7_GRADLE -apply from: SAMPLE_GRADLE - -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -group = 'samples' - -dependencies { - compile(project(':spring-session-data-redis')) { - exclude module: 'jedis' - } - compile "org.springframework.boot:spring-boot-starter-data-jpa", - "org.springframework.boot:spring-boot-starter-thymeleaf", - "org.springframework.boot:spring-boot-starter-web", - "org.springframework.boot:spring-boot-starter-websocket", - "org.springframework:spring-websocket:${springVersion}", - "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect", - "io.lettuce:lettuce-core:$lettuceVersion", - "org.webjars:bootstrap:$bootstrapVersion", - "org.webjars:html5shiv:$html5ShivVersion", - "org.webjars:knockout:2.3.0", - "org.webjars:sockjs-client:0.3.4", - "org.webjars:stomp-websocket:2.3.0", - "org.webjars:webjars-locator", - "com.h2database:h2", - "org.springframework.security:spring-security-web:$springSecurityVersion", - "org.springframework.security:spring-security-config:$springSecurityVersion", - "org.springframework.security:spring-security-messaging:$springSecurityVersion", - "org.springframework.security:spring-security-data:$springSecurityVersion" - - - testCompile "org.springframework.boot:spring-boot-starter-test", - "org.springframework.security:spring-security-test:$springSecurityVersion" - -} diff --git a/samples/boot/websocket/spring-session-sample-boot-websocket.gradle b/samples/boot/websocket/spring-session-sample-boot-websocket.gradle new file mode 100644 index 00000000..acadcaae --- /dev/null +++ b/samples/boot/websocket/spring-session-sample-boot-websocket.gradle @@ -0,0 +1,30 @@ +apply plugin: 'io.spring.convention.spring-sample-boot' + +dependencies { + compile(project(':spring-session-data-redis')) { + exclude module: 'jedis' + } + compile "org.springframework.boot:spring-boot-starter-data-jpa" + compile"org.springframework.boot:spring-boot-starter-thymeleaf" + compile"org.springframework.boot:spring-boot-starter-web" + compile"org.springframework.boot:spring-boot-starter-websocket" + compile"org.springframework:spring-websocket" + compile"nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect" + compile"io.lettuce:lettuce-core" + compile"org.webjars:bootstrap" + compile"org.webjars:html5shiv" + compile"org.webjars:knockout" + compile"org.webjars:sockjs-client" + compile"org.webjars:stomp-websocket" + compile"org.webjars:webjars-locator" + compile"com.h2database:h2" + compile"org.springframework.security:spring-security-web" + compile"org.springframework.security:spring-security-config" + compile"org.springframework.security:spring-security-messaging" + compile"org.springframework.security:spring-security-data" + + + testCompile "org.springframework.boot:spring-boot-starter-test" + testCompile "org.springframework.security:spring-security-test" + +} diff --git a/samples/boot/websocket/src/main/java/sample/security/UserRepositoryUserDetailsService.java b/samples/boot/websocket/src/main/java/sample/security/UserRepositoryUserDetailsService.java index bbf5263e..a97a2e2b 100644 --- a/samples/boot/websocket/src/main/java/sample/security/UserRepositoryUserDetailsService.java +++ b/samples/boot/websocket/src/main/java/sample/security/UserRepositoryUserDetailsService.java @@ -68,10 +68,6 @@ public class UserRepositoryUserDetailsService implements UserDetailsService { return AuthorityUtils.createAuthorityList("ROLE_USER"); } - public String getName() { - return getUsername(); - } - public String getUsername() { return getEmail(); } diff --git a/samples/boot/websocket/src/main/java/sample/websocket/WebSocketDisconnectHandler.java b/samples/boot/websocket/src/main/java/sample/websocket/WebSocketDisconnectHandler.java index ce255563..f303d7c9 100644 --- a/samples/boot/websocket/src/main/java/sample/websocket/WebSocketDisconnectHandler.java +++ b/samples/boot/websocket/src/main/java/sample/websocket/WebSocketDisconnectHandler.java @@ -16,8 +16,7 @@ package sample.websocket; -import java.util.Collections; -import java.util.Optional; +import java.util.Arrays; import sample.data.ActiveWebSocketUser; import sample.data.ActiveWebSocketUserRepository; @@ -43,11 +42,14 @@ public class WebSocketDisconnectHandler if (id == null) { return; } - Optional user = this.repository.findOne(id); - if (user.isPresent()) { - this.repository.delete(id); - this.messagingTemplate.convertAndSend("/topic/friends/signout", - Collections.singleton(user.map(ActiveWebSocketUser::getUsername))); + ActiveWebSocketUser user = this.repository.findOne(id); + if (user == null) { + return; } + + this.repository.delete(id); + this.messagingTemplate.convertAndSend("/topic/friends/signout", + Arrays.asList(user.getUsername())); + } } diff --git a/samples/javaconfig/custom-cookie/build.gradle b/samples/javaconfig/custom-cookie/build.gradle deleted file mode 100644 index 5bca3710..00000000 --- a/samples/javaconfig/custom-cookie/build.gradle +++ /dev/null @@ -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 -} diff --git a/samples/javaconfig/custom-cookie/spring-session-sample-javaconfig-custom-cookie.gradle b/samples/javaconfig/custom-cookie/spring-session-sample-javaconfig-custom-cookie.gradle new file mode 100644 index 00000000..bc4d6129 --- /dev/null +++ b/samples/javaconfig/custom-cookie/spring-session-sample-javaconfig-custom-cookie.gradle @@ -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 +} diff --git a/samples/javaconfig/custom-cookie/src/integration-test/java/sample/pages/HomePage.java b/samples/javaconfig/custom-cookie/src/integration-test/java/sample/pages/HomePage.java index 67077fcf..e9e0134f 100644 --- a/samples/javaconfig/custom-cookie/src/integration-test/java/sample/pages/HomePage.java +++ b/samples/javaconfig/custom-cookie/src/integration-test/java/sample/pages/HomePage.java @@ -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); } diff --git a/samples/javaconfig/gemfire-clientserver/build.gradle b/samples/javaconfig/gemfire-clientserver/build.gradle deleted file mode 100644 index 0e628013..00000000 --- a/samples/javaconfig/gemfire-clientserver/build.gradle +++ /dev/null @@ -1,79 +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" -} - - -def port -def process - -mainClassName = "sample.ServerConfig" - -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.ServerConfig' - ] - - //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"); - } -} diff --git a/samples/javaconfig/gemfire-clientserver/spring-session-sample-javaconfig-gemfire-clientserver.gradle b/samples/javaconfig/gemfire-clientserver/spring-session-sample-javaconfig-gemfire-clientserver.gradle new file mode 100644 index 00000000..fc01dbc1 --- /dev/null +++ b/samples/javaconfig/gemfire-clientserver/spring-session-sample-javaconfig-gemfire-clientserver.gradle @@ -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" +} \ No newline at end of file diff --git a/samples/javaconfig/gemfire-clientserver/src/integration-test/java/sample/pages/HomePage.java b/samples/javaconfig/gemfire-clientserver/src/integration-test/java/sample/pages/HomePage.java index 18cf1130..0f43fda0 100644 --- a/samples/javaconfig/gemfire-clientserver/src/integration-test/java/sample/pages/HomePage.java +++ b/samples/javaconfig/gemfire-clientserver/src/integration-test/java/sample/pages/HomePage.java @@ -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); } diff --git a/samples/javaconfig/gemfire-p2p/build.gradle b/samples/javaconfig/gemfire-p2p/build.gradle deleted file mode 100644 index 6548973a..00000000 --- a/samples/javaconfig/gemfire-p2p/build.gradle +++ /dev/null @@ -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" -} diff --git a/samples/javaconfig/gemfire-p2p/spring-session-sample-javaconfig-gemfire-p2p.gradle b/samples/javaconfig/gemfire-p2p/spring-session-sample-javaconfig-gemfire-p2p.gradle new file mode 100644 index 00000000..3f2c8805 --- /dev/null +++ b/samples/javaconfig/gemfire-p2p/spring-session-sample-javaconfig-gemfire-p2p.gradle @@ -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" +} diff --git a/samples/javaconfig/gemfire-p2p/src/integration-test/java/sample/pages/HomePage.java b/samples/javaconfig/gemfire-p2p/src/integration-test/java/sample/pages/HomePage.java index 18cf1130..0f43fda0 100644 --- a/samples/javaconfig/gemfire-p2p/src/integration-test/java/sample/pages/HomePage.java +++ b/samples/javaconfig/gemfire-p2p/src/integration-test/java/sample/pages/HomePage.java @@ -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); } diff --git a/samples/javaconfig/hazelcast/build.gradle b/samples/javaconfig/hazelcast/build.gradle deleted file mode 100644 index bf0d2a80..00000000 --- a/samples/javaconfig/hazelcast/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -apply from: JAVA_GRADLE -apply from: TOMCAT_7_GRADLE -apply from: SAMPLE_GRADLE - -dependencies { - compile project(':spring-session'), - "org.springframework:spring-web:$springVersion", - "org.springframework.security:spring-security-config:$springSecurityVersion", - "org.springframework.security:spring-security-web:$springSecurityVersion", - "org.webjars:bootstrap:$bootstrapVersion", - "org.webjars:webjars-taglib:$webjarsTaglibVersion", - "com.hazelcast:hazelcast-client:$hazelcastVersion", - jstlDependencies - - providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion", - "javax.servlet:jsp-api:$jspApiVersion" - - testCompile "junit:junit:$junitVersion", - "org.assertj:assertj-core:$assertjVersion" - - integrationTestCompile seleniumDependencies -} diff --git a/samples/javaconfig/hazelcast/spring-session-sample-javaconfig-hazelcast.gradle b/samples/javaconfig/hazelcast/spring-session-sample-javaconfig-hazelcast.gradle new file mode 100644 index 00000000..05d80158 --- /dev/null +++ b/samples/javaconfig/hazelcast/spring-session-sample-javaconfig-hazelcast.gradle @@ -0,0 +1,21 @@ +apply plugin: 'io.spring.convention.spring-sample-war' + +dependencies { + compile project(':spring-session') + compile "org.springframework:spring-web" + compile "org.springframework.security:spring-security-config" + compile "org.springframework.security:spring-security-web" + compile "org.webjars:bootstrap" + compile "org.webjars:webjars-taglib" + compile "com.hazelcast:hazelcast-client" + compile jstlDependencies + compile slf4jDependencies + + providedCompile "javax.servlet:javax.servlet-api" + providedCompile "javax.servlet.jsp:javax.servlet.jsp-api" + + testCompile "junit:junit" + testCompile "org.assertj:assertj-core" + + integrationTestCompile seleniumDependencies +} diff --git a/samples/javaconfig/hazelcast/src/integration-test/java/sample/pages/BasePage.java b/samples/javaconfig/hazelcast/src/integration-test/java/sample/pages/BasePage.java index a471078a..6171813f 100644 --- a/samples/javaconfig/hazelcast/src/integration-test/java/sample/pages/BasePage.java +++ b/samples/javaconfig/hazelcast/src/integration-test/java/sample/pages/BasePage.java @@ -35,7 +35,7 @@ public class BasePage { } public 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); } diff --git a/samples/javaconfig/jdbc/build.gradle b/samples/javaconfig/jdbc/build.gradle deleted file mode 100644 index 6c418977..00000000 --- a/samples/javaconfig/jdbc/build.gradle +++ /dev/null @@ -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 -} diff --git a/samples/javaconfig/jdbc/spring-session-sample-javaconfig-jdbc.gradle b/samples/javaconfig/jdbc/spring-session-sample-javaconfig-jdbc.gradle new file mode 100644 index 00000000..326e690b --- /dev/null +++ b/samples/javaconfig/jdbc/spring-session-sample-javaconfig-jdbc.gradle @@ -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 +} diff --git a/samples/javaconfig/jdbc/src/integration-test/java/sample/pages/HomePage.java b/samples/javaconfig/jdbc/src/integration-test/java/sample/pages/HomePage.java index 67077fcf..e9e0134f 100644 --- a/samples/javaconfig/jdbc/src/integration-test/java/sample/pages/HomePage.java +++ b/samples/javaconfig/jdbc/src/integration-test/java/sample/pages/HomePage.java @@ -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); } diff --git a/samples/javaconfig/redis/build.gradle b/samples/javaconfig/redis/build.gradle deleted file mode 100644 index 5bca3710..00000000 --- a/samples/javaconfig/redis/build.gradle +++ /dev/null @@ -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 -} diff --git a/samples/javaconfig/redis/spring-session-sample-javaconfig-redis.gradle b/samples/javaconfig/redis/spring-session-sample-javaconfig-redis.gradle new file mode 100644 index 00000000..bc4d6129 --- /dev/null +++ b/samples/javaconfig/redis/spring-session-sample-javaconfig-redis.gradle @@ -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 +} diff --git a/samples/javaconfig/redis/src/integration-test/java/sample/pages/HomePage.java b/samples/javaconfig/redis/src/integration-test/java/sample/pages/HomePage.java index 67077fcf..e9e0134f 100644 --- a/samples/javaconfig/redis/src/integration-test/java/sample/pages/HomePage.java +++ b/samples/javaconfig/redis/src/integration-test/java/sample/pages/HomePage.java @@ -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); } diff --git a/samples/javaconfig/rest/build.gradle b/samples/javaconfig/rest/build.gradle deleted file mode 100644 index f6bf69fd..00000000 --- a/samples/javaconfig/rest/build.gradle +++ /dev/null @@ -1,23 +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 "io.lettuce:lettuce-core:$lettuceVersion", - "org.springframework:spring-webmvc:$springVersion", - "org.springframework.security:spring-security-config:$springSecurityVersion", - "org.springframework.security:spring-security-web:$springSecurityVersion", - "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion", - jstlDependencies - - providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion" - - testCompile "junit:junit:$junitVersion", - "org.springframework.security:spring-security-test:$springSecurityVersion", - "org.assertj:assertj-core:$assertjVersion", - "org.springframework:spring-test:$springVersion", - "commons-codec:commons-codec:1.6" -} diff --git a/samples/javaconfig/rest/spring-session-sample-javaconfig-rest.gradle b/samples/javaconfig/rest/spring-session-sample-javaconfig-rest.gradle new file mode 100644 index 00000000..7e50bf80 --- /dev/null +++ b/samples/javaconfig/rest/spring-session-sample-javaconfig-rest.gradle @@ -0,0 +1,22 @@ +apply plugin: 'io.spring.convention.spring-sample-war' + +dependencies { + compile(project(':spring-session-data-redis')) { + exclude module: 'jedis' + } + compile "io.lettuce:lettuce-core" + compile "org.springframework:spring-webmvc" + compile "org.springframework.security:spring-security-config" + compile "org.springframework.security:spring-security-web" + compile "com.fasterxml.jackson.core:jackson-databind" + compile jstlDependencies + compile slf4jDependencies + + providedCompile "javax.servlet:javax.servlet-api" + + testCompile "junit:junit" + testCompile "org.springframework.security:spring-security-test" + testCompile "org.assertj:assertj-core" + testCompile "org.springframework:spring-test" + testCompile "commons-codec:commons-codec" +} \ No newline at end of file diff --git a/samples/javaconfig/rest/src/integration-test/java/sample/RestTests.java b/samples/javaconfig/rest/src/integration-test/java/sample/RestTests.java index fcf90dd3..e12c763b 100644 --- a/samples/javaconfig/rest/src/integration-test/java/sample/RestTests.java +++ b/samples/javaconfig/rest/src/integration-test/java/sample/RestTests.java @@ -48,7 +48,7 @@ public class RestTests { @Before public void setUp() { - this.baseUrl = "http://localhost:" + System.getProperty("tomcat.port"); + this.baseUrl = "http://localhost:" + System.getProperty("app.port"); this.restTemplate = new RestTemplate(); } diff --git a/samples/javaconfig/security/build.gradle b/samples/javaconfig/security/build.gradle deleted file mode 100644 index f9215f6a..00000000 --- a/samples/javaconfig/security/build.gradle +++ /dev/null @@ -1,25 +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", - "org.springframework.security:spring-security-config:$springSecurityVersion", - "org.springframework.security:spring-security-web:$springSecurityVersion", - "io.lettuce:lettuce-core:$lettuceVersion", - "org.webjars:bootstrap:$bootstrapVersion", - "org.webjars:webjars-taglib:$webjarsTaglibVersion", - jstlDependencies - - providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion", - "javax.servlet:jsp-api:$jspApiVersion" - - testCompile "junit:junit:$junitVersion", - "org.assertj:assertj-core:$assertjVersion", - "org.springframework:spring-test:$springVersion" - - integrationTestCompile seleniumDependencies -} diff --git a/samples/javaconfig/security/spring-session-sample-javaconfig-security.gradle b/samples/javaconfig/security/spring-session-sample-javaconfig-security.gradle new file mode 100644 index 00000000..65dce5e8 --- /dev/null +++ b/samples/javaconfig/security/spring-session-sample-javaconfig-security.gradle @@ -0,0 +1,24 @@ +apply plugin: 'io.spring.convention.spring-sample-war' + +dependencies { + compile(project(':spring-session-data-redis')) { + exclude module: 'jedis' + } + compile "org.springframework:spring-web" + compile "org.springframework.security:spring-security-config" + compile "org.springframework.security:spring-security-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" + providedCompile "javax.servlet.jsp:javax.servlet.jsp-api" + + testCompile "junit:junit" + testCompile "org.assertj:assertj-core" + testCompile "org.springframework:spring-test" + + integrationTestCompile seleniumDependencies +} diff --git a/samples/javaconfig/security/src/integration-test/java/sample/pages/BasePage.java b/samples/javaconfig/security/src/integration-test/java/sample/pages/BasePage.java index 661ff960..77933d97 100644 --- a/samples/javaconfig/security/src/integration-test/java/sample/pages/BasePage.java +++ b/samples/javaconfig/security/src/integration-test/java/sample/pages/BasePage.java @@ -35,7 +35,7 @@ public abstract class BasePage { } public static void get(WebDriver driver, String get) { - String baseUrl = "http://localhost:" + System.getProperty("tomcat.port"); + String baseUrl = "http://localhost:" + System.getProperty("app.port"); driver.get(baseUrl + get); } } diff --git a/samples/javaconfig/users/build.gradle b/samples/javaconfig/users/build.gradle deleted file mode 100644 index 396bead4..00000000 --- a/samples/javaconfig/users/build.gradle +++ /dev/null @@ -1,22 +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.springframework:spring-test:$springVersion", - "org.assertj:assertj-core:$assertjVersion" - - integrationTestCompile seleniumDependencies -} diff --git a/samples/javaconfig/users/spring-session-sample-javaconfig-users.gradle b/samples/javaconfig/users/spring-session-sample-javaconfig-users.gradle new file mode 100644 index 00000000..58e24d04 --- /dev/null +++ b/samples/javaconfig/users/spring-session-sample-javaconfig-users.gradle @@ -0,0 +1,21 @@ +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.springframework:spring-test" + testCompile "org.assertj:assertj-core" + + integrationTestCompile seleniumDependencies +} diff --git a/samples/javaconfig/users/src/integration-test/java/sample/pages/BasePage.java b/samples/javaconfig/users/src/integration-test/java/sample/pages/BasePage.java index c141a49f..8a6b6b94 100644 --- a/samples/javaconfig/users/src/integration-test/java/sample/pages/BasePage.java +++ b/samples/javaconfig/users/src/integration-test/java/sample/pages/BasePage.java @@ -39,7 +39,7 @@ public abstract class BasePage { } public static void get(WebDriver driver, String get) { - String baseUrl = "http://localhost:" + System.getProperty("tomcat.port"); + String baseUrl = "http://localhost:" + System.getProperty("app.port"); driver.get(baseUrl + get); } diff --git a/samples/misc/grails3/build.gradle b/samples/misc/grails3/spring-session-sample-misc-grails3.gradle similarity index 90% rename from samples/misc/grails3/build.gradle rename to samples/misc/grails3/spring-session-sample-misc-grails3.gradle index b652e80d..e57e6255 100644 --- a/samples/misc/grails3/build.gradle +++ b/samples/misc/grails3/spring-session-sample-misc-grails3.gradle @@ -55,9 +55,9 @@ dependencies { runtime "com.h2database:h2" testCompile "org.grails:grails-plugin-testing" testCompile "org.grails.plugins:geb" - testCompile "org.assertj:assertj-core:$assertjVersion" - testCompile "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1" - testCompile "net.sourceforge.htmlunit:htmlunit:2.18" + testCompile "org.assertj:assertj-core" + testCompile "org.seleniumhq.selenium:selenium-htmlunit-driver" + testCompile "net.sourceforge.htmlunit:htmlunit" compile "org.springframework.boot:spring-boot-starter-redis" compile 'org.springframework.session:spring-session:1.1.1.RELEASE' diff --git a/samples/misc/hazelcast/build.gradle b/samples/misc/hazelcast/build.gradle deleted file mode 100644 index 2e589514..00000000 --- a/samples/misc/hazelcast/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -apply from: JAVA_GRADLE -apply from: TOMCAT_7_GRADLE -apply from: SAMPLE_GRADLE - -dependencies { - compile project(':spring-session'), - "org.webjars:bootstrap:$bootstrapVersion", - "org.webjars:webjars-taglib:$webjarsTaglibVersion", - "com.hazelcast:hazelcast-client:$hazelcastVersion", - jstlDependencies - - providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion" - - testCompile "junit:junit:$junitVersion", - "org.assertj:assertj-core:$assertjVersion" - - integrationTestCompile seleniumDependencies -} diff --git a/samples/misc/hazelcast/spring-session-sample-misc-hazelcast.gradle b/samples/misc/hazelcast/spring-session-sample-misc-hazelcast.gradle new file mode 100644 index 00000000..137a5e1f --- /dev/null +++ b/samples/misc/hazelcast/spring-session-sample-misc-hazelcast.gradle @@ -0,0 +1,17 @@ +apply plugin: 'io.spring.convention.spring-sample-war' + +dependencies { + compile project(':spring-session') + compile "org.webjars:bootstrap" + compile "org.webjars:webjars-taglib" + compile "com.hazelcast:hazelcast-client" + compile jstlDependencies + compile slf4jDependencies + + providedCompile "javax.servlet:javax.servlet-api" + + testCompile "junit:junit" + testCompile "org.assertj:assertj-core" + + integrationTestCompile seleniumDependencies +} diff --git a/samples/misc/hazelcast/src/integration-test/java/sample/pages/HomePage.java b/samples/misc/hazelcast/src/integration-test/java/sample/pages/HomePage.java index 67077fcf..e9e0134f 100644 --- a/samples/misc/hazelcast/src/integration-test/java/sample/pages/HomePage.java +++ b/samples/misc/hazelcast/src/integration-test/java/sample/pages/HomePage.java @@ -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); } diff --git a/samples/xml/gemfire-clientserver/build.gradle b/samples/xml/gemfire-clientserver/build.gradle deleted file mode 100644 index a155b99f..00000000 --- a/samples/xml/gemfire-clientserver/build.gradle +++ /dev/null @@ -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"); - } -} diff --git a/samples/xml/gemfire-clientserver/spring-session-sample-xml-gemfire-clientserver.gradle b/samples/xml/gemfire-clientserver/spring-session-sample-xml-gemfire-clientserver.gradle new file mode 100644 index 00000000..f59a78fa --- /dev/null +++ b/samples/xml/gemfire-clientserver/spring-session-sample-xml-gemfire-clientserver.gradle @@ -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" +} diff --git a/samples/xml/gemfire-clientserver/src/integration-test/java/sample/pages/HomePage.java b/samples/xml/gemfire-clientserver/src/integration-test/java/sample/pages/HomePage.java index 18cf1130..0f43fda0 100644 --- a/samples/xml/gemfire-clientserver/src/integration-test/java/sample/pages/HomePage.java +++ b/samples/xml/gemfire-clientserver/src/integration-test/java/sample/pages/HomePage.java @@ -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); } diff --git a/samples/xml/gemfire-p2p/build.gradle b/samples/xml/gemfire-p2p/build.gradle deleted file mode 100644 index 6548973a..00000000 --- a/samples/xml/gemfire-p2p/build.gradle +++ /dev/null @@ -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" -} diff --git a/samples/xml/gemfire-p2p/spring-session-sample-xml-gemfire-p2p.gradle b/samples/xml/gemfire-p2p/spring-session-sample-xml-gemfire-p2p.gradle new file mode 100644 index 00000000..3f2c8805 --- /dev/null +++ b/samples/xml/gemfire-p2p/spring-session-sample-xml-gemfire-p2p.gradle @@ -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" +} diff --git a/samples/xml/gemfire-p2p/src/integration-test/java/sample/pages/HomePage.java b/samples/xml/gemfire-p2p/src/integration-test/java/sample/pages/HomePage.java index 18cf1130..0f43fda0 100644 --- a/samples/xml/gemfire-p2p/src/integration-test/java/sample/pages/HomePage.java +++ b/samples/xml/gemfire-p2p/src/integration-test/java/sample/pages/HomePage.java @@ -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); } diff --git a/samples/xml/jdbc/build.gradle b/samples/xml/jdbc/build.gradle deleted file mode 100644 index 6c418977..00000000 --- a/samples/xml/jdbc/build.gradle +++ /dev/null @@ -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 -} diff --git a/samples/xml/jdbc/spring-session-sample-xml-jdbc.gradle b/samples/xml/jdbc/spring-session-sample-xml-jdbc.gradle new file mode 100644 index 00000000..c2968256 --- /dev/null +++ b/samples/xml/jdbc/spring-session-sample-xml-jdbc.gradle @@ -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 +} diff --git a/samples/xml/jdbc/src/integration-test/java/sample/pages/HomePage.java b/samples/xml/jdbc/src/integration-test/java/sample/pages/HomePage.java index 67077fcf..e9e0134f 100644 --- a/samples/xml/jdbc/src/integration-test/java/sample/pages/HomePage.java +++ b/samples/xml/jdbc/src/integration-test/java/sample/pages/HomePage.java @@ -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); } diff --git a/samples/xml/redis/build.gradle b/samples/xml/redis/build.gradle deleted file mode 100644 index 5bca3710..00000000 --- a/samples/xml/redis/build.gradle +++ /dev/null @@ -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 -} diff --git a/samples/xml/redis/spring-session-sample-xml-redis.gradle b/samples/xml/redis/spring-session-sample-xml-redis.gradle new file mode 100644 index 00000000..bc4d6129 --- /dev/null +++ b/samples/xml/redis/spring-session-sample-xml-redis.gradle @@ -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 +} diff --git a/samples/xml/redis/src/integration-test/java/sample/pages/HomePage.java b/samples/xml/redis/src/integration-test/java/sample/pages/HomePage.java index b6247cb2..92b9062a 100644 --- a/samples/xml/redis/src/integration-test/java/sample/pages/HomePage.java +++ b/samples/xml/redis/src/integration-test/java/sample/pages/HomePage.java @@ -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); } diff --git a/settings.gradle b/settings.gradle index 5862aaa1..792dbf04 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,38 +1,27 @@ rootProject.name = 'spring-session-build' -include 'docs' -include 'spring-session' -include 'spring-session-data-gemfire' -include 'spring-session-data-mongo' -include 'spring-session-data-redis' -include 'spring-session-hazelcast' -include 'spring-session-jdbc' +FileTree buildFiles = fileTree(rootDir) { + include '**/*.gradle' + exclude '**/gradle', 'settings.gradle', 'buildSrc', '/build.gradle', '.*' + exclude '**/grails3' +} -includeSamples("samples" + File.separator + "boot") -includeSamples("samples" + File.separator + "javaconfig") -includeSamples("samples" + File.separator + "misc") -includeSamples("samples" + File.separator + "xml") - -void includeSamples(String samplesDir) { - FileTree tree = fileTree(samplesDir) { - include '**' + File.separator + '*.gradle' - exclude 'grails3' - } - tree.each {File file -> - String projectDir = file.path.substring(file.path.indexOf(samplesDir), file.path.lastIndexOf(File.separator)) - String projectPath = projectDir.substring(projectDir.lastIndexOf(File.separator) + 1) - String projectNamePrefix = samplesDir.substring(samplesDir.lastIndexOf(File.separator) + 1).toLowerCase(); +String rootDirPath = rootDir.absolutePath + File.separator +buildFiles.each { File buildFile -> + boolean isDefaultName = 'build.gradle'.equals(buildFile.name) + if(isDefaultName) { + String buildFilePath = buildFile.parentFile.absolutePath + String projectPath = buildFilePath.replace(rootDirPath, '').replaceAll(File.separator, ':') include projectPath - - def project = findProject(":${projectPath}") - - project.name = "spring-session-samples-${projectNamePrefix}-${project.name}" - project.projectDir = new File(settingsDir, projectDir) - - if (!project.buildFile.exists()) { - project.buildFileName = file.path.substring(file.path.lastIndexOf(File.separator) + 1) - } + } else { + String projectName = buildFile.name.replace('.gradle', ''); + String projectPath = ':' + projectName; + include projectPath + def project = findProject("${projectPath}") + project.name = projectName + project.projectDir = buildFile.parentFile + project.buildFileName = buildFile.name } -} \ No newline at end of file +} diff --git a/spring-session-data-gemfire/build.gradle b/spring-session-data-gemfire/build.gradle deleted file mode 100644 index 74cbc4fc..00000000 --- a/spring-session-data-gemfire/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -apply from: JAVA_GRADLE -apply from: MAVEN_GRADLE -apply from: BOM_GRADLE -apply plugin: 'spring-io' - -description = "Aggregator for Spring Session and Spring Data GemFire" - -dependencyManagement { - springIoTestRuntime { - imports { - mavenBom "io.spring.platform:platform-bom:${springIoVersion}" - } - } -} - -dependencies { - compile project(':spring-session') - compile("org.springframework.data:spring-data-gemfire:$springDataGemFireVersion") { - exclude group: "org.slf4j", module: 'slf4j-api' - exclude group: "org.slf4j", module: 'jcl-over-slf4j' - } -} diff --git a/spring-session-data-gemfire/spring-session-data-gemfire.gradle b/spring-session-data-gemfire/spring-session-data-gemfire.gradle new file mode 100644 index 00000000..004be669 --- /dev/null +++ b/spring-session-data-gemfire/spring-session-data-gemfire.gradle @@ -0,0 +1,11 @@ +apply plugin: 'io.spring.convention.spring-pom' + +description = "Aggregator for Spring Session and Spring Data GemFire" + +dependencies { + compile project(':spring-session') + compile("org.springframework.data:spring-data-gemfire") { + exclude group: "org.slf4j", module: 'slf4j-api' + exclude group: "org.slf4j", module: 'jcl-over-slf4j' + } +} diff --git a/spring-session-data-mongo/build.gradle b/spring-session-data-mongo/build.gradle deleted file mode 100644 index cb72c255..00000000 --- a/spring-session-data-mongo/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -apply from: JAVA_GRADLE -apply from: MAVEN_GRADLE -apply from: BOM_GRADLE - -apply plugin: 'spring-io' - -description = "Aggregator for Spring Session and Spring Data Mongo" - -dependencyManagement { - springIoTestRuntime { - imports { - mavenBom "io.spring.platform:platform-bom:${springIoVersion}" - } - } -} - -dependencies { - compile project(':spring-session'), - "org.springframework.data:spring-data-mongodb:$springDataMongoDBVersion" -} diff --git a/spring-session-data-mongo/spring-session-data-mongo.gradle b/spring-session-data-mongo/spring-session-data-mongo.gradle new file mode 100644 index 00000000..5989a724 --- /dev/null +++ b/spring-session-data-mongo/spring-session-data-mongo.gradle @@ -0,0 +1,8 @@ +apply plugin: 'io.spring.convention.spring-pom' + +description = "Aggregator for Spring Session and Spring Data Mongo" + +dependencies { + compile project(':spring-session') + compile "org.springframework.data:spring-data-mongodb" +} diff --git a/spring-session-data-redis/build.gradle b/spring-session-data-redis/build.gradle deleted file mode 100644 index 8fdd61d0..00000000 --- a/spring-session-data-redis/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -apply from: JAVA_GRADLE -apply from: MAVEN_GRADLE -apply from: BOM_GRADLE - -apply plugin: 'spring-io' - -description = "Aggregator for Spring Session and Spring Data Redis" - -dependencyManagement { - springIoTestRuntime { - imports { - mavenBom "io.spring.platform:platform-bom:${springIoVersion}" - } - } -} - -dependencies { - compile project(':spring-session') - compile ("org.springframework.data:spring-data-redis:$springDataRedisVersion") { - exclude group: "org.slf4j", module: 'slf4j-api' - exclude group: "org.slf4j", module: 'jcl-over-slf4j' - } - compile "redis.clients:jedis:$jedisVersion", - "org.apache.commons:commons-pool2:$commonsPoolVersion" -} diff --git a/spring-session-data-redis/spring-session-data-redis.gradle b/spring-session-data-redis/spring-session-data-redis.gradle new file mode 100644 index 00000000..d02deea6 --- /dev/null +++ b/spring-session-data-redis/spring-session-data-redis.gradle @@ -0,0 +1,13 @@ +apply plugin: 'io.spring.convention.spring-pom' + +description = "Aggregator for Spring Session and Spring Data Redis" + +dependencies { + compile project(':spring-session') + compile ("org.springframework.data:spring-data-redis") { + exclude group: "org.slf4j", module: 'slf4j-api' + exclude group: "org.slf4j", module: 'jcl-over-slf4j' + } + compile "redis.clients:jedis" + compile "org.apache.commons:commons-pool2" +} diff --git a/spring-session-hazelcast/build.gradle b/spring-session-hazelcast/build.gradle deleted file mode 100644 index 8844ae78..00000000 --- a/spring-session-hazelcast/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -apply from: JAVA_GRADLE -apply from: MAVEN_GRADLE -apply from: BOM_GRADLE - -apply plugin: 'spring-io' - -description = "Aggregator for Spring Session and Hazelcast" - -dependencies { - compile project(':spring-session'), - "com.hazelcast:hazelcast:$hazelcastVersion" -} - -dependencyManagement { - springIoTestRuntime { - imports { - mavenBom "io.spring.platform:platform-bom:${springIoVersion}" - } - } -} diff --git a/spring-session-hazelcast/spring-session-hazelcast.gradle b/spring-session-hazelcast/spring-session-hazelcast.gradle new file mode 100644 index 00000000..bb863e03 --- /dev/null +++ b/spring-session-hazelcast/spring-session-hazelcast.gradle @@ -0,0 +1,6 @@ +apply plugin: 'io.spring.convention.spring-pom' + +dependencies { + compile project(':spring-session') + compile "com.hazelcast:hazelcast" +} \ No newline at end of file diff --git a/spring-session-jdbc/build.gradle b/spring-session-jdbc/build.gradle deleted file mode 100644 index 370253b7..00000000 --- a/spring-session-jdbc/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -apply from: JAVA_GRADLE -apply from: MAVEN_GRADLE -apply from: BOM_GRADLE - -apply plugin: 'spring-io' - -description = "Aggregator for Spring Session and Spring JDBC" - -dependencies { - compile project(':spring-session'), - "org.springframework:spring-jdbc:$springVersion" -} - -dependencyManagement { - springIoTestRuntime { - imports { - mavenBom "io.spring.platform:platform-bom:${springIoVersion}" - } - } -} diff --git a/spring-session-jdbc/spring-session-jdbc.gradle b/spring-session-jdbc/spring-session-jdbc.gradle new file mode 100644 index 00000000..58a930b5 --- /dev/null +++ b/spring-session-jdbc/spring-session-jdbc.gradle @@ -0,0 +1,8 @@ +apply plugin: 'io.spring.convention.spring-pom' + +description = "Aggregator for Spring Session and Spring JDBC" + +dependencies { + compile project(':spring-session') + compile "org.springframework:spring-jdbc" +} diff --git a/spring-session/build.gradle b/spring-session/build.gradle deleted file mode 100644 index 7d7de61d..00000000 --- a/spring-session/build.gradle +++ /dev/null @@ -1,123 +0,0 @@ -apply from: JAVA_GRADLE -apply from: SPRING3_GRADLE -apply from: MAVEN_GRADLE - -apply plugin: 'spring-io' - -description = "Spring Session" - -project.conf2ScopeMappings.addMapping(MavenPlugin.TEST_COMPILE_PRIORITY + 1, project.configurations.getByName("integrationTestCompile"), Conf2ScopeMappingContainer.TEST) -project.conf2ScopeMappings.addMapping(MavenPlugin.TEST_COMPILE_PRIORITY + 2, project.configurations.getByName("integrationTestRuntime"), Conf2ScopeMappingContainer.TEST) -check.dependsOn integrationTest - -configurations { - jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo -} - -dependencyManagement { - springIoTestRuntime { - imports { - mavenBom "io.spring.platform:platform-bom:$springIoVersion" - } - } -} - -dependencies { - compile "commons-logging:commons-logging:$commonsLoggingVersion" - - optional "org.springframework:spring-context:$springVersion", - "org.springframework:spring-jdbc:$springVersion", - "org.springframework:spring-messaging:$springVersion", - "org.springframework:spring-web:$springVersion", - "org.springframework:spring-websocket:$springVersion", - "org.springframework.data:spring-data-gemfire:$springDataGemFireVersion", - "org.springframework.data:spring-data-mongodb:$springDataMongoDBVersion", - "org.springframework.data:spring-data-redis:$springDataRedisVersion", - "org.springframework.security:spring-security-core:$springSecurityVersion", - "org.springframework.security:spring-security-web:$springSecurityVersion", - "com.hazelcast:hazelcast:$hazelcastVersion" - - provided "javax.servlet:javax.servlet-api:$servletApiVersion" - - integrationTestCompile "redis.clients:jedis:$jedisVersion", - "org.apache.commons:commons-pool2:2.2", - "org.apache.derby:derby:10.12.1.1", - "com.h2database:h2:$h2Version", - "com.hazelcast:hazelcast-client:$hazelcastVersion", - "org.hsqldb:hsqldb:2.4.0", - "de.flapdoodle.embed:de.flapdoodle.embed.mongo:1.50.2" - - integrationTestRuntime "org.springframework.shell:spring-shell:1.1.0.RELEASE" - - testCompile "junit:junit:$junitVersion", - "org.mockito:mockito-core:$mockitoVersion", - "edu.umd.cs.mtc:multithreadedtc:1.01", - "org.springframework:spring-test:$springVersion", - "org.assertj:assertj-core:$assertjVersion", - "org.springframework.security:spring-security-core:$springSecurityVersion", - "org.apache.commons:commons-pool2:2.2", - "org.apache.derby:derby:10.12.1.1", - "com.h2database:h2:$h2Version", - "com.hazelcast:hazelcast-client:$hazelcastVersion", - "org.hsqldb:hsqldb:2.4.0", - "de.flapdoodle.embed:de.flapdoodle.embed.mongo:1.50.2", - "redis.clients:jedis:$jedisVersion" - - jacoco "org.jacoco:org.jacoco.agent:0.7.2.201409121644:runtime" - -} - -ext.javadocLinks = [ - "http://docs.oracle.com/javase/8/docs/api/", - "http://docs.oracle.com/javaee/7/api/", - "http://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/", // CommonJ - "http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.javadoc.doc/web/apidocs/", - "http://glassfish.java.net/nonav/docs/v3/api/", - "http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/", - "http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/", - "http://commons.apache.org/proper/commons-lang/javadocs/api-2.5/", - "http://commons.apache.org/proper/commons-codec/apidocs/", - "http://commons.apache.org/proper/commons-dbcp/apidocs/", - "http://portals.apache.org/pluto/portlet-2.0-apidocs/", - "http://tiles.apache.org/tiles-request/apidocs/", - "http://tiles.apache.org/framework/apidocs/", - "http://aopalliance.sourceforge.net/doc/", - "http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/", - "http://quartz-scheduler.org/api/2.2.0/", - "http://fasterxml.github.com/jackson-core/javadoc/2.3.0/", - "http://fasterxml.github.com/jackson-databind/javadoc/2.3.0/", - "http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/" -] as String[] - -javadoc { - description = "Generates project-level javadoc for use in -javadoc jar" - - options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED - options.author = true - options.header = project.name - options.links(project.ext.javadocLinks) - -} - -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' - from sourceSets.main.allSource - // don't include or exclude anything explicitly by default. See SPR-12085. -} - -task javadocJar(type: Jar) { - classifier = "javadoc" - from javadoc -} - -artifacts { - archives sourcesJar - archives javadocJar -} - -test { - jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=${project.group}.*" -} -integrationTest { - jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=${project.group}.*" -} diff --git a/spring-session/spring-session.gradle b/spring-session/spring-session.gradle new file mode 100644 index 00000000..5db2c240 --- /dev/null +++ b/spring-session/spring-session.gradle @@ -0,0 +1,38 @@ +apply plugin: 'io.spring.convention.spring-module' + +description = "Spring Session" + +dependencies { + compile "commons-logging:commons-logging" + + optional "org.springframework:spring-context" + optional "org.springframework:spring-jdbc" + optional "org.springframework:spring-messaging" + optional "org.springframework:spring-web" + optional "org.springframework:spring-websocket" + optional "org.springframework.data:spring-data-gemfire" + optional "org.springframework.data:spring-data-mongodb" + optional "org.springframework.data:spring-data-redis" + optional "org.springframework.security:spring-security-core" + optional "org.springframework.security:spring-security-web" + optional "com.hazelcast:hazelcast" + + provided "javax.servlet:javax.servlet-api" + + integrationTestCompile "redis.clients:jedis" + integrationTestCompile "org.apache.commons:commons-pool2" + integrationTestCompile "org.apache.derby:derby" + integrationTestCompile "com.h2database:h2" + integrationTestCompile "com.hazelcast:hazelcast-client" + integrationTestCompile "org.hsqldb:hsqldb" + integrationTestCompile "de.flapdoodle.embed:de.flapdoodle.embed.mongo" + + integrationTestRuntime "org.springframework.shell:spring-shell" + + testCompile "junit:junit" + testCompile "org.mockito:mockito-core" + testCompile "edu.umd.cs.mtc:multithreadedtc" + testCompile "org.springframework:spring-test" + testCompile "org.assertj:assertj-core" + testCompile "org.springframework.security:spring-security-core" +}