← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 291: Added revision information through an ant run task which generates a build.properties file to the...

 

------------------------------------------------------------
revno: 291
committer: Jason P. Pickering <jason.p.pickering@xxxxxxxxx>
branch nick: dhis2-docbook-docs
timestamp: Fri 2011-04-08 08:55:52 +0200
message:
  Added revision information through an ant run task which generates a build.properties file to the verso title page.
modified:
  pom.xml
  src/docbkx/en/dhis2_user_manual_en.xml
  src/docbkx/en/resources/xsl/fop-cust.xsl


--
lp:~dhis2-documenters/dhis2/dhis2-docbook-docs
https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs

Your team DHIS 2 developers is subscribed to branch lp:~dhis2-documenters/dhis2/dhis2-docbook-docs.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscription
=== modified file 'pom.xml'
--- pom.xml	2011-04-07 10:27:07 +0000
+++ pom.xml	2011-04-08 06:55:52 +0000
@@ -15,6 +15,29 @@
 
   <build>
     <plugins>
+	 <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>generate-resources</phase>
+            <configuration>
+              <tasks>
+                <tstamp>
+                  <format property="now" pattern="yyyy-MM-dd HH:mm:ss"/>
+                </tstamp>
+                <exec executable="bzr" outputproperty="revision" failifexecutionfails="false">
+                      <arg line="revno -q"/>
+                </exec>
+               <echo file="${project.basedir}/src/docbkx/build.properties" message="&lt;?xml version=&apos;1.0&apos; encoding=&apos;UTF-8&apos;?&gt;&lt;revhistory&gt;&lt;revision&gt;&lt;revnumber&gt;${revision}&lt;/revnumber&gt;&lt;revremark&gt;Version ${project.version} ${now}&lt;/revremark&gt;&lt;/revision&gt;&lt;/revhistory&gt;" />
+              </tasks>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
       <plugin>
         <groupId>com.agilejava.docbkx</groupId>
         <artifactId>docbkx-maven-plugin</artifactId>
@@ -155,7 +178,7 @@
               <argLine>-Xmx1024m</argLine>
               <foCustomization>${docbook.source}/en/resources/xsl/fop-cust.xsl</foCustomization>
               <doubleSided>1</doubleSided>
-              <includes>*.xml</includes>
+              <includes>dhis2_user_manual_en.xml,dhis2_end_user_manual.xml,dhis2_implementation_guide_en.xml</includes>
               <sourceDirectory>${docbook.source}/en/</sourceDirectory>
               <postProcess>
                 <copy file="target/docbkx/pdf/dhis2_user_manual_en.pdf" todir="${docbook.target}/en/user" />

=== modified file 'src/docbkx/en/dhis2_user_manual_en.xml'
--- src/docbkx/en/dhis2_user_manual_en.xml	2011-04-07 10:27:07 +0000
+++ src/docbkx/en/dhis2_user_manual_en.xml	2011-04-08 06:55:52 +0000
@@ -1,4 +1,5 @@
 <?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. -->
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"; [
 <!ENTITY version '2.X'>]>
 <book>
@@ -22,9 +23,10 @@
     <legalnotice>
       <formalpara>
         <title/>
-        <para>THIS DOCUMENT IS PROVIDED BY  THE AUTHORS &apos;&apos;AS IS&apos;&apos; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS MANUAL         AND PRODUCTS MENTIONED HEREIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</para>
+        <para>THIS DOCUMENT IS PROVIDED BY  THE AUTHORS &apos;&apos;AS IS&apos;&apos; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS MANUAL AND PRODUCTS MENTIONED HEREIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</para>
       </formalpara>
     </legalnotice>
+	<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="../build.properties" encoding="UTF-8"/>
   </bookinfo>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="dhis2_user_man_introduction.xml" encoding="UTF-8"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="dhis2_user_man_getting_started.xml" encoding="UTF-8"/>

=== modified file 'src/docbkx/en/resources/xsl/fop-cust.xsl'
--- src/docbkx/en/resources/xsl/fop-cust.xsl	2011-04-07 10:27:07 +0000
+++ src/docbkx/en/resources/xsl/fop-cust.xsl	2011-04-08 06:55:52 +0000
@@ -91,7 +91,21 @@
 					<fo:table-row >
 						<fo:table-cell text-align="left">
 							<fo:block text-align="left" font-size="12pt">
-								 <xsl:text>Copyright &copyright; 2006-2010</xsl:text>
+								 <xsl:text>Copyright &copyright; 2006-2011</xsl:text>
+							</fo:block>
+						</fo:table-cell>
+					</fo:table-row>
+					<fo:table-row >
+						<fo:table-cell text-align="left">
+							<fo:block text-align="left" font-size="12pt" padding-before="15mm">
+								 <xsl:text>Revision </xsl:text><xsl:value-of select="db:bookinfo/db:revhistory/db:revision/db:revnumber" />
+							</fo:block>
+						</fo:table-cell>
+					</fo:table-row>
+					<fo:table-row >
+						<fo:table-cell text-align="left">
+							<fo:block text-align="left" font-size="12pt">
+								 <xsl:value-of select="db:bookinfo/db:revhistory/db:revision/db:revremark" />
 							</fo:block>
 						</fo:table-cell>
 					</fo:table-row>