
Update the jar `Handler` class to support a non-reflective fallback mechanism when possible. The updated code attempts to capture a regular jar URL before our handler is installed. It can then use that URL as context when creating the a fallback URL. The JDK jar `Handler` will be copied from the context URL to the fallback URL. Without this commit, resolving new Tomcat URLs of the form `jar:war:file:...` would result in an ugly "Illegal reflective access" warning. Fixes gh-18631
47 lines
1.5 KiB
Groovy
47 lines
1.5 KiB
Groovy
plugins {
|
|
id "java"
|
|
id "org.springframework.boot.conventions"
|
|
id "org.springframework.boot.integration-test"
|
|
}
|
|
|
|
description = "Spring Boot Loader Integration Tests"
|
|
|
|
configurations {
|
|
app
|
|
}
|
|
|
|
dependencies {
|
|
app project(path: ":spring-boot-project:spring-boot-dependencies", configuration: "mavenRepository")
|
|
app project(path: ":spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin", configuration: "mavenRepository")
|
|
app project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-web", configuration: "mavenRepository")
|
|
|
|
intTestImplementation(enforcedPlatform(project(":spring-boot-project:spring-boot-parent")))
|
|
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
|
intTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
|
|
intTestImplementation("org.testcontainers:junit-jupiter")
|
|
intTestImplementation("org.testcontainers:testcontainers")
|
|
}
|
|
|
|
task syncMavenRepository(type: Sync) {
|
|
from configurations.app
|
|
into "${buildDir}/int-test-maven-repository"
|
|
}
|
|
|
|
task syncAppSource(type: Sync) {
|
|
from "app"
|
|
into "${buildDir}/app"
|
|
filter { line ->
|
|
line.replace("id \"org.springframework.boot\"", "id \"org.springframework.boot\" version \"${project.version}\"")
|
|
}
|
|
}
|
|
|
|
task buildApp(type: GradleBuild) {
|
|
dependsOn syncAppSource, syncMavenRepository
|
|
dir = "${buildDir}/app"
|
|
startParameter.buildCacheEnabled = false
|
|
tasks = ["build"]
|
|
}
|
|
|
|
intTest {
|
|
dependsOn buildApp
|
|
} |