Skip to content

Commit aca2e4f

Browse files
committed
SEC-2289: Add spring4Test
1 parent 086056f commit aca2e4f

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

build.gradle

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ allprojects {
3030
group = 'org.springframework.security'
3131

3232
repositories {
33-
maven { url "http://repo.springsource.org/libs-release" }
33+
maven { url "http://repo.springsource.org/libs-snapshot" }
3434
maven { url "http://repo.springsource.org/plugins-release" }
35+
maven { url "http://repo.terracotta.org/maven2/" }
3536
}
3637

3738
eclipse.project.name = "${project.name}-3.2.x"
@@ -102,7 +103,22 @@ configure(coreModuleProjects) {
102103
}
103104
configurations {
104105
jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo
106+
spring4TestRuntime.extendsFrom testRuntime
105107
}
108+
configurations.spring4TestRuntime {
109+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
110+
if (details.requested.group == 'org.springframework') {
111+
details.useVersion '4.0.0.BUILD-SNAPSHOT'
112+
}
113+
if (details.requested.name == 'ehcache') {
114+
details.useVersion '2.6.5'
115+
}
116+
if (details.requested.name == 'ehcache-terracotta') {
117+
details.useVersion '2.1.1'
118+
}
119+
}
120+
}
121+
106122
dependencies {
107123
jacoco "org.jacoco:org.jacoco.agent:0.6.2.201302030002:runtime"
108124
}
@@ -112,6 +128,14 @@ configure(coreModuleProjects) {
112128
integrationTest {
113129
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=${project.group}.*"
114130
}
131+
task spring4Test(type: Test) {
132+
jvmArgs = ['-ea', '-Xmx500m', '-XX:MaxPermSize=128M']
133+
exclude "**/EhCacheBasedAclCacheTests.class", "**/Issue55Tests.class"
134+
classpath = sourceSets.test.output + sourceSets.main.output + configurations.spring4TestRuntime
135+
testResultsDir = file("$buildDir/spring4-test-results/")
136+
testReportDir = file("$buildDir/reports/spring4-tests/")
137+
}
138+
check.dependsOn spring4Test
115139
}
116140

117141
configure (aspectjProjects) {

core/core.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ classes.doLast {
4343

4444
sourceJar.from cryptoProject.sourceSets.main.java
4545

46-
test {
46+
configure([test,spring4Test]) {
4747
systemProperties['springSecurityVersion'] = version
4848
systemProperties['springVersion'] = springVersion
4949
}

crypto/crypto.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// isJdk6 = jdkVersion >= '1.6'
55
int maxAESKeySize = javax.crypto.Cipher.getMaxAllowedKeyLength('AES')
66

7-
test {
7+
configure([test,spring4Test]) {
88
if (maxAESKeySize < 256) {
99
println "AES keysize limited to $maxAESKeySize, skipping EncryptorsTests"
1010
exclude '**/EncryptorsTests.class'

0 commit comments

Comments
 (0)