Skip to content

Commit

Permalink
Migrate documentation to Antora
Browse files Browse the repository at this point in the history
Issue #4422
  • Loading branch information
rwinch authored and fmbenhassine committed Sep 6, 2023
1 parent e36a447 commit 2e8d506
Show file tree
Hide file tree
Showing 149 changed files with 9,447 additions and 9,089 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy Docs
on:
push:
branches-ignore: [ gh-pages ]
tags: '**'
repository_dispatch:
types: request-build-reference # legacy
workflow_dispatch:
permissions:
actions: write
jobs:
build:
runs-on: ubuntu-latest
if: github.repository_owner == 'spring-projects'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: docs-build
fetch-depth: 1
- name: Dispatch (partial build)
if: github.ref_type == 'branch'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) -f build-refname=${{ github.ref_name }}
- name: Dispatch (full build)
if: github.ref_type == 'tag'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD)
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ out

/.gradletasknamecache
**/*.flattened-pom.xml

node
node_modules
package-lock.json
package.json
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,11 @@ Please note that some integration tests are based on Docker, so please make sure
To generate the reference documentation, run the following commands:

```
$ ./mvnw javadoc:aggregate
$ cd spring-batch-docs
$ ../mvnw site
$ ../mvnw antora:antora
```

The reference documentation can be found in `spring-batch-docs/target`.
The reference documentation can be found in `spring-batch-docs/target/anotra/site`.

## Using Docker

Expand Down
4 changes: 1 addition & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@
<groovy.version>3.0.19</groovy.version>

<!-- documentation dependencies -->
<asciidoctorj-pdf.version>1.6.2</asciidoctorj-pdf.version> <!-- FIXME build failure with version 2.3.9 -->
<asciidoctorj-epub.version>1.5.1</asciidoctorj-epub.version>
<spring-asciidoctor-backends.version>0.0.6</spring-asciidoctor-backends.version>
<io.spring.maven.antora-version>0.0.3</io.spring.maven.antora-version>

<!-- plugin versions -->
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
Expand Down
40 changes: 40 additions & 0 deletions spring-batch-docs/antora-playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# PACKAGES [email protected] @antora/atlas-extension:1.0.0-alpha.1 @antora/[email protected] @springio/[email protected] @asciidoctor/[email protected] @opendevise/[email protected]
#
# The purpose of this Antora playbook is to build the docs in the current branch.
antora:
extensions:
- '@springio/antora-extensions/partial-build-extension'
- require: '@springio/antora-extensions/inject-collector-cache-config-extension'
- '@antora/collector-extension'
- '@antora/atlas-extension'
- require: '@springio/antora-extensions/root-component-extension'
root_component_name: 'batch'
site:
title: Spring Batch Reference
url: https://docs.spring.io/spring-batch/reference
content:
sources:
- url: ..
branches: HEAD
start_path: spring-batch-docs
worktrees: true
asciidoc:
attributes:
page-pagination: ''
hide-uri-scheme: '@'
tabs-sync-option: '@'
chomp: 'all'
extensions:
- '@asciidoctor/tabs'
- '@springio/asciidoctor-extensions'
sourcemap: true
urls:
latest_version_segment: ''
runtime:
log:
failure_level: warn
format: pretty
ui:
bundle:
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.3/ui-bundle.zip
snapshot: true
11 changes: 11 additions & 0 deletions spring-batch-docs/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: batch
version: true
title: Spring Batch Documentation
nav:
- modules/ROOT/nav.adoc
ext:
collector:
run:
command: mvn process-resources -pl spring-batch-docs -am
scan:
dir: ./target/classes/antora-resources
62 changes: 62 additions & 0 deletions spring-batch-docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
* xref:index.adoc[]
* xref:spring-batch-intro.adoc[]
* xref:spring-batch-architecture.adoc[]
* xref:whatsnew.adoc[]
* xref:domain.adoc[]
* xref:job.adoc[]
** xref:job/configuring.adoc[]
** xref:job/java-config.adoc[]
** xref:job/configuring-repository.adoc[]
** xref:job/configuring-launcher.adoc[]
** xref:job/running.adoc[]
** xref:job/advanced-meta-data.adoc[]
* xref:step.adoc[]
** xref:step/chunk-oriented-processing.adoc[]
*** xref:step/chunk-oriented-processing/configuring.adoc[]
*** xref:step/chunk-oriented-processing/inheriting-from-parent.adoc[]
*** xref:step/chunk-oriented-processing/commit-interval.adoc[]
*** xref:step/chunk-oriented-processing/restart.adoc[]
*** xref:step/chunk-oriented-processing/configuring-skip.adoc[]
*** xref:step/chunk-oriented-processing/retry-logic.adoc[]
*** xref:step/chunk-oriented-processing/controlling-rollback.adoc[]
*** xref:step/chunk-oriented-processing/transaction-attributes.adoc[]
*** xref:step/chunk-oriented-processing/registering-item-streams.adoc[]
*** xref:step/chunk-oriented-processing/intercepting-execution.adoc[]
** xref:step/tasklet.adoc[]
** xref:step/controlling-flow.adoc[]
** xref:step/late-binding.adoc[]
* xref:readersAndWriters.adoc[]
** xref:readers-and-writers/item-reader.adoc[]
** xref:readers-and-writers/item-writer.adoc[]
** xref:readers-and-writers/item-stream.adoc[]
** xref:readers-and-writers/delegate-pattern-registering.adoc[]
** xref:readers-and-writers/flat-files.adoc[]
*** xref:readers-and-writers/flat-files/field-set.adoc[]
*** xref:readers-and-writers/flat-files/file-item-reader.adoc[]
*** xref:readers-and-writers/flat-files/file-item-writer.adoc[]
** xref:readers-and-writers/xml-reading-writing.adoc[]
** xref:readers-and-writers/json-reading-writing.adoc[]
** xref:readers-and-writers/multi-file-input.adoc[]
** xref:readers-and-writers/database.adoc[]
** xref:readers-and-writers/reusing-existing-services.adoc[]
** xref:readers-and-writers/process-indicator.adoc[]
** xref:readers-and-writers/custom.adoc[]
** xref:readers-and-writers/item-reader-writer-implementations.adoc[]
* xref:processor.adoc[]
* xref:scalability.adoc[]
* xref:repeat.adoc[]
* xref:retry.adoc[]
* xref:testing.adoc[]
* xref:common-patterns.adoc[]
* xref:spring-batch-integration.adoc[]
** xref:spring-batch-integration/namespace-support.adoc[]
** xref:spring-batch-integration/launching-jobs-through-messages.adoc[]
** xref:spring-batch-integration/available-attributes-of-the-job-launching-gateway.adoc[]
** xref:spring-batch-integration/sub-elements.adoc[]
* xref:monitoring-and-metrics.adoc[]
* xref:tracing.adoc[]
* Appendices
** xref:appendix.adoc[]
** xref:schema-appendix.adoc[]
** xref:transaction-appendix.adoc[]
** xref:glossary.adoc[]
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
:toc: left
:toclevels: 4

[[listOfReadersAndWriters]]
include::attributes.adoc[]

[appendix]
== List of ItemReaders and ItemWriters
[[list-of-itemreaders-and-itemwriters]]
= List of ItemReaders and ItemWriters

[[itemReadersAppendix]]
=== Item Readers
== Item Readers

.Available Item Readers
[options="header"]
Expand Down Expand Up @@ -77,7 +75,7 @@ This reader stores message offsets in the execution context to support restart c


[[itemWritersAppendix]]
=== Item Writers
== Item Writers

.Available Item Writers
[options="header"]
Expand Down
Loading

0 comments on commit 2e8d506

Please sign in to comment.