DATAREDIS-336 - Copy styles to output dir.
Upgraded to Asciidoctor 1.5.0. We now cheat on Gradle docbook-reference-plugin by directly copying files to reference work dir to bypass expanding files. Create an empty source folder so that the plugin does not fail. Original pull request: #94.
This commit is contained in:
committed by
Oliver Gierke
parent
fe6b75ee2a
commit
c6b2ba75af
98
build.gradle
98
build.gradle
@@ -1,12 +1,14 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
maven { url 'http://repo.spring.io/plugins-release' }
|
maven { url 'http://repo.spring.io/plugins-release' }
|
||||||
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'org.springframework.build.gradle:bundlor-plugin:0.1.2'
|
classpath 'org.springframework.build.gradle:bundlor-plugin:0.1.2'
|
||||||
classpath 'org.springframework.build.gradle:spring-io-plugin:0.0.3.RELEASE'
|
classpath 'org.springframework.build.gradle:spring-io-plugin:0.0.3.RELEASE'
|
||||||
classpath 'me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1'
|
classpath 'me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1'
|
||||||
classpath('org.asciidoctor:asciidoctor-gradle-plugin:0.7.0')
|
classpath 'io.spring.gradle:docbook-reference-plugin:0.3.0'
|
||||||
|
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0'
|
||||||
classpath('org.asciidoctor:asciidoctor-java-integration:0.1.4.preview.1')
|
classpath('org.asciidoctor:asciidoctor-java-integration:0.1.4.preview.1')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,6 +20,7 @@ repositories {
|
|||||||
maven { url "http://repo.spring.io/libs-snapshot" }
|
maven { url "http://repo.spring.io/libs-snapshot" }
|
||||||
maven { url "http://repo.spring.io/plugins-release" }
|
maven { url "http://repo.spring.io/plugins-release" }
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
@@ -26,7 +29,8 @@ apply plugin: 'idea'
|
|||||||
apply from: "$rootDir/maven.gradle"
|
apply from: "$rootDir/maven.gradle"
|
||||||
apply plugin: 'bundlor'
|
apply plugin: 'bundlor'
|
||||||
apply plugin: 'javadocHotfix'
|
apply plugin: 'javadocHotfix'
|
||||||
apply plugin: 'asciidoctor'
|
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
|
||||||
|
apply plugin: 'docbook-reference'
|
||||||
|
|
||||||
if (project.hasProperty('platformVersion')) {
|
if (project.hasProperty('platformVersion')) {
|
||||||
apply plugin: 'spring-io'
|
apply plugin: 'spring-io'
|
||||||
@@ -49,32 +53,6 @@ configurations.all {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
asciidoctor {
|
|
||||||
sourceDocumentName = new File("$sourceDir/index.adoc")
|
|
||||||
outputDir = new File("$buildDir/reference/htmlsingle")
|
|
||||||
options = [
|
|
||||||
eruby: 'erubis',
|
|
||||||
attributes: [
|
|
||||||
linkcss: 'true',
|
|
||||||
copycss : '',
|
|
||||||
icons : 'font',
|
|
||||||
'source-highlighter': 'prettify',
|
|
||||||
sectanchors : '',
|
|
||||||
toc: '',
|
|
||||||
toclevels: '4',
|
|
||||||
idprefix: '',
|
|
||||||
idseparator: '-',
|
|
||||||
doctype: 'book',
|
|
||||||
numbered: '',
|
|
||||||
version: project.version,
|
|
||||||
baseDir: "$sourceDir",
|
|
||||||
stylesheet: "spring.css",
|
|
||||||
resourcesDir: "$rootDir/src/main/resources",
|
|
||||||
referenceDir: "$sourceDir/reference"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Common dependencies
|
// Common dependencies
|
||||||
dependencies {
|
dependencies {
|
||||||
// Logging
|
// Logging
|
||||||
@@ -91,7 +69,6 @@ dependencies {
|
|||||||
compile "org.springframework:spring-tx:$springVersion"
|
compile "org.springframework:spring-tx:$springVersion"
|
||||||
compile("org.springframework:spring-oxm:$springVersion", optional)
|
compile("org.springframework:spring-oxm:$springVersion", optional)
|
||||||
compile "org.springframework:spring-aop:$springVersion"
|
compile "org.springframework:spring-aop:$springVersion"
|
||||||
compile "org.springframework.integration:spring-integration-core:4.0.3.RELEASE"
|
|
||||||
|
|
||||||
// Redis Drivers
|
// Redis Drivers
|
||||||
compile("redis.clients:jedis:$jedisVersion", optional)
|
compile("redis.clients:jedis:$jedisVersion", optional)
|
||||||
@@ -150,6 +127,14 @@ javadoc {
|
|||||||
title = "${rootProject.description} ${version} API"
|
title = "${rootProject.description} ${version} API"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reference {
|
||||||
|
sourceDir = file("$buildDir/asciidoc/docbook")
|
||||||
|
}
|
||||||
|
|
||||||
|
referencePdf {
|
||||||
|
sourceDir = file("$buildDir/asciidoc/docbook")
|
||||||
|
}
|
||||||
|
|
||||||
bundlor {
|
bundlor {
|
||||||
manifestTemplate = file("${projectDir}/template.mf").text
|
manifestTemplate = file("${projectDir}/template.mf").text
|
||||||
}
|
}
|
||||||
@@ -183,9 +168,8 @@ task javadocJar(type: Jar) {
|
|||||||
from javadoc
|
from javadoc
|
||||||
}
|
}
|
||||||
|
|
||||||
task docsZip(type: Zip) {
|
task docsZip(type: Zip, dependsOn:['docbook', 'generateHTML']) {
|
||||||
dependsOn asciidoctor
|
|
||||||
|
|
||||||
group = 'Distribution'
|
group = 'Distribution'
|
||||||
classifier = 'docs'
|
classifier = 'docs'
|
||||||
description = "Builds -${classifier} archive containing api and reference for deployment"
|
description = "Builds -${classifier} archive containing api and reference for deployment"
|
||||||
@@ -200,12 +184,12 @@ task docsZip(type: Zip) {
|
|||||||
|
|
||||||
from (asciidoctor.outputDir) {
|
from (asciidoctor.outputDir) {
|
||||||
include "index.html"
|
include "index.html"
|
||||||
|
include "spring.css"
|
||||||
into 'reference/htmlsingle'
|
into 'reference/htmlsingle'
|
||||||
}
|
}
|
||||||
|
|
||||||
from ("src/main/resources/asciidoc") {
|
from ("$buildDir/reference/pdf") {
|
||||||
include "spring.css"
|
into 'reference/pdf'
|
||||||
into "reference/htmlsingle"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,5 +277,47 @@ task wrapper(type: Wrapper) {
|
|||||||
gradleVersion = '1.11'
|
gradleVersion = '1.11'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType(org.asciidoctor.gradle.AsciidoctorTask) { docTask ->
|
||||||
|
options = [
|
||||||
|
logDocuments: true,
|
||||||
|
attributes: [
|
||||||
|
linkcss: 'true',
|
||||||
|
copycss : 'spring.css',
|
||||||
|
stylesheet: "spring.css",
|
||||||
|
icons : 'font',
|
||||||
|
'source-highlighter': 'prettify',
|
||||||
|
sectanchors : '',
|
||||||
|
toc: '',
|
||||||
|
toclevels: '4',
|
||||||
|
idprefix: '',
|
||||||
|
idseparator: '-',
|
||||||
|
doctype: 'book',
|
||||||
|
numbered: '',
|
||||||
|
version: project.version,
|
||||||
|
baseDir: "$sourceDir",
|
||||||
|
resourcesDir: "$rootDir/src/main/resources",
|
||||||
|
referenceDir: "$sourceDir/reference"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
task generateHTML (type: org.asciidoctor.gradle.AsciidoctorTask, description: 'Generates single and multiple HTML documentation.', group: 'Documentation') {
|
||||||
|
backend = 'html5'
|
||||||
|
outputDir = new File("$buildDir/reference/htmlsingle")
|
||||||
|
options.attributes.doctype = 'book'
|
||||||
|
options.attributes.copycss = 'spring.css'
|
||||||
|
}
|
||||||
|
|
||||||
|
task generateDocbook (type: org.asciidoctor.gradle.AsciidoctorTask, description: 'Generates DOCBOOK documentation.', group: 'Documentation', dependsOn : ['createEmptyDocbookSourceDirToCheatThePlugin']) {
|
||||||
|
backend = 'docbook'
|
||||||
|
outputDir = new File("$buildDir/reference-work")
|
||||||
|
options.attributes.chunkedOutput = 'true'
|
||||||
|
options.attributes.stylesheet = 'chunked'
|
||||||
|
}
|
||||||
|
|
||||||
|
task createEmptyDocbookSourceDirToCheatThePlugin << {
|
||||||
|
new File("$buildDir/asciidoc/docbook").mkdirs()
|
||||||
|
}
|
||||||
|
|
||||||
assemble.dependsOn = ['jar', 'sourcesJar']
|
assemble.dependsOn = ['jar', 'sourcesJar']
|
||||||
defaultTasks 'build'
|
defaultTasks 'build'
|
||||||
|
|||||||
79
docs/src/reference/docbook/index.xml
Normal file
79
docs/src/reference/docbook/index.xml
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<book xmlns="http://docbook.org/ns/docbook" version="5.0"
|
||||||
|
xml:id="spring-data-keyvalue-reference"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
|
||||||
|
<bookinfo>
|
||||||
|
<title>Spring Data Redis Reference Documentation</title>
|
||||||
|
<titleabbrev>Spring Data Redis ${version}</titleabbrev>
|
||||||
|
<releaseinfo>${version}</releaseinfo>
|
||||||
|
<productname>Spring Data Redis</productname>
|
||||||
|
|
||||||
|
<authorgroup>
|
||||||
|
<author>
|
||||||
|
<firstname>Costin</firstname>
|
||||||
|
<surname>Leau</surname>
|
||||||
|
<affiliation>SpringSource</affiliation>
|
||||||
|
</author>
|
||||||
|
<author>
|
||||||
|
<firstname>Jennifer</firstname>
|
||||||
|
<surname>Hickey</surname>
|
||||||
|
<affiliation>SpringSource</affiliation>
|
||||||
|
</author>
|
||||||
|
<author>
|
||||||
|
<firstname>Christoph</firstname>
|
||||||
|
<surname>Strobl</surname>
|
||||||
|
<affiliation>Pivotal Software, Inc.</affiliation>
|
||||||
|
</author>
|
||||||
|
<author>
|
||||||
|
<firstname>Thomas</firstname>
|
||||||
|
<surname>Darimont</surname>
|
||||||
|
<affiliation>Pivotal Software, Inc.</affiliation>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
|
|
||||||
|
<legalnotice>
|
||||||
|
<para>
|
||||||
|
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.
|
||||||
|
</para>
|
||||||
|
</legalnotice>
|
||||||
|
|
||||||
|
<copyright xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
<year>2011-2014</year>
|
||||||
|
<holder>The original authors.</holder>
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
</bookinfo>
|
||||||
|
|
||||||
|
<toc/>
|
||||||
|
<xi:include href="preface.xml"/>
|
||||||
|
|
||||||
|
<part id="introduction">
|
||||||
|
<title>Introduction</title>
|
||||||
|
|
||||||
|
<xi:include href="introduction/introduction.xml"/>
|
||||||
|
<xi:include href="introduction/why-sdr.xml"/>
|
||||||
|
<xi:include href="introduction/requirements.xml"/>
|
||||||
|
<xi:include href="introduction/getting-started.xml"/>
|
||||||
|
</part>
|
||||||
|
|
||||||
|
<part id="reference">
|
||||||
|
<title>Reference Documentation</title>
|
||||||
|
|
||||||
|
<xi:include href="reference/introduction.xml"/>
|
||||||
|
<xi:include href="reference/redis.xml"/>
|
||||||
|
</part>
|
||||||
|
|
||||||
|
<part id="appendixes">
|
||||||
|
<title>Appendixes</title>
|
||||||
|
|
||||||
|
<xi:include href="appendix/introduction.xml"/>
|
||||||
|
<xi:include href="appendix/appendix-schema.xml"/>
|
||||||
|
<xi:include href="appendix/appendix-command-reference.xml"/>
|
||||||
|
</part>
|
||||||
|
|
||||||
|
</book>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
[float]
|
[float]
|
||||||
= Document structure
|
= Appendix Document structure
|
||||||
|
|
||||||
Various appendixes outside the reference documentation.
|
Various appendixes outside the reference documentation.
|
||||||
|
|
||||||
|
|||||||
@@ -177,6 +177,8 @@ public RedisConnectionFactory jedisConnectionFactory() {
|
|||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Sometimes direct interaction with the one of the Sentinels is required. Using `RedisConnectionFactory.getSentinelConnection()` or `RedisConnection.getSentinelCommands()` gives you access to the first active Sentinel configured.
|
||||||
|
|
||||||
[[redis:template]]
|
[[redis:template]]
|
||||||
== Working with Objects through RedisTemplate
|
== Working with Objects through RedisTemplate
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user