From 903a4a48e8a426c7bb4c6abf5c6000c1bc2e6810 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 13 Feb 2020 09:39:42 +0000 Subject: [PATCH] Fix configuration property references in the reference docs Previously, the configprop macro was being used in the source but the extension that implements the macro was not available to Asciidoctor. This led to the references not being checked at build time and the macro being left as-is in the rendered documentation. This commit updates the dependencies that are available to Asciidoctor to include the extension and the projects which define the configuration properties referenced in the documentation. Closes gh-20149 --- .../spring-boot-docs/build.gradle | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index 5d45f324fc..cee1d62668 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -8,6 +8,7 @@ plugins { configurations { actuatorApiDocumentation + asciidoctorExtensions autoConfiguration configurationProperties gradlePluginDocumentation @@ -15,9 +16,24 @@ configurations { testSlices } +repositories { + maven { + url "https://repo.spring.io/release" + mavenContent { + includeGroup "io.spring.asciidoctor" + } + } +} + dependencies { actuatorApiDocumentation(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure", configuration: "documentation")) + asciidoctorExtensions(platform(project(":spring-boot-project:spring-boot-parent"))) + asciidoctorExtensions("io.spring.asciidoctor:spring-asciidoctor-extensions-spring-boot") + asciidoctorExtensions(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure")) + asciidoctorExtensions(project(path: ":spring-boot-project:spring-boot-autoconfigure")) + asciidoctorExtensions(project(path: ":spring-boot-project:spring-boot-devtools")) + autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata")) @@ -111,7 +127,11 @@ task documentConfigurationProperties(type: org.springframework.boot.build.contex tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) { dependsOn dependencyVersions + configurations "asciidoctorExtensions" baseDirFollowsSourceDir() + asciidoctorj { + fatalWarnings = ['^((?!successfully validated).)*$'] + } doFirst { def versionConstraints = dependencyVersions.versionConstraints attributes "jetty-version": versionConstraints["org.eclipse.jetty:jetty-server"],