Преглед изворни кода

Remove JUnit 5 dependencies

Issue gh-674
Joe Grandja пре 3 година
родитељ
комит
4d2a675272

+ 0 - 2
buildSrc/src/main/java/org/springframework/gradle/SpringJavaPlugin.java

@@ -29,7 +29,6 @@ import org.gradle.api.plugins.JavaPluginExtension;
 import org.gradle.api.plugins.PluginManager;
 import org.gradle.api.tasks.compile.CompileOptions;
 import org.gradle.api.tasks.compile.JavaCompile;
-import org.gradle.api.tasks.testing.Test;
 import org.gradle.jvm.tasks.Jar;
 import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper;
 
@@ -91,6 +90,5 @@ public class SpringJavaPlugin implements Plugin<Project> {
 			attributes.put("Automatic-Module-Name", project.getName().replace("-", "."));
 			manifest.attributes(attributes);
 		}));
-		project.getTasks().withType(Test.class, Test::useJUnitPlatform);
 	}
 }

+ 0 - 1
dependencies/spring-authorization-server-dependencies.gradle

@@ -9,7 +9,6 @@ javaPlatform {
 dependencies {
 	api platform("org.springframework:spring-framework-bom:$springFrameworkVersion")
 	api platform("org.springframework.security:spring-security-bom:$springSecurityVersion")
-	api platform("org.junit:junit-bom:5.8.2")
 	api platform("com.fasterxml.jackson:jackson-bom:2.13.2")
 	constraints {
 		api "com.nimbusds:nimbus-jose-jwt:9.10.1"

+ 0 - 2
oauth2-authorization-server/spring-security-oauth2-authorization-server.gradle

@@ -21,9 +21,7 @@ dependencies {
 
 	testImplementation "org.springframework.security:spring-security-test"
 	testImplementation "org.springframework:spring-webmvc"
-	testImplementation "org.junit.jupiter:junit-jupiter"
 	testImplementation "junit:junit"
-	testImplementation "org.junit.vintage:junit-vintage-engine"
 	testImplementation "org.assertj:assertj-core"
 	testImplementation "org.mockito:mockito-core"
 	testImplementation "com.jayway.jsonpath:json-path"

+ 1 - 7
samples/custom-consent-authorizationserver/samples-custom-consent-authorizationserver.gradle

@@ -19,13 +19,7 @@ dependencies {
 	implementation project(":spring-security-oauth2-authorization-server")
 
 	testImplementation "org.springframework.boot:spring-boot-starter-test"
-	testImplementation "org.junit.jupiter:junit-jupiter"
-	testImplementation "junit:junit"
-	testImplementation "org.junit.vintage:junit-vintage-engine"
 	testImplementation "org.springframework.security:spring-security-test"
+	testImplementation "junit:junit"
 	testImplementation "net.sourceforge.htmlunit:htmlunit"
 }
-
-tasks.named("test") {
-	useJUnitPlatform()
-}

+ 1 - 7
samples/default-authorizationserver/samples-default-authorizationserver.gradle

@@ -20,13 +20,7 @@ dependencies {
 	runtimeOnly "com.h2database:h2"
 
 	testImplementation "org.springframework.boot:spring-boot-starter-test"
-	testImplementation "org.junit.jupiter:junit-jupiter"
-	testImplementation "junit:junit"
-	testImplementation "org.junit.vintage:junit-vintage-engine"
 	testImplementation "org.springframework.security:spring-security-test"
+	testImplementation "junit:junit"
 	testImplementation "net.sourceforge.htmlunit:htmlunit"
 }
-
-tasks.named("test") {
-	useJUnitPlatform()
-}

+ 0 - 4
samples/federated-identity-authorizationserver/samples-federated-identity-authorizationserver.gradle

@@ -24,7 +24,3 @@ dependencies {
 	implementation project(":spring-security-oauth2-authorization-server")
 	runtimeOnly "com.h2database:h2"
 }
-
-tasks.named("test") {
-	useJUnitPlatform()
-}

+ 0 - 4
samples/messages-client/samples-messages-client.gradle

@@ -24,7 +24,3 @@ dependencies {
 	implementation "org.webjars:bootstrap:3.4.1"
 	implementation "org.webjars:jquery:3.4.1"
 }
-
-tasks.named("test") {
-	useJUnitPlatform()
-}

+ 0 - 4
samples/messages-resource/samples-messages-resource.gradle

@@ -17,7 +17,3 @@ dependencies {
 	implementation "org.springframework.boot:spring-boot-starter-security"
 	implementation "org.springframework.boot:spring-boot-starter-oauth2-resource-server"
 }
-
-tasks.named("test") {
-	useJUnitPlatform()
-}