Add reference docs tasks to Gradle build

- Move spring-webflow-reference to src/reference
- Upgrade to Docbook 5
- Apply docbook plugin
- Add tasks for generating distribution zip files
This commit is contained in:
Rossen Stoyanchev
2012-05-24 18:57:30 -04:00
parent 4e81930b72
commit 50a1cf1def
37 changed files with 185 additions and 265 deletions

View File

@@ -234,6 +234,12 @@ configure(rootProject) {
description = 'Spring Web Flow'
apply plugin: 'docbook-reference'
reference {
sourceDir = file('src/reference')
}
// don't publish the default jar for the root project
configurations.archives.artifacts.clear()
@@ -258,9 +264,103 @@ configure(rootProject) {
maxMemory = '1024m'
}
task docsZip(type: Zip) {
group = 'Distribution'
classifier = 'docs'
description = "Builds -${classifier} archive containing api and reference " +
"for deployment at static.springframework.org/spring-webflow/docs."
from('src/dist') {
include 'changelog.txt'
}
from (api) {
into 'api'
}
from (reference) {
into 'reference'
}
}
task schemaZip(type: Zip) {
group = 'Distribution'
classifier = 'schema'
description = "Builds -${classifier} archive containing all " +
"XSDs for deployment at static.springframework.org/schema."
subprojects.each { subproject ->
def Properties schemas = new Properties();
subproject.sourceSets.main.resources.find {
it.path.endsWith('META-INF/spring.schemas')
}?.withInputStream { schemas.load(it) }
for (def key : schemas.keySet()) {
def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
assert shortName != key
File xsdFile = subproject.sourceSets.main.allSource.find {
it.path.endsWith(schemas.get(key))
}
assert xsdFile != null
into (shortName) {
from xsdFile.path
}
}
}
}
task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
group = 'Distribution'
classifier = 'dist'
description = "Builds -${classifier} archive, containing all jars and docs, " +
"suitable for community download page."
def baseDir = "${project.name}-${project.version}";
from('src/dist') {
include 'notice.txt'
into "${baseDir}"
expand(copyright: new Date().format('yyyy'), version: project.version)
}
from('src/dist') {
include 'readme.txt'
include 'license.txt'
into "${baseDir}"
}
from(zipTree(docsZip.archivePath)) {
into "${baseDir}/docs"
}
from(zipTree(schemaZip.archivePath)) {
into "${baseDir}/schema"
}
subprojects.each { subproject ->
into ("${baseDir}/libs") {
from subproject.jar
if (subproject.tasks.findByPath('sourcesJar')) {
from subproject.sourcesJar
}
if (subproject.tasks.findByPath('javadocJar')) {
from subproject.javadocJar
}
}
}
}
artifacts {
archives docsZip
archives schemaZip
archives distZip
}
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '1.0-rc-1'
}
}

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.springframework.binding">
<property file="${basedir}/../build.properties"/>
<import file="${basedir}/../build-spring-webflow/package-bundle.xml"/>
<import file="${basedir}/../build-spring-webflow/publish-artifact.xml"/>
<import file="${basedir}/../spring-build/standard/default.xml"/>
</project>

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.springframework.faces">
<property file="${basedir}/../build.properties"/>
<import file="${basedir}/../build-spring-webflow/package-bundle.xml"/>
<import file="${basedir}/../build-spring-webflow/publish-artifact.xml"/>
<import file="${basedir}/../spring-build/standard/default.xml"/>
</project>

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.springframework.js.resources">
<property file="${basedir}/../build.properties"/>
<import file="${basedir}/../build-spring-webflow/package-bundle.xml"/>
<import file="${basedir}/../build-spring-webflow/publish-artifact.xml"/>
<import file="${basedir}/../build-spring-webflow/package-artifact.xml"/>
<import file="${basedir}/../spring-build/standard/default.xml"/>
</project>

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.springframework.js">
<property file="${basedir}/../build.properties"/>
<import file="${basedir}/../build-spring-webflow/package-bundle.xml"/>
<import file="${basedir}/../build-spring-webflow/publish-artifact.xml"/>
<import file="${basedir}/../spring-build/standard/default.xml"/>
</project>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>spring-webflow-library</name>
<comment></comment>
<projects>
<project>spring-binding</project>
<project>spring-webflow</project>
<project>spring-js</project>
<project>spring-faces</project>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.springframework.webflow-library">
<property file="${basedir}/../build.properties"/>
<import file="${basedir}/../spring-build/library/default.xml"/>
<target name="publish-maven-central"/>
<target name="publish-maven-central-local"/>
<target name="install-maven-central"/>
</project>

View File

@@ -1,10 +0,0 @@
Library-SymbolicName: org.springframework.webflow
Library-Version: @bundle.version@
Library-Name: Spring Web Flow
Import-Bundle:
org.springframework.binding;version="[@bundle.version@, @bundle.version@]",
org.springframework.webflow;version="[@bundle.version@, @bundle.version@]",
org.springframework.js;version="[@bundle.version@, @bundle.version@]";resolution:="optional",
org.springframework.js.resources;version="[@bundle.version@, @bundle.version@]";resolution:="optional",
org.springframework.faces;version="[@bundle.version@, @bundle.version@]";resolution:="optional",
com.springsource.org.jboss.el;version="[2.0.0.GA, 2.1.0)";resolution:="optional"

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>spring-webflow-reference</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="spring-webflow-reference">
<property name="doc.type" value="reference"/>
<property file="${basedir}/../build.properties"/>
<import file="${basedir}/../spring-build/docbook/default.xml"/>
</project>

View File

@@ -1,35 +0,0 @@
/*
code highlight CSS resemblign the Eclipse IDE default color schema
@author Costin Leau
*/
.hl-keyword {
color: #7F0055;
font-weight: bold;
}
.hl-comment {
color: #3F5F5F;
font-style: italic;
}
.hl-multiline-comment {
color: #3F5FBF;
font-style: italic;
}
.hl-tag {
color: #3F7F7F;
}
.hl-attribute {
color: #7F007F;
}
.hl-value {
color: #2A00FF;
}
.hl-string {
color: #2A00FF;
}

View File

@@ -1,59 +0,0 @@
@IMPORT url("highlight.css");
html {
padding: 0pt;
margin: 0pt;
}
body {
margin-left: 10%;
margin-right: 10%;
font-family: Arial, Sans-serif;
}
div {
margin: 0pt;
}
p {
text-align: justify;
}
hr {
border: 1px solid gray;
background: gray;
}
h1,h2,h3,h4 {
color: #234623;
font-family: Arial, Sans-serif;
}
pre {
line-height: 1.0;
color: black;
}
pre.programlisting {
font-size: 10pt;
padding: 7pt 3pt;
border: 1pt solid black;
background: #eeeeee;
clear: both;
}
div.table {
margin: 1em;
padding: 0.5em;
text-align: center;
}
div.table table {
display: table;
width: 100%;
}
div.table td {
padding-left: 7px;
padding-right: 7px;
}

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.springframework.webflow">
<property file="${basedir}/../build.properties"/>
<import file="${basedir}/../build-spring-webflow/package-bundle.xml"/>
<import file="${basedir}/../build-spring-webflow/publish-artifact.xml"/>
<import file="${basedir}/../spring-build/standard/default.xml"/>
</project>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="actions">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="actions">
<title>Executing actions</title>
<sect1 id="actions-introduction">
<title>Introduction</title>
@@ -463,4 +464,4 @@ public class FileUploadHandler {
</para>
</sect2>
</sect1>
</chapter>
</chapter>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="defining-flows">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="defining-flows">
<title>Defining Flows</title>
<sect1 id="defining-flows-introduction">
<title>Introduction</title>
@@ -493,4 +494,4 @@ public interface FlowOutcome {
</para>
</sect2>
</sect1>
</chapter>
</chapter>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="el">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="el">
<title>Expression Language (EL)</title>
<sect1 id="el-introduction">
<title>Introduction</title>
@@ -370,4 +371,4 @@
If no such variable is found, an <code>EvaluationException</code> will be thrown.
</para>
</sect1>
</chapter>
</chapter>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<appendix id="field-mappings">
<appendix xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="field-mappings">
<title>Flow Definition Language 1.0 to 2.0 Mappings</title>
<para>
The flow definition language has changed since the 1.0 release.

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="flow-inheritance">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="flow-inheritance">
<title>Flow Inheritance</title>
<sect1 id="flow-inheritance-introduction">
<title>Introduction</title>
@@ -191,4 +192,4 @@
</para>
</sect2>
</sect1>
</chapter>
</chapter>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="flow-managed-persistence">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="flow-managed-persistence">
<title>Flow Managed Persistence</title>
<sect1 id="flow-managed-persistence-introduction">
<title>Introduction</title>
@@ -85,4 +86,4 @@
its parent.
</para>
</sect1>
</chapter>
</chapter>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="flow-security">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="flow-security">
<title>Securing Flows</title>
<sect1 id="flow-security-introduction">
<title>Introduction</title>
@@ -175,4 +176,4 @@
</programlisting>
</sect2>
</sect1>
</chapter>
</chapter>

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -1,7 +1,8 @@
<?xml version='1.0' encoding="iso-8859-1"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<book>
<?xml version="1.0" encoding="UTF-8"?>
<book xmlns="http://docbook.org/ns/docbook" version="5.0"
xml:id="spring-webflow-reference"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink">
<bookinfo>
<title>Spring Web Flow Reference Guide</title>
<titleabbrev>Spring Web Flow</titleabbrev>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="introduction">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="introduction">
<title>Introduction</title>
<sect1 id="manual-overview">
<title>What this guide covers</title>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="portlet">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="portlet">
<title>Portlet Integration</title>
<sect1 id="portlet-introduction">
<title>Introduction</title>
@@ -102,7 +103,7 @@ public class ViewFlowHandler extends AbstractFlowHandler {
<title>Handler Mappings</title>
<para>
Spring Portlet MVC provides a rich set of methods to map portlet requests.
Complete documentation is available in the <ulink url="http://static.springframework.org/spring/docs/2.5.x/reference/portlet.html#portlet-handlermapping">Spring Reference Documentation</ulink>.
Complete documentation is available in the <ulink url="http://static.springframework.org/spring/docs/current/reference/portlet.html#portlet-handlermapping">Spring Reference Documentation</ulink>.
</para>
<para>
The <code>booking-portlet-mvc</code> sample application uses a <code>PortletModeHandlerMapping</code> to map portlet requests.

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="spring-faces">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="spring-faces">
<title>JSF Integration</title>
<sect1 id="spring-faces-introduction">

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="spring-js">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="spring-js">
<title>Spring JavaScript Quick Reference</title>
<sect1 id="spring-js-introduction">
<title>Introduction</title>
@@ -301,4 +302,4 @@
</programlisting>
</sect2>
</sect1>
</chapter>
</chapter>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="spring-mvc">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="spring-mvc">
<title>Spring MVC Integration</title>
<sect1 id="spring-mvc-introduction">

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="system-setup">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="system-setup">
<title>System Setup</title>
<sect1 id="system-setup-introduction">
<title>Introduction</title>
@@ -293,4 +294,4 @@
</sect3>
</sect2>
</sect1>
</chapter>
</chapter>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="testing">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="testing">
<title>Testing flows</title>
<sect1 id="testing-introduction">
<title>Introduction</title>
@@ -145,4 +146,4 @@ public Flow createMockBookingSubflow() {
}]]>
</programlisting>
</sect1>
</chapter>
</chapter>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="upgrade-guide">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="upgrade-guide">
<title>Upgrading from 1.0</title>
<sect1 id="upgrade-guide-introduction">
<title>Introduction</title>
@@ -270,4 +271,4 @@ java org.springframework.webflow.upgrade.WebFlowUpgrader flow-to-upgrade.xml
</para>
</sect2>
</sect1>
</chapter>
</chapter>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="views">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="views">
<title>Rendering views</title>
<sect1 id="views-introduction">
<title>Introduction</title>
@@ -850,4 +851,4 @@ typeMismatch=The {0} field is of the wrong type.
</programlisting>
</sect2>
</sect1>
</chapter>
</chapter>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="whatsnew">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="whatsnew">
<title>What's New</title>
<sect1 id="whatsnew-swf-230">
<title>Spring Web Flow 2.3</title>