Scarab commit: svn commit: r10511 - trunk/maven.xml

[email protected]
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: ronvoe122
Date: 2007-12-18 15:13:59-0800
New Revision: 10511

Modified:
   trunk/maven.xml

Log:
The maven goals 'xdoc' and 'scarab:update-properties' are now working with jdk1.5.

Modified: trunk/maven.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/maven.xml?view=diff&rev=10511&p1=trunk/maven.xml&p2=trunk/maven.xml&r1=10510&r2=10511
==============================================================================
--- trunk/maven.xml	(original)
+++ trunk/maven.xml	2007-12-18 15:13:59-0800
@@ -89,7 +89,13 @@
         <ant:copy file="tomcat/webapps/scarab.allinone.xml.off" 
             tofile="target/dist/tomcat/webapps/scarab.xml"/>
     </goal>
-    
+
+    <goal name="set-xml-transformer">
+        <j:if test="${java.version>='1.5'}">
+          ${systemScope.setProperty('javax.xml.transform.TransformerFactory','com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl')}
+        </j:if>
+     </goal>
+
     <!-- ======================================================== -->
     <!-- P R O P E R T Y  -  M A I N T E N A N C E                -->
     <!-- ======================================================== -->
@@ -106,14 +112,12 @@
     <!--                                                          -->
     <!--     Maven scarab:update-properties                       -->
     <!--                                                          -->
-    <!-- FIXME  This goal is broken under java 1.5                -->
-    <!-- ======================================================== -->        
+    <!-- ======================================================== -->
     <goal
         name="scarab:update-properties"
-        description="update the scarab project.properties">
- 
-        ${systemScope.setProperty('javax.xml.transform.TransformerFactory','org.apache.xalan.processor.TransformerFactoryImpl')}
- 
+        description="update the scarab project.properties"
+        prereqs="set-xml-transformer">
+
         <ant:style  
              in="xdocs/scarab_properties.xml"
              out="project.properties"
@@ -265,23 +269,12 @@
           dir="${root.dir}/build">
         </ant:ant>
     </postGoal>
-   
-    
+
     <postGoal name="xdoc:init"> 
-  
+        <attainGoal name="set-xml-transformer"/>
         <j:set var="genDocs" value="${maven.gen.docs}"/> 
-        ${systemScope.setProperty('javax.xml.transform.TransformerFactory','org.apache.xalan.processor.TransformerFactoryImpl')} 
         <ant:style basedir="xdocs/" destdir="${genDocs}" extension=".xml" 
         style="xdocs/properties.xsl" includes="**/scarab_properties.xml" /> 
-        
-        <!-- This little shuffling of files seems to be required to get the 
-         text to actually be in the correct encoding so that the xdoc
-         goal will process it!  
-        --> 
-
-        <ant:copy file="${genDocs}/scarab_properties.xml" 
-        toFile="${genDocs}/scarab_properties_final.xml" overwrite="true"/> 
-
     </postGoal>
       
     <!-- ===================================================== -->
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.