2020-01-10 21:48:43 +08:00
|
|
|
plugins {
|
2024-11-01 01:36:51 +08:00
|
|
|
id "org.springframework.boot.antora-contributor"
|
2020-01-23 03:24:37 +08:00
|
|
|
id "org.springframework.boot.maven-plugin"
|
|
|
|
id "org.springframework.boot.optional-dependencies"
|
2024-06-25 23:28:33 +08:00
|
|
|
id "org.springframework.boot.docker-test"
|
2020-01-10 21:48:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
description = "Spring Boot Maven Plugin"
|
|
|
|
|
|
|
|
configurations {
|
2021-02-02 08:20:55 +08:00
|
|
|
dependenciesBom
|
2020-01-10 21:48:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2020-01-23 06:09:17 +08:00
|
|
|
compileOnly("org.apache.maven.plugin-tools:maven-plugin-annotations")
|
2023-08-04 21:09:37 +08:00
|
|
|
compileOnly("org.apache.maven:maven-core") {
|
|
|
|
exclude(group: "javax.annotation", module: "javax.annotation-api")
|
|
|
|
exclude(group: "javax.inject", module: "javax.inject")
|
|
|
|
}
|
2022-04-05 04:46:42 +08:00
|
|
|
compileOnly("org.apache.maven:maven-plugin-api") {
|
2023-08-04 21:09:37 +08:00
|
|
|
exclude(group: "javax.annotation", module: "javax.annotation-api")
|
2021-11-13 01:54:32 +08:00
|
|
|
exclude(group: "javax.enterprise", module: "cdi-api")
|
|
|
|
exclude(group: "javax.inject", module: "javax.inject")
|
|
|
|
}
|
2020-01-10 21:48:43 +08:00
|
|
|
|
2024-06-26 18:10:16 +08:00
|
|
|
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
2024-06-25 23:28:33 +08:00
|
|
|
dockerTestImplementation("org.apache.maven.shared:maven-invoker") {
|
|
|
|
exclude(group: "javax.inject", module: "javax.inject")
|
|
|
|
}
|
|
|
|
dockerTestImplementation("org.assertj:assertj-core")
|
|
|
|
dockerTestImplementation("org.junit.jupiter:junit-jupiter")
|
|
|
|
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
|
|
|
dockerTestImplementation("org.testcontainers:testcontainers")
|
2020-01-10 21:48:43 +08:00
|
|
|
|
2022-04-05 04:46:42 +08:00
|
|
|
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
|
|
|
|
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
|
2023-08-04 21:10:02 +08:00
|
|
|
implementation("org.apache.maven.shared:maven-common-artifact-filters") {
|
|
|
|
exclude(group: "javax.annotation", module: "javax.annotation-api")
|
|
|
|
exclude(group: "javax.enterprise", module: "cdi-api")
|
|
|
|
exclude(group: "javax.inject", module: "javax.inject")
|
|
|
|
}
|
2024-06-26 23:56:54 +08:00
|
|
|
implementation("org.sonatype.plexus:plexus-build-api") {
|
2024-06-28 18:38:53 +08:00
|
|
|
exclude(group: "org.codehaus.plexus", module: "plexus-utils")
|
2024-06-26 23:56:54 +08:00
|
|
|
}
|
2024-03-14 02:38:38 +08:00
|
|
|
implementation("org.springframework:spring-core")
|
2023-08-04 21:10:02 +08:00
|
|
|
implementation("org.springframework:spring-context")
|
2022-04-05 04:46:42 +08:00
|
|
|
|
2024-06-28 16:20:29 +08:00
|
|
|
optional("org.apache.maven.plugins:maven-shade-plugin") {
|
|
|
|
exclude(group: "javax.annotation", module: "javax.annotation-api")
|
|
|
|
exclude(group: "javax.enterprise", module: "cdi-api")
|
|
|
|
exclude(group: "javax.inject", module: "javax.inject")
|
|
|
|
}
|
|
|
|
|
2024-03-20 12:47:48 +08:00
|
|
|
testImplementation("org.apache.maven:maven-core") {
|
|
|
|
exclude(group: "javax.annotation", module: "javax.annotation-api")
|
|
|
|
exclude(group: "javax.inject", module: "javax.inject")
|
|
|
|
}
|
|
|
|
testImplementation("org.apache.maven.shared:maven-common-artifact-filters") {
|
|
|
|
exclude(group: "javax.annotation", module: "javax.annotation-api")
|
|
|
|
exclude(group: "javax.enterprise", module: "cdi-api")
|
|
|
|
exclude(group: "javax.inject", module: "javax.inject")
|
|
|
|
}
|
|
|
|
testImplementation("org.assertj:assertj-core")
|
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
|
|
|
testImplementation("org.mockito:mockito-core")
|
|
|
|
testImplementation("org.mockito:mockito-junit-jupiter")
|
|
|
|
testImplementation("org.springframework:spring-core")
|
|
|
|
|
2020-01-23 23:06:11 +08:00
|
|
|
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
|
2020-03-17 00:59:34 +08:00
|
|
|
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
|
2020-01-23 23:06:11 +08:00
|
|
|
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
2021-11-13 04:31:25 +08:00
|
|
|
intTestImplementation("org.apache.maven.shared:maven-invoker") {
|
|
|
|
exclude(group: "javax.inject", module: "javax.inject")
|
|
|
|
}
|
2020-01-23 06:09:17 +08:00
|
|
|
intTestImplementation("org.assertj:assertj-core")
|
|
|
|
intTestImplementation("org.junit.jupiter:junit-jupiter")
|
2020-01-10 21:48:43 +08:00
|
|
|
|
2025-03-01 04:54:04 +08:00
|
|
|
mavenRepository(project(path: ":spring-boot-project:spring-boot-all", configuration: "mavenRepository"))
|
2024-08-22 22:50:42 +08:00
|
|
|
mavenRepository(project(path: ":spring-boot-project:spring-boot-dependencies", configuration: "mavenRepository"))
|
2022-10-11 05:02:25 +08:00
|
|
|
mavenRepository(project(path: ":spring-boot-project:spring-boot-test", configuration: "mavenRepository"))
|
2023-05-19 06:15:16 +08:00
|
|
|
mavenRepository(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "mavenRepository"))
|
|
|
|
mavenRepository(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "mavenRepository"))
|
2024-08-22 22:50:42 +08:00
|
|
|
mavenRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-parent", configuration: "mavenRepository"))
|
2022-03-31 01:40:01 +08:00
|
|
|
|
2025-03-26 00:40:51 +08:00
|
|
|
versionProperties(project(path: ":spring-boot-project:spring-boot-dependencies", configuration: "resolvedBom"))
|
2021-02-02 08:20:55 +08:00
|
|
|
}
|
|
|
|
|
2022-05-20 08:34:57 +08:00
|
|
|
ext {
|
|
|
|
versionElements = version.split("\\.")
|
|
|
|
xsdVersion = versionElements[0] + "." + versionElements[1]
|
|
|
|
}
|
|
|
|
|
2025-04-05 22:46:08 +08:00
|
|
|
tasks.register("copySettingsXml", Copy) {
|
2024-09-28 08:31:31 +08:00
|
|
|
from file("src/intTest/projects/settings.xml")
|
2024-10-17 23:41:00 +08:00
|
|
|
into layout.buildDirectory.dir("generated-resources/settings")
|
2024-10-15 16:39:59 +08:00
|
|
|
filter(springRepositoryTransformers.mavenSettings())
|
2024-09-28 08:31:31 +08:00
|
|
|
}
|
|
|
|
|
2021-02-02 08:20:55 +08:00
|
|
|
sourceSets {
|
2022-05-20 08:34:57 +08:00
|
|
|
main {
|
2024-10-17 23:41:00 +08:00
|
|
|
output.dir(layout.buildDirectory.dir("generated/resources/xsd"), builtBy: "xsdResources")
|
2022-05-20 08:34:57 +08:00
|
|
|
}
|
2021-02-02 08:45:04 +08:00
|
|
|
intTest {
|
2024-10-17 23:41:00 +08:00
|
|
|
output.dir(layout.buildDirectory.dir("generated-resources"), builtBy: ["extractVersionProperties", "copySettingsXml"])
|
2021-02-02 08:20:55 +08:00
|
|
|
}
|
2024-06-25 23:28:33 +08:00
|
|
|
dockerTest {
|
2024-10-17 23:41:00 +08:00
|
|
|
output.dir(layout.buildDirectory.dir("generated-resources"), builtBy: "extractVersionProperties")
|
2024-06-25 23:28:33 +08:00
|
|
|
}
|
2021-02-02 08:20:55 +08:00
|
|
|
}
|
|
|
|
|
2020-03-19 21:00:58 +08:00
|
|
|
javadoc {
|
|
|
|
options {
|
|
|
|
author = true
|
|
|
|
docTitle = "Spring Boot Maven Plugin ${project.version} API"
|
|
|
|
encoding = "UTF-8"
|
|
|
|
memberLevel = "protected"
|
|
|
|
outputLevel = "quiet"
|
|
|
|
splitIndex = true
|
|
|
|
use = true
|
|
|
|
windowTitle = "Spring Boot Maven Plugin ${project.version} API"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-04-05 22:46:08 +08:00
|
|
|
tasks.register("xsdResources", Sync) {
|
2022-05-20 08:34:57 +08:00
|
|
|
from "src/main/xsd/layers-${project.ext.xsdVersion}.xsd"
|
2024-10-17 23:41:00 +08:00
|
|
|
into layout.buildDirectory.dir("generated/resources/xsd/org/springframework/boot/maven")
|
2022-05-20 08:34:57 +08:00
|
|
|
rename { fileName -> "layers.xsd" }
|
|
|
|
}
|
|
|
|
|
2020-01-10 21:48:43 +08:00
|
|
|
prepareMavenBinaries {
|
2024-09-03 20:29:49 +08:00
|
|
|
versions = [ "3.9.9", "3.6.3" ]
|
2020-01-10 21:48:43 +08:00
|
|
|
}
|
|
|
|
|
2023-08-09 15:06:38 +08:00
|
|
|
tasks.named("documentPluginGoals") {
|
|
|
|
goalSections = [
|
|
|
|
"build-image": "build-image",
|
2023-08-09 15:25:41 +08:00
|
|
|
"build-image-no-fork": "build-image",
|
2023-08-09 15:06:38 +08:00
|
|
|
"build-info": "build-info",
|
|
|
|
"help": "help",
|
2023-08-09 15:25:41 +08:00
|
|
|
"process-aot": "aot",
|
|
|
|
"process-test-aot": "aot",
|
2023-08-09 15:06:38 +08:00
|
|
|
"repackage": "packaging",
|
|
|
|
"run": "run",
|
|
|
|
"start": "integration-tests",
|
2023-08-09 16:16:38 +08:00
|
|
|
"stop": "integration-tests",
|
|
|
|
"test-run": "run"
|
2023-08-09 15:06:38 +08:00
|
|
|
]
|
|
|
|
}
|
2024-03-20 12:47:48 +08:00
|
|
|
|
2024-11-01 01:36:51 +08:00
|
|
|
antoraContributions {
|
|
|
|
'maven-plugin' {
|
|
|
|
aggregateContent {
|
|
|
|
from(documentPluginGoals) {
|
|
|
|
into "modules/maven-plugin/partials/goals"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catalogContent {
|
|
|
|
from(javadoc) {
|
|
|
|
into "api/java"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
localAggregateContent {
|
|
|
|
from(tasks.named("generateAntoraYml")) {
|
|
|
|
into "modules"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
source()
|
2024-06-27 20:06:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named("generateAntoraPlaybook") {
|
2024-11-01 01:36:51 +08:00
|
|
|
antoraExtensions.xref.stubs = ["appendix:.*", "api:.*", "reference:.*", "how-to:.*"]
|
|
|
|
asciidocExtensions.excludeJavadocExtension = true
|
2024-06-27 20:06:44 +08:00
|
|
|
}
|
|
|
|
|
2024-06-25 23:28:33 +08:00
|
|
|
tasks.named("dockerTest").configure {
|
|
|
|
dependsOn tasks.named("prepareMavenBinaries")
|
2024-03-20 12:47:48 +08:00
|
|
|
}
|