You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@jakarta.apache.org by ba...@apache.org on 2005/02/24 04:41:49 UTC

svn commit: r155154 - jakarta/site/build.xml

Author: bayard
Date: Wed Feb 23 19:41:49 2005
New Revision: 155154

URL: http://svn.apache.org/viewcvs?view=rev&rev=155154
Log:
a working set of 1.4 hacks (on OS X), without the 1.5 version breaking. Fails for non-1.4/1.5 jvms. Will still have the large svn diff problem due to difference in html formatting between xalan and xsltc. 

Modified:
    jakarta/site/build.xml

Modified: jakarta/site/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/site/build.xml?view=diff&r1=155153&r2=155154
==============================================================================
--- jakarta/site/build.xml (original)
+++ jakarta/site/build.xml Wed Feb 23 19:41:49 2005
@@ -12,11 +12,10 @@
          and xdocs/downloads/downloads-cgi.xsl -->
     <property name="docs.downloads.tmp" location="${target.dir}/download-xdocs"/>
 
-  <!-- Requires JDK 1.5 -->
-  
-  <!-- Note: still working on JDK 1.4 compatibility ... differences in Xalan beteween 1.4 and 1.5
-       are getting in the way! -->
-       
+    <condition property="jdk14" value="1.4">
+      <equals arg1="1.4" arg2="${java.specification.version}"/>
+    </condition>
+
   <target name="clean" description="Delete intermediate files.">
     <delete dir="${target.dir}" quiet="yes"/>
   </target>       
@@ -24,11 +23,16 @@
   <target name="docs"
    description="Render HTML Pages via XSLT">
 
-    <!-- quit out if not in 1.5 -->
-    <condition property="target.vm" value="1.5">
-      <equals arg1="1.5" arg2="${java.specification.version}"/>
+    <condition property="target.vm" value="valid">
+      <or>
+        <equals arg1="1.5" arg2="${java.specification.version}"/>
+        <equals arg1="1.4" arg2="${java.specification.version}"/>
+      </or>
     </condition>
-    <fail unless="target.vm" message="Must build with Java 1.5"/>
+    <fail unless="target.vm" message="Must build with Java 1.4/1.5"/>
+
+
+    <antcall target="jdk14-warning"/>
 
     <!-- Create destination directory if necessary -->
     <mkdir     dir="${docs.dest}"/>
@@ -106,6 +110,8 @@
       style="${docs.downloads.src}/download-pages.xsl"/>
     <delete file="${docs.downloads.tmp}/empty.xml"/>
 
+    <!-- JDK 1.4 hack -->
+    <antcall target="jdk14-hack-xml"/>
     
     <echo>*** Convert download xdocs to download pages</echo>
     <style   basedir="${docs.downloads.tmp}"
@@ -122,6 +128,9 @@
     <xslt in="${docs.downloads.src}/downloads.xml" out="${docs.downloads.dest}/empty.xml" style="${docs.downloads.src}/downloads-cgi.xsl" />
     <delete file="${docs.downloads.dest}/empty.xml"/>
 
+    <!-- JDK 1.4 hack -->
+    <antcall target="jdk14-hack-cgi"/>
+  
     <!-- remove xml header from .cgi files -->
     <!-- Couldn't we change the XSL to output text instead? -->
     <replace dir="${docs.downloads.dest}/" value="">
@@ -147,6 +156,31 @@
       </fileset>
     </copy>
 
+  </target>
+
+  <target name="jdk14-hack-xml" if="jdk14">
+      <move todir="${docs.downloads.tmp}">
+        <fileset dir="${docs.downloads.tmp}/target/download-xdocs">
+          <include name="**/*.xml"/>
+        </fileset>
+      </move>
+      <delete dir="${docs.downloads.tmp}/target/download-xdocs"/>
+  </target>
+
+  <target name="jdk14-hack-cgi" if="jdk14">
+      <move todir="${docs.downloads.dest}">
+        <fileset dir="${docs.downloads.dest}/target/download-xdocs">
+          <include name="**/*.cgi"/>
+        </fileset>
+      </move>
+      <delete dir="${docs.downloads.dest}/target/download-xdocs"/>
+  </target>
+
+  <target name="jdk14-warning" if="jdk14">
+      <echo>==== IT IS HIGHLY RECOMMENDED THAT YOU BUILD WITH JDK 1.5 ====</echo>
+      <echo>Building with 1.4 requires magic that hopefully with work, and will change the style of the html, leading to large SVN diffs. </echo>
+      <sleep seconds="5"/>
+      <echo>Continuing anyway...</echo>
   </target>
 
   <target name="javadocs"



---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: site-cvs-help@jakarta.apache.org