spring-security/samples/xml/cas/casserver/spring-security-samples-xml-casserver.gradle
Josh Cummings 42b111fba6
JDK 11 Compatibility
Upgraded dependencies and removed a test in the Java Config LDAP
sample which is arguably an integration test since it starts up an
LDAP container. This test also isn't JDK 11 compatible and the
remaining integration tests in the sample cover the same material.

Issue: gh-5860
2018-10-25 17:10:50 -06:00

57 lines
1.4 KiB
Groovy

apply plugin: 'io.spring.convention.spring-sample-war'
def keystore = "$rootDir/samples/certificates/server.jks"
def password = 'password'
dependencies {
compile "org.jasig.cas:cas-server-webapp:4.0.0@war"
compile slf4jDependencies
runtime 'org.aspectj:aspectjrt'
runtime 'org.aspectj:aspectjtools'
runtime 'org.aspectj:aspectjweaver'
}
project.tasks.withType(org.gradle.api.tasks.bundling.War) { war ->
war.duplicatesStrategy = DuplicatesStrategy.EXCLUDE
project.tasks.war.doFirst {
war.classpath = war.classpath.filter { !it.name.endsWith(".war") }
war.project.configurations.runtime.each {
if (it.name.endsWith(".war")) {
def fileList = war.project.zipTree(it)
war.from fileList
}
}
}
}
project.tasks.withType(org.akhikhl.gretty.StartBaseTask).all { task ->
task.doFirst {
def destinationDir = project.file("$buildDir/inplaceWebapp")
project.configurations.runtime.each { dependency ->
if (dependency.name.endsWith(".war")) {
def warTree = project.zipTree(dependency)
project.copy {
from warTree
into destinationDir
eachFile {
if (it.relativePath.getFile(destinationDir).exists()) {
it.exclude()
}
}
}
}
}
}
}
gretty {
contextPath = '/cas'
httpsEnabled = true
httpPort = 9090
httpsPort = 9443
sslKeyStorePath = keystore
sslKeyStorePassword = password
jvmArgs = ["-Djavax.net.ssl.trustStore=${keystore}", "-Djavax.net.ssl.trustStorePassword=${password}"]
}