Author: janstey
Date: Wed Dec 10 06:54:29 2008
New Revision: 725304

URL: http://svn.apache.org/viewvc?rev=725304&view=rev
Log:
Merged revisions 725302 via svnmerge from 
https://svn.apache.org/repos/asf/activemq/camel/trunk

........
  r725302 | janstey | 2008-12-10 11:21:38 -0330 (Wed, 10 Dec 2008) | 1 line
  
  CAMEL-1165 - Add pom version as the guide version so we don't have to update 
every time.
........

Modified:
    activemq/camel/branches/camel-1.x/   (props changed)
    activemq/camel/branches/camel-1.x/tooling/camel-manual/pom.xml
    
activemq/camel/branches/camel-1.x/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/HtmlToPdfMojo.java

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: activemq/camel/branches/camel-1.x/tooling/camel-manual/pom.xml
URL: 
http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/tooling/camel-manual/pom.xml?rev=725304&r1=725303&r2=725304&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/tooling/camel-manual/pom.xml (original)
+++ activemq/camel/branches/camel-1.x/tooling/camel-manual/pom.xml Wed Dec 10 
06:54:29 2008
@@ -59,6 +59,12 @@
                 }
               </style>
           ]]></head>
+          <replaceToken><![CDATA[
+              <h3 id="replaceme">.*</h3>
+          ]]></replaceToken>
+          <replaceValue><![CDATA[
+              <h3>Version ${pom.version}</h3>
+          ]]></replaceValue>
         </configuration>
       </plugin>
       <plugin>

Modified: 
activemq/camel/branches/camel-1.x/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/HtmlToPdfMojo.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/HtmlToPdfMojo.java?rev=725304&r1=725303&r2=725304&view=diff
==============================================================================
--- 
activemq/camel/branches/camel-1.x/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/HtmlToPdfMojo.java
 (original)
+++ 
activemq/camel/branches/camel-1.x/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/HtmlToPdfMojo.java
 Wed Dec 10 06:54:29 2008
@@ -93,6 +93,21 @@
     private String head;
 
     /**
+     * Regex to search for in the html file. This will be replaced with the 
value of the 
+     * replaceValue parameter.
+     *
+     * @parameter
+     */
+    private String replaceToken;    
+
+    /**
+     * String that the replaceToken will be replaced with.
+     *
+     * @parameter
+     */
+    private String replaceValue;        
+    
+    /**
      * The first div with who's class matches the contentDivClass will be
      * assumed to be the content section of the HTML and is what will be used 
as
      * the content in the PDF.
@@ -247,6 +262,11 @@
             }
         }
         out.println("</head>");
+        
+        if (replaceToken != null && replaceValue != null) {
+            content = content.replaceAll(replaceToken, replaceValue);
+        }
+        
         out.println("<body>" + content + "</body>");
         out.close();
         getLog().info("Stored: " + getHTMLFileName());


Reply via email to