From 834a3501d2862ecbfa1a8f6ff8b80119a4797fdb Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 31 Jul 2024 10:59:47 +0200 Subject: [PATCH] Bundle Javadoc with Antora documentation site. Closes #491 --- .gitignore | 1 - package.json | 10 ++++++++++ pom.xml | 2 +- src/main/antora/antora-playbook.yml | 8 +++----- src/main/antora/antora.yml | 5 +++++ src/main/antora/modules/ROOT/nav.adoc | 4 +++- .../antora/modules/ROOT/pages/ldap/configuration.adoc | 2 +- 7 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 package.json diff --git a/.gitignore b/.gitignore index 39393d79..b9f52471 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,6 @@ src/ant/.ant-targets-upload-dist.xml atlassian-ide-plugin.xml /.gradle/ /.idea/ -package.json package-lock.json node node_modules diff --git a/package.json b/package.json new file mode 100644 index 00000000..4689506b --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "dependencies": { + "antora": "3.2.0-alpha.6", + "@antora/atlas-extension": "1.0.0-alpha.2", + "@antora/collector-extension": "1.0.0-alpha.7", + "@asciidoctor/tabs": "1.0.0-beta.6", + "@springio/antora-extensions": "1.13.0", + "@springio/asciidoctor-extensions": "1.0.0-alpha.11" + } +} diff --git a/pom.xml b/pom.xml index 6507ed85..6d65fdf2 100644 --- a/pom.xml +++ b/pom.xml @@ -132,7 +132,7 @@ - io.spring.maven.antora + org.antora antora-maven-plugin diff --git a/src/main/antora/antora-playbook.yml b/src/main/antora/antora-playbook.yml index abb3c87e..4abd4c50 100644 --- a/src/main/antora/antora-playbook.yml +++ b/src/main/antora/antora-playbook.yml @@ -3,8 +3,7 @@ # The purpose of this Antora playbook is to build the docs in the current branch. antora: extensions: - - '@antora/collector-extension' - - require: '@springio/antora-extensions/root-component-extension' + - require: '@springio/antora-extensions' root_component_name: 'data-ldap' site: title: Spring Data LDAP @@ -22,13 +21,12 @@ content: start_path: src/main/antora asciidoc: attributes: - page-pagination: '' hide-uri-scheme: '@' tabs-sync-option: '@' - chomp: 'all' extensions: - '@asciidoctor/tabs' - '@springio/asciidoctor-extensions' + - '@springio/asciidoctor-extensions/javadoc-extension' sourcemap: true urls: latest_version_segment: '' @@ -38,5 +36,5 @@ runtime: format: pretty ui: bundle: - url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.3/ui-bundle.zip + url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.16/ui-bundle.zip snapshot: true diff --git a/src/main/antora/antora.yml b/src/main/antora/antora.yml index 5cb87966..cb59c68a 100644 --- a/src/main/antora/antora.yml +++ b/src/main/antora/antora.yml @@ -10,3 +10,8 @@ ext: local: true scan: dir: target/classes/ + - run: + command: ./mvnw package -Pdistribute + local: true + scan: + dir: target/antora diff --git a/src/main/antora/modules/ROOT/nav.adoc b/src/main/antora/modules/ROOT/nav.adoc index 5d3922f2..edb3d96b 100644 --- a/src/main/antora/modules/ROOT/nav.adoc +++ b/src/main/antora/modules/ROOT/nav.adoc @@ -19,4 +19,6 @@ ** xref:ldap/query-methods.adoc[] ** xref:ldap/querydsl.adoc[] ** xref:ldap/cdi-integration.adoc[] -* https://github.com/spring-projects/spring-data-commons/wiki[Wiki] + +* xref:attachment$api/java/index.html[Javadoc,role=link-external,window=_blank] +* https://github.com/spring-projects/spring-data-commons/wiki[Wiki,role=link-external,window=_blank] diff --git a/src/main/antora/modules/ROOT/pages/ldap/configuration.adoc b/src/main/antora/modules/ROOT/pages/ldap/configuration.adoc index 0307310b..8c4a476a 100644 --- a/src/main/antora/modules/ROOT/pages/ldap/configuration.adoc +++ b/src/main/antora/modules/ROOT/pages/ldap/configuration.adoc @@ -13,7 +13,7 @@ All Spring LDAP repositories must work with entities annotated with the ODM anno Since all ODM managed classes must have a Distinguished Name as the ID, all Spring LDAP repositories must have the ID type parameter set to `javax.naming.Name`. -Indeed, the built-in `LdapRepository` only takes one type parameter: the managed entity class, which defaults the ID to `javax.naming.Name`. +Indeed, the built-in javadoc:org.springframework.data.ldap.repository.LdapRepository[] only takes one type parameter: the managed entity class, which defaults the ID to `javax.naming.Name`. Due to specifics of the LDAP protocol, paging and sorting are not supported for Spring LDAP repositories.