Skip to content

Commit 7980afe

Browse files
Jay Bryantartembilan
Jay Bryant
authored andcommitted
INT-4339: Remove Docbook & rely on Asciidoctor
JIRA: https://jira.spring.io/browse/INT-4339
1 parent a283ad6 commit 7980afe

File tree

6 files changed

+77
-796
lines changed

6 files changed

+77
-796
lines changed

build.gradle

Lines changed: 57 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,27 @@ buildscript {
44
maven { url 'https://repo.spring.io/plugins-release' }
55
}
66
dependencies {
7-
classpath 'io.spring.gradle:docbook-reference-plugin:0.3.1'
8-
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.8'
97
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
108
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
9+
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16'
1110
}
1211
}
1312

1413
plugins {
1514
id 'org.sonarqube' version '2.6.2'
15+
id 'org.asciidoctor.convert' version '1.5.9.2'
1616
}
1717

1818
description = 'Spring Integration'
1919

20-
def docsDir = 'src/reference/asciidoc'
21-
2220
ext {
2321
linkHomepage = 'https://projects.spring.io/spring-integration'
2422
linkCi = 'https://build.spring.io/browse/INT'
2523
linkIssue = 'https://jira.spring.io/browse/INT'
2624
linkScmUrl = 'https://github.com/spring-projects/spring-integration'
2725
linkScmConnection = 'scm:git:git://github.com/spring-projects/spring-integration.git'
2826
linkScmDevConnection = 'scm:git:ssh://[email protected]:spring-projects/spring-integration.git'
27+
docResourcesVersion = '0.1.0.RELEASE'
2928
}
3029

3130
allprojects {
@@ -764,42 +763,58 @@ project("spring-integration-bom") {
764763
}
765764
}
766765

767-
apply plugin: 'org.asciidoctor.convert'
766+
configurations {
767+
docs
768+
}
769+
770+
dependencies {
771+
docs "io.spring.docresources:spring-doc-resources:${docResourcesVersion}@zip"
772+
}
773+
774+
task prepareAsciidocBuild(type: Sync) {
775+
dependsOn configurations.docs
776+
from {
777+
configurations.docs.collect { zipTree(it) }
778+
}
779+
from 'src/reference/asciidoc/'
780+
into "$buildDir/asciidoc"
781+
}
768782

769783
asciidoctor {
770-
sourceDir = file("$docsDir")
784+
dependsOn 'prepareAsciidocBuild'
785+
sourceDir "$buildDir/asciidoc"
771786
sources {
772787
include 'index.adoc'
773788
}
774-
backends = ['html5', 'docbook']
775-
logDocuments = true
776-
options = [
777-
doctype: 'book',
778-
]
779-
attributes = [
780-
docinfo: '',
781-
toc2: '',
782-
'compat-mode': '',
783-
imagesdir: '',
784-
stylesheet: "${rootProject.projectDir}/src/reference/asciidoc/stylesheets/golo.css",
785-
'source-highlighter': 'highlightjs'
786-
]
787-
}
788-
789-
apply plugin: DocbookReferencePlugin
790-
791-
reference {
792-
sourceFileName = 'index.xml'
793-
sourceDir = file("$buildDir/asciidoc/docbook")
794-
pdfFilename = 'spring-integration-reference.pdf'
795-
expandPlaceholders = ''
789+
resources {
790+
from(sourceDir) {
791+
include 'images/*', 'css/*', 'js/**'
792+
}
793+
}
794+
backends = ['html5', 'pdf']
795+
options doctype: 'book', eruby: 'erubis'
796+
attributes 'icons': 'font',
797+
'idprefix': '',
798+
'idseparator': '-',
799+
docinfo: 'shared',
800+
sectanchors: '',
801+
sectnums: '',
802+
stylesdir: 'css/',
803+
stylesheet: 'spring.css',
804+
'linkcss': true,
805+
'source-highlighter=highlight.js',
806+
'highlightjsdir=js/highlight',
807+
'highlightjs-theme=atom-one-dark-reasonable',
808+
'project-version': project.version,
809+
'allow-uri-read': ''
810+
}
811+
812+
task reference(dependsOn: asciidoctor) {
813+
group = 'Documentation'
814+
description = 'Generate the reference documentation'
796815
}
797816

798-
reference.dependsOn asciidoctor
799-
800-
[asciidoctor, reference, referenceEpub, referenceHtmlMulti, referenceHtmlSingle, referencePdf].each {
801-
it.onlyIf { "$System.env.NO_REFERENCE_TASK" != 'true' || project.hasProperty('ignoreEnvToStopReference') }
802-
}
817+
reference.onlyIf { "$System.env.NO_REFERENCE_TASK" != 'true' || project.hasProperty('ignoreEnvToStopReference') }
803818

804819
sonarqube {
805820
properties {
@@ -863,7 +878,7 @@ task schemaZip(type: Zip) {
863878
}
864879
}
865880

866-
task docsZip(type: Zip) {
881+
task docsZip(type: Zip, dependsOn: reference) {
867882
group = 'Distribution'
868883
classifier = 'docs'
869884
description = "Builds -${classifier} archive containing api and reference " +
@@ -877,9 +892,14 @@ task docsZip(type: Zip) {
877892
into 'api'
878893
}
879894

880-
from (reference) {
881-
into 'reference'
882-
}
895+
from ('build/asciidoc/html5') {
896+
into 'reference'
897+
}
898+
899+
from ('build/asciidoc/pdf') {
900+
include 'index.pdf'
901+
into 'reference'
902+
}
883903
}
884904

885905
task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {

composite_filter_bugfix

Whitespace-only changes.

src/reference/asciidoc/changes-1.0-2.0.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ See the https://github.com/spring-projects/spring-integration/wiki/Spring-Integr
88

99
Spring Integration 2.0 is built on top of Spring 3.0.5 and makes many of its features available to our users.
1010

11-
[[spel-support]]
11+
[[2.0-spel-support]]
1212
===== Support for the Spring Expression Language (SpEL)
1313

1414
You can now use SpEL expressions within the transformer, router, filter, splitter, aggregator, service-activator, header-enricher, and many more elements of the Spring Integration core namespace as well as within various adapters.

src/reference/asciidoc/index-docinfo.xml

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

src/reference/asciidoc/index.adoc

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
[[spring-integration-reference]]
2-
= Spring Integration Reference Manual
3-
:revnumber: {project-version}
4-
:revdate: {localdate}
5-
:linkcss:
6-
:doctype: book
7-
:docinfo: shared
2+
= Spring Integration
83
:toc: left
94
:toclevels: 4
10-
:source-highlighter: prettify
5+
:numbered:
116
:icons: font
12-
:imagesdir: images
13-
ifdef::backend-epub3[:front-cover-image: image:epub-cover.png[Front Cover,1050,1600]]
7+
:hide-uri-scheme:
8+
Mark Fisher; Marius Bogoevici; Iwein Fuld; Jonas Partner; Oleg Zhurakousky; Gary Russell; Dave Syer; Josh Long; David Turanski; Gunnar Hillert; Artem Bilan; Amol Nayak; Jay Bryant
149

15-
(C) 2009-2018 Pivotal Software, Inc. All rights reserved.
10+
*{project-version}*
1611

17-
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.
12+
(C) 2009 - 2019 Pivotal Software, Inc.
13+
All rights reserved.
14+
15+
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.
1816

1917
include::./preface.adoc[]
18+
2019
[[whats-new-part]]
2120
= What's New?
2221

2322
[[spring-integration-intro-new]]
2423
For those who are already familiar with Spring Integration, this chapter provides a brief overview of the new features of version 5.1.
24+
2525
If you are interested in the changes and features that were introduced in earlier versions, see the <<history>>.
2626

2727
include::./whats-new.adoc[]
@@ -33,6 +33,7 @@ include::./whats-new.adoc[]
3333
Spring Integration provides an extension of the Spring programming model to support the well known http://www.eaipatterns.com/[Enterprise Integration Patterns].
3434
It enables lightweight messaging within Spring-based applications and supports integration with external systems through declarative adapters.
3535
Those adapters provide a higher level of abstraction over Spring's support for remoting, messaging, and scheduling.
36+
3637
Spring Integration's primary goal is to provide a simple model for building enterprise integration solutions while maintaining the separation of concerns that is essential for producing maintainable, testable code.
3738

3839
include::./overview.adoc[]
@@ -44,7 +45,8 @@ include::./overview.adoc[]
4445
This section covers all aspects of the core messaging API in Spring Integration.
4546
It covers messages, message channels, and message endpoints.
4647
It also covers many of the enterprise integration patterns, such as filter, router, transformer, service activator , splitter, and aggregator.
47-
The section also contains material about system management, including the control bus and message history support.
48+
49+
This section also contains material about system management, including the control bus and message history support.
4850

4951
// BE SURE TO PRECEDE ALL include:: with a blank line - see https://github.com/asciidoctor/asciidoctor/issues/1297
5052
include::./messaging-channels.adoc[]
@@ -67,6 +69,8 @@ include::./system-management.adoc[]
6769
[[spring-integration-adapters]]
6870
This section covers the various channel adapters and messaging gateways provided by Spring Integration to support message-based communication with external systems.
6971

72+
Each system, from AMQP to Zookeeper, has its own integration requirements, and this section covers them.
73+
7074
// BE SURE TO PRECEDE ALL include:: with a blank line - see https://github.com/asciidoctor/asciidoctor/issues/1297
7175
include::./endpoint-summary.adoc[]
7276

@@ -129,7 +133,9 @@ include::./zookeeper.adoc[]
129133
= Appendices
130134

131135
[[spring-integration-adapters-advanced]]
132-
Advanced Topics and Additional Resources
136+
The appendices cover advanced topics and additional resources.
137+
138+
The last appendix covers the history of Spring Integration.
133139

134140
[appendix]
135141
include::./spel.adoc[]

0 commit comments

Comments
 (0)