DATAKV-75

+ fixed item replacement
(note that ReplaceTask only accepts chars not strings and the GroovyStringTemplate seems to be fragile so the ${} got replaced with @@)
This commit is contained in:
Costin Leau
2011-07-04 21:05:08 +03:00
parent 953faa11db
commit 690923b3c9
2 changed files with 15 additions and 6 deletions

View File

@@ -1,3 +1,6 @@
import org.apache.tools.ant.filters.FixCrLfFilter
import org.apache.tools.ant.filters.ReplaceTokens
// -----------------------------------------------------------------------------
// Configuration for the docs subproject
// -----------------------------------------------------------------------------
@@ -28,16 +31,22 @@ refSpec = copySpec {
into ('reference/images') {
from (imagesDir)
}
//expand(project.properties)
filter { String line ->
"[$line]"
p = new Properties()
for (e in project.properties) {
if (e.key != null && e.value != null)
p.setProperty(e.key, e.value.toString())
}
filter(ReplaceTokens, tokens: p)
}
task reference (type: Copy) {
dependsOn 'docbook'
description = "Builds aggregated DocBook"
group = "Documentation"
logger.info("Version is " + version)
destinationDir = buildDir
with(refSpec)
}

View File

@@ -7,7 +7,7 @@
<bookinfo>
<title>Spring Data Key-Value - Reference Documentation</title>
<titleabbrev>Spring Data Key-Value ${version}</titleabbrev>
<releaseinfo>${version}</releaseinfo>
<releaseinfo>@version@</releaseinfo>
<productname>Spring Data Key-Value</productname>
<authorgroup>
@@ -34,8 +34,8 @@
</bookinfo>
<toc/>
<xi:include href="preface.xml"/>
<!--
<part id="introduction">
<title>Introduction</title>
@@ -60,7 +60,7 @@
<xi:include href="appendix/introduction.xml"/>
<xi:include href="appendix/appendix-schema.xml"/>
</part>
-->
<!--
<part id="resources">
<title>Other Documentation</title>