From 50a1cf1defa8bca03dcb0ea580c1134d042c2fb8 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Thu, 24 May 2012 18:57:30 -0400 Subject: [PATCH] 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 --- build.gradle | 100 ++++++++++++++++++ spring-binding/build.xml | 9 -- spring-faces/build.xml | 9 -- spring-js-resources/build.xml | 10 -- spring-js/build.xml | 9 -- spring-webflow-library/.project | 15 --- spring-webflow-library/build.xml | 13 --- .../org.springframework.webflow-library.libd | 10 -- spring-webflow-reference/.project | 11 -- spring-webflow-reference/build.xml | 8 -- .../css/html/highlight.css | 35 ------ .../css/html/stylesheet.css | 59 ----------- spring-webflow/build.xml | 9 -- .../src => src/reference}/actions.xml | 9 +- .../src => src/reference}/defining-flows.xml | 9 +- .../src => src/reference}/el.xml | 9 +- .../flow-definition-field-mappings.xml | 7 +- .../reference}/flow-inheritance.xml | 9 +- .../reference}/flow-managed-persistence.xml | 9 +- .../src => src/reference}/flow-security.xml | 9 +- .../reference}/images/flow-view-packaging.png | Bin .../images/hotels-site-bookhotel-flow.png | Bin .../reference}/images/hotels-site.png | Bin .../reference}/images/logo.jpg | Bin .../reference}/images/s2-logo.png | Bin .../reference}/images/xdev-spring_logo.jpg | Bin .../reference/index.xml | 9 +- .../src => src/reference}/overview.xml | 8 +- .../src => src/reference}/portlet.xml | 9 +- .../src => src/reference}/spring-faces.xml | 7 +- .../src => src/reference}/spring-js.xml | 9 +- .../src => src/reference}/spring-mvc.xml | 7 +- .../src => src/reference}/system-setup.xml | 9 +- .../src => src/reference}/testing.xml | 9 +- .../src => src/reference}/upgrade-guide.xml | 9 +- .../src => src/reference}/views.xml | 9 +- .../src => src/reference}/whatsnew.xml | 7 +- 37 files changed, 185 insertions(+), 265 deletions(-) delete mode 100644 spring-binding/build.xml delete mode 100644 spring-faces/build.xml delete mode 100644 spring-js-resources/build.xml delete mode 100644 spring-js/build.xml delete mode 100644 spring-webflow-library/.project delete mode 100644 spring-webflow-library/build.xml delete mode 100644 spring-webflow-library/org.springframework.webflow-library.libd delete mode 100644 spring-webflow-reference/.project delete mode 100644 spring-webflow-reference/build.xml delete mode 100644 spring-webflow-reference/css/html/highlight.css delete mode 100644 spring-webflow-reference/css/html/stylesheet.css delete mode 100644 spring-webflow/build.xml rename {spring-webflow-reference/src => src/reference}/actions.xml (98%) rename {spring-webflow-reference/src => src/reference}/defining-flows.xml (98%) rename {spring-webflow-reference/src => src/reference}/el.xml (99%) rename {spring-webflow-reference/src => src/reference}/flow-definition-field-mappings.xml (99%) rename {spring-webflow-reference/src => src/reference}/flow-inheritance.xml (97%) rename {spring-webflow-reference/src => src/reference}/flow-managed-persistence.xml (95%) rename {spring-webflow-reference/src => src/reference}/flow-security.xml (97%) rename {spring-webflow-reference => src/reference}/images/flow-view-packaging.png (100%) rename {spring-webflow-reference => src/reference}/images/hotels-site-bookhotel-flow.png (100%) rename {spring-webflow-reference => src/reference}/images/hotels-site.png (100%) rename {spring-webflow-reference => src/reference}/images/logo.jpg (100%) rename {spring-webflow-reference => src/reference}/images/s2-logo.png (100%) rename {spring-webflow-reference => src/reference}/images/xdev-spring_logo.jpg (100%) rename spring-webflow-reference/src/spring-webflow-reference.xml => src/reference/index.xml (93%) rename {spring-webflow-reference/src => src/reference}/overview.xml (97%) rename {spring-webflow-reference/src => src/reference}/portlet.xml (97%) rename {spring-webflow-reference/src => src/reference}/spring-faces.xml (99%) rename {spring-webflow-reference/src => src/reference}/spring-js.xml (98%) rename {spring-webflow-reference/src => src/reference}/spring-mvc.xml (99%) rename {spring-webflow-reference/src => src/reference}/system-setup.xml (98%) rename {spring-webflow-reference/src => src/reference}/testing.xml (96%) rename {spring-webflow-reference/src => src/reference}/upgrade-guide.xml (98%) rename {spring-webflow-reference/src => src/reference}/views.xml (99%) rename {spring-webflow-reference/src => src/reference}/whatsnew.xml (98%) diff --git a/build.gradle b/build.gradle index 59fc3e9e..000b9cea 100644 --- a/build.gradle +++ b/build.gradle @@ -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' } + } diff --git a/spring-binding/build.xml b/spring-binding/build.xml deleted file mode 100644 index 86df9f50..00000000 --- a/spring-binding/build.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/spring-faces/build.xml b/spring-faces/build.xml deleted file mode 100644 index 14c93d5d..00000000 --- a/spring-faces/build.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/spring-js-resources/build.xml b/spring-js-resources/build.xml deleted file mode 100644 index 396d115c..00000000 --- a/spring-js-resources/build.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/spring-js/build.xml b/spring-js/build.xml deleted file mode 100644 index c1bbcd67..00000000 --- a/spring-js/build.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/spring-webflow-library/.project b/spring-webflow-library/.project deleted file mode 100644 index 83754bc0..00000000 --- a/spring-webflow-library/.project +++ /dev/null @@ -1,15 +0,0 @@ - - - spring-webflow-library - - - spring-binding - spring-webflow - spring-js - spring-faces - - - - - - diff --git a/spring-webflow-library/build.xml b/spring-webflow-library/build.xml deleted file mode 100644 index 5f8f79b7..00000000 --- a/spring-webflow-library/build.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/spring-webflow-library/org.springframework.webflow-library.libd b/spring-webflow-library/org.springframework.webflow-library.libd deleted file mode 100644 index 69575c8a..00000000 --- a/spring-webflow-library/org.springframework.webflow-library.libd +++ /dev/null @@ -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" diff --git a/spring-webflow-reference/.project b/spring-webflow-reference/.project deleted file mode 100644 index 41e5191a..00000000 --- a/spring-webflow-reference/.project +++ /dev/null @@ -1,11 +0,0 @@ - - - spring-webflow-reference - - - - - - - - diff --git a/spring-webflow-reference/build.xml b/spring-webflow-reference/build.xml deleted file mode 100644 index eadeda28..00000000 --- a/spring-webflow-reference/build.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/spring-webflow-reference/css/html/highlight.css b/spring-webflow-reference/css/html/highlight.css deleted file mode 100644 index ffefef72..00000000 --- a/spring-webflow-reference/css/html/highlight.css +++ /dev/null @@ -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; -} \ No newline at end of file diff --git a/spring-webflow-reference/css/html/stylesheet.css b/spring-webflow-reference/css/html/stylesheet.css deleted file mode 100644 index 4314f6b3..00000000 --- a/spring-webflow-reference/css/html/stylesheet.css +++ /dev/null @@ -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; -} diff --git a/spring-webflow/build.xml b/spring-webflow/build.xml deleted file mode 100644 index 2e162434..00000000 --- a/spring-webflow/build.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/spring-webflow-reference/src/actions.xml b/src/reference/actions.xml similarity index 98% rename from spring-webflow-reference/src/actions.xml rename to src/reference/actions.xml index 69e75416..bf23ef26 100644 --- a/spring-webflow-reference/src/actions.xml +++ b/src/reference/actions.xml @@ -1,7 +1,8 @@ - - + Executing actions Introduction @@ -463,4 +464,4 @@ public class FileUploadHandler { - \ No newline at end of file + diff --git a/spring-webflow-reference/src/defining-flows.xml b/src/reference/defining-flows.xml similarity index 98% rename from spring-webflow-reference/src/defining-flows.xml rename to src/reference/defining-flows.xml index 641e70f3..0666658c 100644 --- a/spring-webflow-reference/src/defining-flows.xml +++ b/src/reference/defining-flows.xml @@ -1,7 +1,8 @@ - - + Defining Flows Introduction @@ -493,4 +494,4 @@ public interface FlowOutcome { - \ No newline at end of file + diff --git a/spring-webflow-reference/src/el.xml b/src/reference/el.xml similarity index 99% rename from spring-webflow-reference/src/el.xml rename to src/reference/el.xml index 2d031cfd..abda5a6a 100644 --- a/spring-webflow-reference/src/el.xml +++ b/src/reference/el.xml @@ -1,7 +1,8 @@ - - + Expression Language (EL) Introduction @@ -370,4 +371,4 @@ If no such variable is found, an EvaluationException will be thrown. - \ No newline at end of file + diff --git a/spring-webflow-reference/src/flow-definition-field-mappings.xml b/src/reference/flow-definition-field-mappings.xml similarity index 99% rename from spring-webflow-reference/src/flow-definition-field-mappings.xml rename to src/reference/flow-definition-field-mappings.xml index 3f907947..778fcd7f 100644 --- a/spring-webflow-reference/src/flow-definition-field-mappings.xml +++ b/src/reference/flow-definition-field-mappings.xml @@ -1,7 +1,8 @@ - - + Flow Definition Language 1.0 to 2.0 Mappings The flow definition language has changed since the 1.0 release. diff --git a/spring-webflow-reference/src/flow-inheritance.xml b/src/reference/flow-inheritance.xml similarity index 97% rename from spring-webflow-reference/src/flow-inheritance.xml rename to src/reference/flow-inheritance.xml index 3c0a6fd7..68020866 100644 --- a/spring-webflow-reference/src/flow-inheritance.xml +++ b/src/reference/flow-inheritance.xml @@ -1,7 +1,8 @@ - - + Flow Inheritance Introduction @@ -191,4 +192,4 @@ - \ No newline at end of file + diff --git a/spring-webflow-reference/src/flow-managed-persistence.xml b/src/reference/flow-managed-persistence.xml similarity index 95% rename from spring-webflow-reference/src/flow-managed-persistence.xml rename to src/reference/flow-managed-persistence.xml index 752186fe..821bc299 100644 --- a/spring-webflow-reference/src/flow-managed-persistence.xml +++ b/src/reference/flow-managed-persistence.xml @@ -1,7 +1,8 @@ - - + Flow Managed Persistence Introduction @@ -85,4 +86,4 @@ its parent. - \ No newline at end of file + diff --git a/spring-webflow-reference/src/flow-security.xml b/src/reference/flow-security.xml similarity index 97% rename from spring-webflow-reference/src/flow-security.xml rename to src/reference/flow-security.xml index 8060a3a6..4101d9ff 100644 --- a/spring-webflow-reference/src/flow-security.xml +++ b/src/reference/flow-security.xml @@ -1,7 +1,8 @@ - - + Securing Flows Introduction @@ -175,4 +176,4 @@ - \ No newline at end of file + diff --git a/spring-webflow-reference/images/flow-view-packaging.png b/src/reference/images/flow-view-packaging.png similarity index 100% rename from spring-webflow-reference/images/flow-view-packaging.png rename to src/reference/images/flow-view-packaging.png diff --git a/spring-webflow-reference/images/hotels-site-bookhotel-flow.png b/src/reference/images/hotels-site-bookhotel-flow.png similarity index 100% rename from spring-webflow-reference/images/hotels-site-bookhotel-flow.png rename to src/reference/images/hotels-site-bookhotel-flow.png diff --git a/spring-webflow-reference/images/hotels-site.png b/src/reference/images/hotels-site.png similarity index 100% rename from spring-webflow-reference/images/hotels-site.png rename to src/reference/images/hotels-site.png diff --git a/spring-webflow-reference/images/logo.jpg b/src/reference/images/logo.jpg similarity index 100% rename from spring-webflow-reference/images/logo.jpg rename to src/reference/images/logo.jpg diff --git a/spring-webflow-reference/images/s2-logo.png b/src/reference/images/s2-logo.png similarity index 100% rename from spring-webflow-reference/images/s2-logo.png rename to src/reference/images/s2-logo.png diff --git a/spring-webflow-reference/images/xdev-spring_logo.jpg b/src/reference/images/xdev-spring_logo.jpg similarity index 100% rename from spring-webflow-reference/images/xdev-spring_logo.jpg rename to src/reference/images/xdev-spring_logo.jpg diff --git a/spring-webflow-reference/src/spring-webflow-reference.xml b/src/reference/index.xml similarity index 93% rename from spring-webflow-reference/src/spring-webflow-reference.xml rename to src/reference/index.xml index d6b55c7b..a66cd227 100644 --- a/spring-webflow-reference/src/spring-webflow-reference.xml +++ b/src/reference/index.xml @@ -1,7 +1,8 @@ - - - + + Spring Web Flow Reference Guide Spring Web Flow diff --git a/spring-webflow-reference/src/overview.xml b/src/reference/overview.xml similarity index 97% rename from spring-webflow-reference/src/overview.xml rename to src/reference/overview.xml index edad6d6f..af8a00f2 100644 --- a/spring-webflow-reference/src/overview.xml +++ b/src/reference/overview.xml @@ -1,8 +1,8 @@ - - - + Introduction What this guide covers diff --git a/spring-webflow-reference/src/portlet.xml b/src/reference/portlet.xml similarity index 97% rename from spring-webflow-reference/src/portlet.xml rename to src/reference/portlet.xml index ae7f5254..c1aa9932 100644 --- a/spring-webflow-reference/src/portlet.xml +++ b/src/reference/portlet.xml @@ -1,7 +1,8 @@ - - + Portlet Integration Introduction @@ -102,7 +103,7 @@ public class ViewFlowHandler extends AbstractFlowHandler { Handler Mappings Spring Portlet MVC provides a rich set of methods to map portlet requests. - Complete documentation is available in the Spring Reference Documentation. + Complete documentation is available in the Spring Reference Documentation. The booking-portlet-mvc sample application uses a PortletModeHandlerMapping to map portlet requests. diff --git a/spring-webflow-reference/src/spring-faces.xml b/src/reference/spring-faces.xml similarity index 99% rename from spring-webflow-reference/src/spring-faces.xml rename to src/reference/spring-faces.xml index 79495cac..593a130e 100644 --- a/spring-webflow-reference/src/spring-faces.xml +++ b/src/reference/spring-faces.xml @@ -1,7 +1,8 @@ - - + JSF Integration diff --git a/spring-webflow-reference/src/spring-js.xml b/src/reference/spring-js.xml similarity index 98% rename from spring-webflow-reference/src/spring-js.xml rename to src/reference/spring-js.xml index 4342cfd3..8975c27f 100644 --- a/spring-webflow-reference/src/spring-js.xml +++ b/src/reference/spring-js.xml @@ -1,7 +1,8 @@ - - + Spring JavaScript Quick Reference Introduction @@ -301,4 +302,4 @@ - \ No newline at end of file + diff --git a/spring-webflow-reference/src/spring-mvc.xml b/src/reference/spring-mvc.xml similarity index 99% rename from spring-webflow-reference/src/spring-mvc.xml rename to src/reference/spring-mvc.xml index 9e6ba81d..637180bd 100644 --- a/spring-webflow-reference/src/spring-mvc.xml +++ b/src/reference/spring-mvc.xml @@ -1,7 +1,8 @@ - - + Spring MVC Integration diff --git a/spring-webflow-reference/src/system-setup.xml b/src/reference/system-setup.xml similarity index 98% rename from spring-webflow-reference/src/system-setup.xml rename to src/reference/system-setup.xml index fce6e39e..d8604919 100644 --- a/spring-webflow-reference/src/system-setup.xml +++ b/src/reference/system-setup.xml @@ -1,7 +1,8 @@ - - + System Setup Introduction @@ -293,4 +294,4 @@ - \ No newline at end of file + diff --git a/spring-webflow-reference/src/testing.xml b/src/reference/testing.xml similarity index 96% rename from spring-webflow-reference/src/testing.xml rename to src/reference/testing.xml index eeb6c981..08eeeb84 100644 --- a/spring-webflow-reference/src/testing.xml +++ b/src/reference/testing.xml @@ -1,7 +1,8 @@ - - + Testing flows Introduction @@ -145,4 +146,4 @@ public Flow createMockBookingSubflow() { }]]> - \ No newline at end of file + diff --git a/spring-webflow-reference/src/upgrade-guide.xml b/src/reference/upgrade-guide.xml similarity index 98% rename from spring-webflow-reference/src/upgrade-guide.xml rename to src/reference/upgrade-guide.xml index 0fa4c0d1..caeb7d57 100644 --- a/spring-webflow-reference/src/upgrade-guide.xml +++ b/src/reference/upgrade-guide.xml @@ -1,7 +1,8 @@ - - + Upgrading from 1.0 Introduction @@ -270,4 +271,4 @@ java org.springframework.webflow.upgrade.WebFlowUpgrader flow-to-upgrade.xml - \ No newline at end of file + diff --git a/spring-webflow-reference/src/views.xml b/src/reference/views.xml similarity index 99% rename from spring-webflow-reference/src/views.xml rename to src/reference/views.xml index d1ac2360..06dc15dd 100644 --- a/spring-webflow-reference/src/views.xml +++ b/src/reference/views.xml @@ -1,7 +1,8 @@ - - + Rendering views Introduction @@ -850,4 +851,4 @@ typeMismatch=The {0} field is of the wrong type. - \ No newline at end of file + diff --git a/spring-webflow-reference/src/whatsnew.xml b/src/reference/whatsnew.xml similarity index 98% rename from spring-webflow-reference/src/whatsnew.xml rename to src/reference/whatsnew.xml index 09fc7ab8..04b70c03 100644 --- a/spring-webflow-reference/src/whatsnew.xml +++ b/src/reference/whatsnew.xml @@ -1,7 +1,8 @@ - - + What's New Spring Web Flow 2.3