svn commit: r733541 - /jakarta/taglibs/proper/rdc/trunk/taglibs-rdc-examples/pom.xml

[email protected]
Newsgroups gmane.comp.jakarta.taglibs.devel
Message-ID <[email protected]>
Author: rahul
Date: Sun Jan 11 15:32:04 2009
New Revision: 733541

URL: http://svn.apache.org/viewvc?rev=733541&view=rev
Log:
Package sample jsps styled as html pages within the war as well.

Modified:
    jakarta/taglibs/proper/rdc/trunk/taglibs-rdc-examples/pom.xml

Modified: jakarta/taglibs/proper/rdc/trunk/taglibs-rdc-examples/pom.xml
URL: http://svn.apache.org/viewvc/jakarta/taglibs/proper/rdc/trunk/taglibs-rdc-examples/pom.xml?rev=733541&r1=733540&r2=733541&view=diff
==============================================================================
--- jakarta/taglibs/proper/rdc/trunk/taglibs-rdc-examples/pom.xml (original)
+++ jakarta/taglibs/proper/rdc/trunk/taglibs-rdc-examples/pom.xml Sun Jan 11 15:32:04 2009
@@ -131,6 +131,72 @@
           </webResources>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <dependencies>
+          <dependency> 
+            <groupId>ant</groupId>
+            <artifactId>ant-trax</artifactId>
+            <version>1.6.5</version>
+          </dependency>
+        </dependencies>
+        <executions>
+          <execution>
+            <id>generatehtml</id>
+            <phase>generate-resources</phase>
+            <configuration>
+              <tasks>
+                <!-- Copy the .jsp files as .text files -->
+                <copy todir="src/main/webapp" >
+                  <fileset dir="src/main/webapp" includes="**/*.jsp" excludes="index.jsp"/>
+                  <mapper type="glob" from="*.jsp" to="*.text"/>
+                </copy>
+                <!-- Now escape the .text files -->
+                <replace dir="src/main/webapp">
+                  <include name="**/*.text"/>
+                  <replacetoken><![CDATA[&]]></replacetoken>
+                  <replacevalue><![CDATA[&amp;]]></replacevalue>
+                </replace>
+                <replace dir="src/main/webapp">
+                  <include name="**/*.text"/>
+                  <replacetoken><![CDATA[<]]></replacetoken>
+                  <replacevalue><![CDATA[&lt;]]></replacevalue>
+                </replace>
+                <replace dir="src/main/webapp">
+                  <include name="**/*.text"/>
+                  <replacetoken><![CDATA[>]]></replacetoken>
+                  <replacevalue><![CDATA[&gt;]]></replacevalue>
+                </replace>
+                <replace dir="src/main/webapp">
+                  <include name="**/*.text"/>
+                  <replacetoken><![CDATA[&lt;!--Example:Start--&gt;]]></replacetoken>
+                  <replacevalue><![CDATA[<?xml version="1.0" ?>
+<document>
+]]></replacevalue>
+                </replace>     
+                <replace dir="src/main/webapp">
+                  <include name="**/*.text"/>
+                  <replacetoken><![CDATA[&lt;!--Example:End--&gt;]]></replacetoken>
+                  <replacevalue><![CDATA[</document>]]></replacevalue>
+                </replace>     
+                <!-- Then style the .text files as .html files -->
+                <xslt basedir="src/main/webapp"
+                  destdir="src/main/webapp"
+                  includes="**/*.text"
+                  style="src/util/examples.xsl"/>
+                <!-- Finally delete the temporary text files -->
+                <delete>                   
+                  <fileset dir="src/main/webapp" includes="**/*.text"/>
+                </delete>
+              </tasks>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.