2
0

cas.gradle 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // CAS sample build file
  2. apply plugin: 'war'
  3. apply plugin: 'jetty'
  4. /*
  5. configurations {
  6. casServer
  7. }
  8. */
  9. dependencies {
  10. // casServer "org.jasig.cas:cas-server-webapp:3.4.2.1@war"
  11. runtime project(':spring-security-web'),
  12. project(':spring-security-cas'),
  13. project(':spring-security-config'),
  14. "org.slf4j:jcl-over-slf4j:$slf4jVersion",
  15. "ch.qos.logback:logback-classic:$logbackVersion"
  16. }
  17. def keystore = "$rootDir/samples/certificates/server.jks"
  18. jettyRun {
  19. contextPath = "/cas"
  20. def httpConnector = new org.mortbay.jetty.nio.SelectChannelConnector();
  21. httpConnector.port = 8080
  22. httpConnector.confidentialPort = 8443
  23. def httpsConnector = new org.mortbay.jetty.security.SslSocketConnector();
  24. httpsConnector.port = 8443
  25. httpsConnector.keystore = httpsConnector.truststore = keystore
  26. httpsConnector.keyPassword = httpsConnector.trustPassword = 'password'
  27. connectors = [httpConnector, httpsConnector]
  28. }
  29. /*
  30. task casServer (type: org.gradle.api.plugins.jetty.JettyRunWar) {
  31. contextPath = "/cas"
  32. connectors = [new org.mortbay.jetty.security.SslSocketConnector()]
  33. connectors[0].port = 9443
  34. connectors[0].keystore = connectors[0].truststore = keystore
  35. connectors[0].keyPassword = connectors[0].trustPassword = 'password'
  36. connectors[0].wantClientAuth = true
  37. connectors[0].needClientAuth = false
  38. webApp = configurations.casServer.resolve().toArray()[0]
  39. doFirst() {
  40. System.setProperty('javax.net.ssl.trustStore', keystore)
  41. System.setProperty('javax.net.ssl.trustStorePassword', 'password')
  42. }
  43. }
  44. task cas (dependsOn: jettyRun) {
  45. jettyRun.dependsOn(casServer)
  46. casServer.daemon = true
  47. }
  48. */