Skip to content

Commit 59b73c4

Browse files
committed
Build Antora docs.
1 parent e54ba05 commit 59b73c4

File tree

17 files changed

+109
-72
lines changed

17 files changed

+109
-72
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ _site/
2121
.vscode/
2222
.flattened-pom.xml
2323

24+
25+
node
26+
node_modules
27+
build
28+
package.json
29+
package-lock.json

docs/antora-playbook.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@ antora:
66
- '@antora/collector-extension'
77
- '@antora/atlas-extension'
88
- require: '@springio/antora-extensions/root-component-extension'
9-
root_component_name: 'PROJECT_WITHOUT_SPRING'
10-
# FIXME: Run antora once using this extension to migrate to the Asciidoc Tabs syntax
11-
# and then remove this extension
12-
- require: '@springio/antora-extensions/tabs-migration-extension'
13-
unwrap_example_block: always
14-
save_result: true
9+
root_component_name: 'cloud-openfeign'
1510
site:
16-
title: PROJECT_FULL_NAME
17-
url: https://docs.spring.io/PROJECT_NAME/reference/
11+
title: Spring Cloud Openfeign
12+
url: https://docs.spring.io/spring-cloud-openfeign/reference/
1813
content:
1914
sources:
2015
- url: ./..

docs/antora.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: PROJECT_WITHOUT_SPRING
1+
name: cloud-openfeign
22
version: true
3-
title: PROJECT_NAME
3+
title: Spring Cloud OpenFeign
44
nav:
55
- modules/ROOT/nav.adoc
66
ext:

docs/modules/ROOT/nav.adoc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
* xref:index.adoc[]
2-
* xref:spring-cloud-openfeign.adoc[]
3-
* xref:_attributes.adoc[]
4-
* xref:intro.adoc[]
5-
* xref:README.adoc[]
6-
* xref:_configprops.adoc[]
2+
** xref:intro.adoc[]
3+
** xref:spring-cloud-openfeign.adoc[]
74
* xref:appendix.adoc[]
8-
* xref:sagan-boot.adoc[]
9-
* xref:sagan-index.adoc[]
5+
** xref:configprops.adoc[]

docs/modules/ROOT/pages/_configprops.adoc

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/modules/ROOT/pages/appendix.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
Various properties can be specified inside your `application.properties` file, inside your `application.yml` file, or as command line switches.
9-
This appendix provides a list of common {project-full-name} properties and references to the underlying classes that consume them.
9+
This appendix provides a list of common Spring Cloud OpenFeign properties and references to the underlying classes that consume them.
1010

1111
NOTE: Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list.
1212
Also, you can define your own properties.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[[configuration-properties]]
2+
= Configuration Properties
3+
4+
Below you can find a list of configuration properties.
5+
6+
include::partial$_configprops.adoc[]

docs/modules/ROOT/pages/index.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[[cloud-native-applications]]
2+
= Cloud Native Applications
3+
4+
include::partial$_attributes.adoc[]
5+
6+
// TODO: figure out remote includes in docs and replace pasted text
7+
// include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/contributing-docs.adoc[]
8+
NOTE: Spring Cloud is released under the non-restrictive Apache 2.0 license.
9+
If you would like to contribute to this section of the documentation or if you find an error, you can find the source code and issue trackers for the project at {github-issues}[github].

docs/modules/ROOT/pages/intro.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[[intro]]
2+
= Introduction
3+
14
This project provides OpenFeign integrations for Spring Boot apps through autoconfiguration
25
and binding to the Spring Environment and other Spring programming model idioms.
36

docs/modules/ROOT/pages/spring-cloud-openfeign.adoc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
[[spring-cloud-openfeign]]
2-
= Spring Cloud OpenFeign
3-
4-
*{spring-cloud-version}*
5-
6-
1+
[[features]]
2+
= Spring Cloud OpenFeign Features
73

84
[[spring-cloud-feign]]
95
== Declarative REST Client: Feign
@@ -846,7 +842,7 @@ If Feign client refresh is enabled, each Feign client is created with:
846842

847843
* `feign.Request.Options` as a refresh-scoped bean. This means properties such as `connectTimeout` and `readTimeout` can be refreshed against any Feign client instance.
848844
* A url wrapped under `org.springframework.cloud.openfeign.RefreshableUrl`. This means the URL of Feign client, if defined
849-
with `spring.cloud.openfeign.client.config.{feignName}.url` property, can be refreshed against any Feign client instance.
845+
with `spring.cloud.openfeign.client.config.\{feignName}.url` property, can be refreshed against any Feign client instance.
850846

851847
You can refresh these properties through `POST /actuator/refresh`.
852848

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:sc-ext: java
2+
:project-full-name: Spring Cloud OpenFeign
3+
:all: {asterisk}{asterisk}

docs/pom.xml

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,32 @@
33
xmlns="http://maven.apache.org/POM/4.0.0"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
6+
<groupId>org.springframework.cloud</groupId>
7+
<artifactId>spring-cloud-openfeign-docs</artifactId>
68
<parent>
79
<groupId>org.springframework.cloud</groupId>
810
<artifactId>spring-cloud-openfeign</artifactId>
911
<version>4.1.0-SNAPSHOT</version>
12+
<relativePath>..</relativePath>
1013
</parent>
1114
<scm>
1215
<url>https://github.com/spring-cloud/spring-cloud-openfeign</url>
1316
</scm>
14-
<artifactId>spring-cloud-openfeign-docs</artifactId>
1517
<packaging>jar</packaging>
1618
<name>Spring Cloud OpenFeign Docs</name>
17-
<description>Spring Cloud Docs</description>
19+
<description>Spring Cloud OpenFeign Docs</description>
1820
<properties>
1921
<docs.main>spring-cloud-openfeign</docs.main>
2022
<main.basedir>${basedir}/..</main.basedir>
21-
<configprops.inclusionPattern>feign.*</configprops.inclusionPattern>
22-
<upload-docs-zip.phase>deploy</upload-docs-zip.phase>
23+
<configprops.inclusionPattern>spring.cloud.*</configprops.inclusionPattern>
2324
<!-- Don't upload docs jar to central / repo.spring.io -->
2425
<maven-deploy-plugin-default.phase>none</maven-deploy-plugin-default.phase>
26+
27+
<!-- Observability -->
28+
<micrometer-docs-generator.version>1.0.2</micrometer-docs-generator.version>
29+
<micrometer-docs-generator.inputPath>${maven.multiModuleProjectDirectory}/</micrometer-docs-generator.inputPath>
30+
<micrometer-docs-generator.inclusionPattern>.*</micrometer-docs-generator.inclusionPattern>
31+
<micrometer-docs-generator.outputPath>${maven.multiModuleProjectDirectory}/docs/modules/ROOT/partials/</micrometer-docs-generator.outputPath>
2532
</properties>
2633
<dependencies>
2734
<dependency>
@@ -36,6 +43,12 @@
3643
<profile>
3744
<id>docs</id>
3845
<build>
46+
<resources>
47+
<resource>
48+
<directory>src/main/antora/resources/antora-resources</directory>
49+
<filtering>true</filtering>
50+
</resource>
51+
</resources>
3952
<plugins>
4053
<plugin>
4154
<groupId>pl.project13.maven</groupId>
@@ -45,17 +58,44 @@
4558
<groupId>org.apache.maven.plugins</groupId>
4659
<artifactId>maven-dependency-plugin</artifactId>
4760
</plugin>
48-
<plugin>
49-
<groupId>org.apache.maven.plugins</groupId>
50-
<artifactId>maven-resources-plugin</artifactId>
51-
</plugin>
5261
<plugin>
5362
<groupId>org.codehaus.mojo</groupId>
5463
<artifactId>exec-maven-plugin</artifactId>
64+
<!-- TODO: Remove this execution if you have no observability -->
65+
<executions>
66+
<execution>
67+
<id>generate-observability-docs</id>
68+
<phase>${generate-docs.phase}</phase>
69+
<goals>
70+
<goal>java</goal>
71+
</goals>
72+
<configuration>
73+
<mainClass>io.micrometer.docs.DocsGeneratorCommand</mainClass>
74+
<includePluginDependencies>true</includePluginDependencies>
75+
<arguments>
76+
<argument>${micrometer-docs-generator.inputPath}</argument>
77+
<argument>${micrometer-docs-generator.inclusionPattern}</argument>
78+
<argument>${micrometer-docs-generator.outputPath}</argument>
79+
</arguments>
80+
</configuration>
81+
</execution>
82+
</executions>
83+
<dependencies>
84+
<dependency>
85+
<groupId>io.micrometer</groupId>
86+
<artifactId>micrometer-docs-generator</artifactId>
87+
<version>${micrometer-docs-generator.version}</version>
88+
<type>jar</type>
89+
</dependency>
90+
</dependencies>
91+
</plugin>
92+
<plugin>
93+
<groupId>io.spring.maven.antora</groupId>
94+
<artifactId>antora-component-version-maven-plugin</artifactId>
5595
</plugin>
5696
<plugin>
57-
<groupId>org.asciidoctor</groupId>
58-
<artifactId>asciidoctor-maven-plugin</artifactId>
97+
<groupId>io.spring.maven.antora</groupId>
98+
<artifactId>antora-maven-plugin</artifactId>
5999
</plugin>
60100
<plugin>
61101
<groupId>org.apache.maven.plugins</groupId>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: @antora-component.version@
2+
prerelease: @antora-component.prerelease@
3+
4+
asciidoc:
5+
attributes:
6+
attribute-missing: 'warn'
7+
chomp: 'all'
8+
project-root: @maven.multiModuleProjectDirectory@
9+
github-repo: @docs.main@
10+
github-raw: https://raw.githubusercontent.com/spring-cloud/@docs.main@/@github-tag@
11+
github-code: https://github.com/spring-cloud/@docs.main@/tree/@github-tag@
12+
github-issues: https://github.com/spring-cloud/@docs.main@/issues/
13+
github-wiki: https://github.com/spring-cloud/@docs.main@/wiki
14+
spring-cloud-version: @project.version@
15+
github-tag: @github-tag@
16+
version-type: @version-type@
17+
docs-url: https://docs.spring.io/@docs.main@/docs/@project.version@
18+
raw-docs-url: https://raw.githubusercontent.com/spring-cloud/@docs.main@/@github-tag@
19+
project-version: @project.version@
20+
project-name: @docs.main@

0 commit comments

Comments
 (0)