web.gradle 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Web module build file
  2. configurations {
  3. servlet3Test
  4. servlet3Test.exclude group: 'javax.servlet', name: 'sevlet-api'
  5. }
  6. dependencies {
  7. compile project(':spring-security-core'),
  8. 'aopalliance:aopalliance:1.0',
  9. "org.springframework:spring-aop:$springVersion",
  10. "org.springframework:spring-beans:$springVersion",
  11. "org.springframework:spring-context:$springVersion",
  12. "org.springframework:spring-expression:$springVersion",
  13. "org.springframework:spring-jdbc:$springVersion",
  14. "org.springframework:spring-tx:$springVersion",
  15. "org.springframework:spring-web:$springVersion"
  16. provided 'javax.servlet:servlet-api:2.5'
  17. servlet3Test 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final'
  18. testCompile project(':spring-security-core').sourceSets.test.classes,
  19. 'commons-codec:commons-codec:1.3',
  20. "org.springframework:spring-test:$springVersion"
  21. testRuntime "hsqldb:hsqldb:$hsqlVersion"
  22. }
  23. configurations.testRuntime.allDependencies.each {
  24. if( !(it.group == 'javax.servlet' && it.name == 'servlet-api') ) {
  25. configurations.servlet3Test.addDependency it
  26. }
  27. }
  28. test {
  29. exclude '**/*Servlet3Tests.class'
  30. }
  31. task servlet3Test(type: Test, dependsOn: testClasses) {
  32. testClassesDir = sourceSets.test.classesDir
  33. logging.captureStandardOutput(LogLevel.INFO)
  34. classpath = sourceSets.main.classes + sourceSets.test.classes + configurations.servlet3Test
  35. maxParallelForks = 1
  36. testReport = false
  37. include '**/*Servlet3Tests.class'
  38. }
  39. check.dependsOn servlet3Test