瀏覽代碼

Remove Groovy and Spock Dependencies

Fixes gh-4939
Josh Cummings 5 年之前
父節點
當前提交
5bdf57d1e5

+ 0 - 2
config/spring-security-config.gradle

@@ -42,7 +42,6 @@ dependencies {
 	testCompile project(path : ':spring-security-web', configuration : 'tests')
 	testCompile apachedsDependencies
 	testCompile powerMock2Dependencies
-	testCompile spockDependencies
 	testCompile 'com.squareup.okhttp3:mockwebserver'
 	testCompile 'ch.qos.logback:logback-classic'
 	testCompile 'io.projectreactor.netty:reactor-netty'
@@ -53,7 +52,6 @@ dependencies {
 	testCompile('net.sourceforge.htmlunit:htmlunit') {
 		exclude group: 'commons-logging', module: 'commons-logging'
 	}
-	testCompile 'org.codehaus.groovy:groovy-all'
 	testCompile 'org.eclipse.persistence:javax.persistence'
 	testCompile 'org.hibernate:hibernate-entitymanager'
 	testCompile 'org.hsqldb:hsqldb'

+ 1 - 1
config/src/test/java/org/springframework/security/config/annotation/issue50/SecurityConfig.java

@@ -15,7 +15,6 @@
  */
 package org.springframework.security.config.annotation.issue50;
 
-import org.spockframework.util.Assert;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -33,6 +32,7 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.AuthenticationException;
 import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.util.Assert;
 
 /**
  * @author Rob Winch

+ 11 - 10
config/src/test/java/org/springframework/security/config/annotation/web/configurers/saml2/Saml2LoginConfigurerTests.java

@@ -16,12 +16,21 @@
 
 package org.springframework.security.config.annotation.web.configurers.saml2;
 
+import java.io.IOException;
+import java.time.Duration;
+import java.util.Arrays;
+import java.util.Base64;
+import java.util.Collection;
+import java.util.Collections;
+import javax.servlet.ServletException;
+
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.opensaml.saml.saml2.core.Assertion;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ConfigurableApplicationContext;
 import org.springframework.context.annotation.Bean;
@@ -56,15 +65,7 @@ import org.springframework.security.web.context.SecurityContextRepository;
 import org.springframework.test.util.ReflectionTestUtils;
 import org.springframework.test.web.servlet.MockMvc;
 
-import java.io.IOException;
-import java.time.Duration;
-import java.util.Base64;
-import java.util.Collection;
-import java.util.Collections;
-import javax.servlet.ServletException;
-
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.codehaus.groovy.runtime.InvokerHelper.asList;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -76,9 +77,9 @@ import static org.springframework.security.config.annotation.web.configurers.sam
 public class Saml2LoginConfigurerTests {
 
 	private static final Converter<Assertion, Collection<? extends GrantedAuthority>>
-			AUTHORITIES_EXTRACTOR = a -> asList(new SimpleGrantedAuthority("TEST"));
+			AUTHORITIES_EXTRACTOR = a -> Arrays.asList(new SimpleGrantedAuthority("TEST"));
 	private static final GrantedAuthoritiesMapper AUTHORITIES_MAPPER =
-			authorities -> asList(new SimpleGrantedAuthority("TEST CONVERTED"));
+			authorities -> Arrays.asList(new SimpleGrantedAuthority("TEST CONVERTED"));
 	private static final Duration RESPONSE_TIME_VALIDATION_SKEW = Duration.ZERO;
 
 	@Autowired

+ 0 - 5
gradle/dependency-management.gradle

@@ -76,12 +76,9 @@ dependencies {
 		management "org.assertj:assertj-core:3.+"
 		management "org.bouncycastle:bcpkix-jdk15on:1.+"
 		management "org.bouncycastle:bcprov-jdk15on:1.+"
-		management "org.codehaus.groovy:groovy-all:2.4.17"
-		management "org.codehaus.groovy:groovy:2.4.17"
 		management "org.eclipse.jetty:jetty-server:9.4.19.v20190610"
 		management "org.eclipse.jetty:jetty-servlet:9.4.19.v20190610"
 		management "org.eclipse.persistence:javax.persistence:2.+"
-		management "org.gebish:geb-spock:0.10.0"
 		management "org.hibernate:hibernate-entitymanager:5.+"
 		management "org.hibernate:hibernate-validator:6.+"
 		management "org.hsqldb:hsqldb:2.+"
@@ -106,8 +103,6 @@ dependencies {
 		management "org.slf4j:jcl-over-slf4j:1.+"
 		management "org.slf4j:log4j-over-slf4j:1.+"
 		management "org.slf4j:slf4j-api:1.+"
-		management "org.spockframework:spock-core:1.0-groovy-2.4"
-		management "org.spockframework:spock-spring:1.0-groovy-2.4"
 		management "org.springframework.ldap:spring-ldap-core:latest.release"
 		management "org.synchronoss.cloud:nio-multipart-parser:1.+"
 		management "org.thymeleaf:thymeleaf-spring5:3.+"

+ 0 - 1
messaging/spring-security-messaging.gradle

@@ -17,7 +17,6 @@ dependencies {
 	testCompile 'commons-codec:commons-codec'
 	testCompile powerMock2Dependencies
 	testCompile slf4jDependencies
-	testCompile spockDependencies
 
 	testRuntime 'org.hsqldb:hsqldb'
 }

+ 0 - 3
taglibs/spring-security-taglibs.gradle

@@ -14,9 +14,6 @@ dependencies {
 	provided 'javax.servlet.jsp:javax.servlet.jsp-api'
 	provided 'javax.servlet:javax.servlet-api'
 
-	testCompile 'org.codehaus.groovy:groovy-all'
-	testCompile spockDependencies
-
 	testRuntime 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
 }
 

+ 0 - 2
web/spring-security-web.gradle

@@ -22,12 +22,10 @@ dependencies {
 	testCompile 'commons-codec:commons-codec'
 	testCompile 'io.projectreactor:reactor-test'
 	testCompile 'javax.xml.bind:jaxb-api'
-	testCompile 'org.codehaus.groovy:groovy-all'
 	testCompile 'org.skyscreamer:jsonassert'
 	testCompile 'org.springframework:spring-webflux'
 	testCompile 'org.synchronoss.cloud:nio-multipart-parser'
 	testCompile powerMock2Dependencies
-	testCompile spockDependencies
 
 	testRuntime 'org.hsqldb:hsqldb'
 }