From b0b061e8357f7b0451bcdf7bf9e0a35de6edbf14 Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Tue, 10 Nov 2020 14:40:07 +0100 Subject: [PATCH] GH-1393 - Upgrade to Spring Docs Resources 0.2.4. Polish Asciidoctor setup. Switch to source-highlighter attribute as the configuration option has been dropped [0]. Switch to improved way of consuming Spring Docs Resources and Spring Data build resources. Upgrade to latest versions of ASciidoctor Maven Plugin and its dependencies. Fixed PlantUML integration by explicitly registering the extension. [0] https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/master/docs/v2-migration-guide.adoc#23-removal-of-sourcehighlighter --- pom.xml | 88 ++++++++++------------------- src/main/asciidoc/fundamentals.adoc | 2 +- src/main/asciidoc/index.adoc | 2 +- src/main/asciidoc/server.adoc | 2 +- 4 files changed, 34 insertions(+), 60 deletions(-) diff --git a/pom.xml b/pom.xml index bdcd4d93..95913f5c 100644 --- a/pom.xml +++ b/pom.xml @@ -71,7 +71,8 @@ UTF-8 1.8 3.18.0 - 0.2.2.RELEASE + 0.2.4 + 2.4.0 1.2.2 1.2.3 0.8.5 @@ -95,7 +96,7 @@ spring-next 2020.0.0-SNAPSHOT - 5.3.1-SNAPSHOT + 5.3.2-SNAPSHOT @@ -176,23 +177,6 @@ true - - - io.spring.docresources - spring-doc-resources - ${docs.resources.version} - zip - true - - - org.springframework.data.build - spring-data-build-resources - 2.4.0-SNAPSHOT - zip - true - - - @@ -202,34 +186,30 @@ --> - org.apache.maven.plugins - maven-dependency-plugin + com.googlecode.maven-download-plugin + download-maven-plugin unpack-doc-resources - - unpack-dependencies - generate-resources + + wget + - io.spring.docresources - spring-doc-resources - zip - true + https://repo.spring.io/release/io/spring/docresources/spring-doc-resources/${docs.resources.version}/spring-doc-resources-${docs.resources.version}.zip + true ${generated-asciidoc-sources.directory} - unpack-shared-resources - - unpack-dependencies - + unpack-spring-data-resources generate-resources + + wget + - ${project.groupId} - spring-data-build-resources - zip - true + https://repo.spring.io/release/org/springframework/data/build/spring-data-build-resources/${spring.data.build.resources.version}/spring-data-build-resources-${spring.data.build.resources.version}.zip + true ${shared.resources} @@ -292,7 +272,7 @@ + todir="${generated-asciidoc-sources.directory}/images/"> @@ -317,7 +297,7 @@ + todir="target/site/reference/html/images"> @@ -342,11 +322,11 @@ + tofile="target/site/reference/pdf/spring-hateoas-reference.pdf"/> + tofile="target/site/reference/epub/spring-hateoas-reference.epub"/> @@ -366,27 +346,17 @@ org.asciidoctor asciidoctor-maven-plugin - 2.0.0-RC.1 + 2.1.0 - - org.jruby - jruby - 9.2.6.0 - org.asciidoctor asciidoctorj - 2.0.0-RC.1 + 2.4.2 org.asciidoctor - asciidoctorj-pdf - 1.5.0-alpha.16 - - - org.asciidoctor - asciidoctorj-epub3 - 1.5.0-alpha.8.1 + asciidoctorj-diagram + 2.0.1 @@ -402,16 +372,20 @@ index.adoc html5 ${generated-docs.directory} - highlight.js + shared js/highlight github true true + highlight.js ./css spring.css left + + asciidoctor-diagram + @@ -1117,8 +1091,8 @@ - spring-libs-snapshot - https://repo.spring.io/libs-snapshot + spring-snapshot + https://repo.spring.io/lib-snapshot diff --git a/src/main/asciidoc/fundamentals.adoc b/src/main/asciidoc/fundamentals.adoc index fcfefd19..6a9872b7 100644 --- a/src/main/asciidoc/fundamentals.adoc +++ b/src/main/asciidoc/fundamentals.adoc @@ -153,7 +153,7 @@ If you returned such an instance from a Spring MVC or WebFlux controller and the .The HAL representation generated for the person representation model ==== -[source javscript] +[source, json] ---- { "_links" : { diff --git a/src/main/asciidoc/index.adoc b/src/main/asciidoc/index.adoc index 8483627d..6a08bd86 100644 --- a/src/main/asciidoc/index.adoc +++ b/src/main/asciidoc/index.adoc @@ -7,7 +7,7 @@ Oliver Gierke; Greg Turnquist; Jay Bryant This project provides some APIs to ease creating REST representations that follow the https://en.wikipedia.org/wiki/HATEOAS[HATEOAS] principle when working with Spring and especially Spring MVC. The core problem it tries to address is link creation and representation assembly. -(C) 2012-2019 The original authors. +(C) 2012-2020 The original authors. NOTE: Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically. diff --git a/src/main/asciidoc/server.adoc b/src/main/asciidoc/server.adoc index bd66be58..2eb577f1 100644 --- a/src/main/asciidoc/server.adoc +++ b/src/main/asciidoc/server.adoc @@ -72,7 +72,7 @@ return new ResponseEntity(headers, HttpStatus.CREATED); ==== [[fundamentals.obtaining-links.builder.methods]] -==== Building links that point to methods +=== Building links that point to methods You can even build links that point to methods or create dummy controller method invocations. The first approach is to hand a `Method` instance to the `WebMvcLinkBuilder`.