Skip to content

Commit 21e11ad

Browse files
committed
Bundle Javadoc with Antora documentation site.
Closes spring-projects#2400
1 parent aaadc34 commit 21e11ad

File tree

9 files changed

+32
-19
lines changed

9 files changed

+32
-19
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ out/
1414
_site
1515
node_modules
1616
package-lock.json
17-
package.json
1817
node
1918
.mvn/.gradle-enterprise
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"dependencies": {
3+
"antora": "3.2.0-alpha.6",
4+
"@antora/atlas-extension": "1.0.0-alpha.2",
5+
"@antora/collector-extension": "1.0.0-alpha.7",
6+
"@asciidoctor/tabs": "1.0.0-beta.6",
7+
"@springio/antora-extensions": "1.13.0",
8+
"@springio/asciidoctor-extensions": "1.0.0-alpha.11"
9+
}
10+
}

spring-data-rest-distribution/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</plugin>
5050

5151
<plugin>
52-
<groupId>io.spring.maven.antora</groupId>
52+
<groupId>org.antora</groupId>
5353
<artifactId>antora-maven-plugin</artifactId>
5454
</plugin>
5555
</plugins>

src/main/antora/antora-playbook.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
# The purpose of this Antora playbook is to build the docs in the current branch.
44
antora:
55
extensions:
6-
- '@antora/collector-extension'
7-
- require: '@springio/antora-extensions/root-component-extension'
6+
- require: '@springio/antora-extensions'
87
root_component_name: 'data-rest'
98
site:
109
title: Spring Data REST
@@ -17,13 +16,12 @@ content:
1716
worktrees: true
1817
asciidoc:
1918
attributes:
20-
page-pagination: ''
2119
hide-uri-scheme: '@'
2220
tabs-sync-option: '@'
23-
chomp: 'all'
2421
extensions:
2522
- '@asciidoctor/tabs'
2623
- '@springio/asciidoctor-extensions'
24+
- '@springio/asciidoctor-extensions/javadoc-extension'
2725
sourcemap: true
2826
urls:
2927
latest_version_segment: ''
@@ -33,5 +31,5 @@ runtime:
3331
format: pretty
3432
ui:
3533
bundle:
36-
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.5/ui-bundle.zip
34+
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.16/ui-bundle.zip
3735
snapshot: true

src/main/antora/antora.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ ext:
1010
local: true
1111
scan:
1212
dir: spring-data-rest-distribution/target/classes/
13+
- run:
14+
command: ./mvnw package -Pdistribute
15+
local: true
16+
scan:
17+
dir: target/antora

src/main/antora/modules/ROOT/nav.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@
2727
** xref:customizing/custom-jackson-deserialization.adoc[]
2828
** xref:customizing/configuring-cors.adoc[]
2929
30-
* https://github.com/spring-projects/spring-data-commons/wiki[Wiki]
30+
* xref:attachment$api/java/index.html[Javadoc,role=link-external,window=_blank]
31+
* https://github.com/spring-projects/spring-data-commons/wiki[Wiki,role=link-external,window=_blank]

src/main/antora/modules/ROOT/pages/events.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
The REST exporter emits eight different events throughout the process of working with an entity:
55

6-
* `BeforeCreateEvent`
7-
* `AfterCreateEvent`
8-
* `BeforeSaveEvent`
9-
* `AfterSaveEvent`
10-
* `BeforeLinkSaveEvent`
11-
* `AfterLinkSaveEvent`
12-
* `BeforeDeleteEvent`
13-
* `AfterDeleteEvent`
6+
* javadoc:org.springframework.data.rest.core.event.BeforeCreateEvent[]
7+
* javadoc:org.springframework.data.rest.core.event.AfterCreateEvent[]
8+
* javadoc:org.springframework.data.rest.core.event.BeforeSaveEvent[]
9+
* javadoc:org.springframework.data.rest.core.event.AfterSaveEvent[]
10+
* javadoc:org.springframework.data.rest.core.event.BeforeLinkSaveEvent[]
11+
* javadoc:org.springframework.data.rest.core.event.AfterLinkSaveEvent[]
12+
* javadoc:org.springframework.data.rest.core.event.BeforeDeleteEvent[]
13+
* javadoc:org.springframework.data.rest.core.event.AfterDeleteEvent[]
1414

1515
[[events.application-listener]]
1616
== Writing an `ApplicationListener`

src/main/antora/modules/ROOT/pages/integration.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Sometimes you need to add links to exported resources in your own custom-built S
1010

1111
* Manually assembling links.
1212
* Using Spring HATEOAS's https://docs.spring.io/spring-hateoas/docs/current/reference/html/#fundamentals.obtaining-links.builder[`LinkBuilder`] with `linkTo()`, `slash()`, and so on.
13-
* Using Spring Data REST's implementation of https://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest/webmvc/support/RepositoryEntityLinks.html[`RepositoryEntityLinks`].
13+
* Using Spring Data REST's implementation of javadoc:org.springframework.data.rest.webmvc.support.RepositoryEntityLinks[].
1414

1515
The first suggestion is terrible and should be avoided at all costs. It makes your code brittle and high-risk. The second is handy when creating links to other hand-written Spring MVC controllers. The last one, which we explore in the rest of this section, is good for looking up resource links that are exported by Spring Data REST.
1616

@@ -54,4 +54,4 @@ With the class in the preceding example, you can use the following operations:
5454

5555
|===
5656

57-
NOTE: All of the search-based links support extra parameters for paging and sorting. See https://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest/webmvc/support/RepositoryEntityLinks.html[`RepositoryEntityLinks`] for the details. There is also `linkFor(Class<?> type)`, but that returns a Spring HATEOAS `LinkBuilder`, which returns you to the lower level API. Try to use the other ones first.
57+
NOTE: All of the search-based links support extra parameters for paging and sorting. See javadoc:org.springframework.data.rest.webmvc.support.RepositoryEntityLinks[] for the details. There is also `linkFor(Class<?> type)`, but that returns a Spring HATEOAS `LinkBuilder`, which returns you to the lower level API. Try to use the other ones first.

src/main/antora/modules/ROOT/pages/intro.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
= Introduction
33
:page-section-summary-toc: 1
44

5-
REST web services have become the number one means for application integration on the web. In its core, REST defines that a system that consists of resources with which clients interact. These resources are implemented in a hypermedia-driven way. link:{springDocsUrl}/web.html#spring-web[Spring MVC] and link:{springDocsUrl}/web-reactive.html#spring-webflux[Spring WebFlux] each offer a solid foundation to build theses kinds of services. However, implementing even the simplest tenet of REST web services for a multi-domain object system can be quite tedious and result in a lot of boilerplate code.
5+
REST web services have become the number one means for application integration on the web. In its core, REST defines that a system that consists of resources with which clients interact. These resources are implemented in a hypermedia-driven way. link:{springDocsUrl}/web.html#spring-web[Spring MVC] and link:{springDocsUrl}/web-reactive.html#spring-webflux[Spring WebFlux] each offer a solid foundation to build these kinds of services. However, implementing even the simplest tenet of REST web services for a multi-domain object system can be quite tedious and result in a lot of boilerplate code.
66

77
Spring Data REST builds on top of the Spring Data repositories and automatically exports those as REST resources. It leverages hypermedia to let clients automatically find functionality exposed by the repositories and integrate these resources into related hypermedia-based functionality.

0 commit comments

Comments
 (0)