Commit 6aa34616 authored by Stephane Nicoll's avatar Stephane Nicoll

Version layers configuration xsd

This commit provides a versioned xsd for the layers configuration of the
Maven plugin. The version starts at `2.3` to match with the Spring Boot
feature release in which this was introduced.

Closes gh-20663
parent 5c6bc372
......@@ -50,6 +50,13 @@ syncDocumentationSourceForAsciidoctor {
}
}
tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
doFirst {
def versionEl = version.split("\\.")
attributes "spring-boot-xsd-version": versionEl[0] + '.' + versionEl[1]
}
}
asciidoctor {
sources {
include "index.adoc"
......
......@@ -144,7 +144,7 @@ The following example shows what the implicit layer configuration described abov
<layers-configuration xmlns="http://www.springframework.org/schema/boot/layers"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/boot/layers
https://www.springframework.org/schema/boot/layers/layers-configuration.xsd">
https://www.springframework.org/schema/boot/layers/layers-configuration-{spring-boot-xsd-version}.xsd">
<layers>
<layer>dependencies</layer>
<layer>snapshot-dependencies</layer>
......@@ -554,7 +554,7 @@ This allows to reuse the cache for external dependencies when an internal depend
<layers-configuration xmlns="http://www.springframework.org/schema/boot/layers"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/boot/layers
https://www.springframework.org/schema/boot/layers/layers-configuration.xsd">
https://www.springframework.org/schema/boot/layers/layers-configuration-{spring-boot-xsd-version}.xsd">
<layers>
<layer>application</layer>
<layer>resources</layer>
......
<layers-configuration xmlns="http://www.springframework.org/schema/boot/layers"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/boot/layers
https://www.springframework.org/schema/layers/layers-configuration.xsd">
https://www.springframework.org/schema/layers/layers-configuration-2.3.xsd">
<layers>
<layer>configuration</layer>
<layer>application</layer>
......
<layers-configuration xmlns="http://www.springframework.org/schema/boot/layers"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/boot/layers
https://www.springframework.org/schema/boot/layers/layers-configuration.xsd">
https://www.springframework.org/schema/boot/layers/layers-configuration-2.3.xsd">
<layers>
<layer>configuration</layer>
<layer>application</layer>
......
<layers-configuration xmlns="http://www.springframework.org/schema/boot/layers"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/boot/layers
https://www.springframework.org/schema/boot/layers/layers-configuration.xsd">
https://www.springframework.org/schema/boot/layers/layers-configuration-2.3.xsd">
<layers>
<layer>my-deps</layer>
</layers>
......
<layers-configuration xmlns="http://www.springframework.org/schema/boot/layers"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/boot/layers
https://www.springframework.org/schema/boot/layers/layers-configuration.xsd">
https://www.springframework.org/schema/boot/layers/layers-configuration-2.3.xsd">
<layers>
<layer>my-layer</layer>
</layers>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment