commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r386460 - /jakarta/commons/proper/validator/trunk/build.xml
Date Thu, 16 Mar 2006 21:23:34 GMT
Author: niallp
Date: Thu Mar 16 13:23:28 2006
New Revision: 386460

URL: http://svn.apache.org/viewcvs?rev=386460&view=rev
Log:
Add compressed javascript to ant build

Modified:
    jakarta/commons/proper/validator/trunk/build.xml

Modified: jakarta/commons/proper/validator/trunk/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/build.xml?rev=386460&r1=386459&r2=386460&view=diff
==============================================================================
--- jakarta/commons/proper/validator/trunk/build.xml (original)
+++ jakarta/commons/proper/validator/trunk/build.xml Thu Mar 16 13:23:28 2006
@@ -294,6 +294,15 @@
   <target name="dist" depends="compile,javadoc"
    description="Create binary distribution">
     <mkdir      dir="${dist.home}"/>
+
+    <!-- Create Single file of static JavaScript -->
+    <concat destfile="${dist.home}/commons-${component.name}-${component.version}.js">
+      <fileset dir="${javascript.home}/org/apache/commons/validator/javascript" includes="*.js"/>
+    </concat>
+
+    <!-- Create compressed javascript versions -->
+    <antcall target="compress.javascript"/> 
+
     <copy      file="LICENSE.txt"
               todir="${dist.home}"/>
     <copy      file="NOTICE.txt"
@@ -305,11 +314,68 @@
              tofile="${build.home}/classes/META-INF/LICENSE.txt"/>
     <copy      file="NOTICE.txt"
              tofile="${build.home}/classes/META-INF/NOTICE.txt"/>
-    <jar    jarfile="${dist.home}/commons-${component.name}.jar"
+    <jar    jarfile="${dist.home}/commons-${component.name}-${component.version}.jar"
             basedir="${build.home}/classes"
            manifest="${build.home}/conf/MANIFEST.MF"/>
   </target>
 
+  <target name="compress.javascript" if="dojo_custom_rhino.jar">
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${dist.home}/commons-${component.name}-${component.version}"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateByte"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateCreditCard"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateDate"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateEmail"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateFloat"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateFloatRange"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateInteger"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateIntRange"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateMask"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateMaxLength"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateMinLength"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateRequired"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateShort"/>

+    </antcall>
+    <antcall target="dojo.compress"> 
+        <param name="jsfilename" value="${build.home}/classes/org/apache/commons/validator/javascript/validateUtilities"/>

+    </antcall>
+
+  </target>
+
+  <target name="dojo.compress">
+
+    <java jar="${dojo_custom_rhino.jar}" fork="true"
+              output="${jsfilename}-compress.js">
+        <arg value="-c"/> 
+        <arg value="${jsfilename}.js"/> 
+    </java>
+  </target>
 
 <!-- ========== Unit Test Targets ========================================= -->
 



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


Mime
View raw message