123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- apply plugin: 'io.spring.convention.spring-sample-war'
- def keystore = "$rootDir/samples/certificates/server.jks"
- def password = 'password'
- sourceSets {
- test.resources.exclude 'GebConfig.groovy'
- integrationTest.groovy.srcDir file('src/integration-test/groovy')
- }
- dependencies {
- compile project(':spring-security-cas')
- compile project(':spring-security-core')
- compile 'org.jasig.cas.client:cas-client-core'
- providedCompile 'javax.servlet:javax.servlet-api'
- runtime project(':spring-security-config')
- runtime project(':spring-security-web')
- runtime 'ch.qos.logback:logback-classic'
- runtime 'net.sf.ehcache:ehcache'
- runtime 'org.slf4j:jcl-over-slf4j'
- runtime 'org.springframework:spring-context-support'
- integrationTestCompile project(':spring-security-cas')
- integrationTestCompile gebDependencies
- integrationTestCompile seleniumDependencies
- integrationTestCompile spockDependencies
- integrationTestCompile 'org.codehaus.groovy:groovy'
- integrationTestCompile 'org.eclipse.jetty:jetty-server'
- integrationTestCompile 'org.eclipse.jetty:jetty-servlet'
- integrationTestCompile 'org.slf4j:jcl-over-slf4j'
- }
- integrationTest {
- dependsOn { casServer().tasks.appBeforeIntegrationTest }
- doFirst {
- def casServiceHost = 'localhost:' + gretty.httpsPort
- def casServerHost = 'localhost:' + casServer().gretty.httpsPort
- systemProperties['cas.server.host'] = casServerHost
- systemProperties['cas.service.host'] = casServiceHost
- systemProperties['geb.build.baseUrl'] = 'https://'+casServiceHost+'/cas-sample/'
- systemProperties['geb.build.reportsDir'] = 'build/geb-reports'
- systemProperties['jar.path'] = jar.archivePath
- systemProperties['javax.net.ssl.trustStore'] = keystore
- systemProperties['javax.net.ssl.trustStorePassword'] = password
- }
- finalizedBy { casServer().tasks.appAfterIntegrationTest }
- }
- prepareAppServerForIntegrationTests {
- dependsOn { casServer().tasks.appBeforeIntegrationTest }
- doLast {
- def casServiceHost = 'localhost:' + project.gretty.httpsPort
- def casServerHost = 'localhost:' + casServer().gretty.httpsPort
- gretty.jvmArgs += ["-Dcas.server.host=${casServerHost}", "-Dcas.service.host=${casServiceHost}"]
- }
- }
- gretty {
- contextPath = '/cas-sample/'
- httpsEnabled = true
- httpsPort = 8443
- sslKeyStorePath = keystore
- sslKeyStorePassword = password
- jvmArgs = ["-Djavax.net.ssl.trustStore=${keystore}", "-Djavax.net.ssl.trustStorePassword=${password}"]
- }
- def casServer() {
- project(':spring-security-samples-xml-casserver')
- }
|