You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure that junit-platform-launcher is on classpath
When testing with Gradle 7.6, junit-platform-launcher won't be
on the test runtime classpath unless it's declared as a dependency.
When testing with Gradle 8.x the dependency is added implicitly but
starting with Gradle 8.3 relying on this will result in a warning.
When junit-platform-launcher is absent, a failure occurs when testing
with Gradle as the class loader structure is such that JUnit tries
to load any test execution listeners, finds the listener declared in
spring-boot-actuator-autoconfigure but cannot then load the
implemented TestExecutionListener interface.
This problem is addressed by augmenting the component metadata for
spring-boot-starter-test to add a dependency on
junit-platform-launcher. This addresses the problem with
spring-boot-actuator-autoconfigure while also addressing a warning
with Gradle 8.3+.
Closesgh-43340
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java
+11-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2012-2024 the original author or authors.
2
+
* Copyright 2012-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -89,6 +89,7 @@ public void execute(Project project) {
0 commit comments