You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by jm...@apache.org on 2006/06/22 20:16:24 UTC

svn commit: r416458 - /incubator/xap/trunk/build.xml

Author: jmargaris
Date: Thu Jun 22 13:16:24 2006
New Revision: 416458

URL: http://svn.apache.org/viewvc?rev=416458&view=rev
Log:
test thing

Added:
    incubator/xap/trunk/build.xml

Added: incubator/xap/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/build.xml?rev=416458&view=auto
==============================================================================
--- incubator/xap/trunk/build.xml (added)
+++ incubator/xap/trunk/build.xml Thu Jun 22 13:16:24 2006
@@ -0,0 +1,118 @@
+<project name="OpenXap" default="help">
+
+    <description>OpenXap project</description>
+    
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+    <!-- Project specific properties.                                      -->
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+    <property name="isDebug" value="true" />
+    <property name="jsunitDir" value="./jsunit" />
+	<property name="webappsRoot" value="../deployment/dist/webapps" />
+	<property name="examplesAppName" value="xap" />
+			
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+    <!-- Import other build files.                                         -->
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+    <import file="./jsunit/build.xml" />
+    <import file="./jsunit-server-properties.xml" />
+	
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+    <!-- Overrides of ./jsunit/build.xml                                   -->
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+    <path id="classpath">
+       <fileset dir="${jsunitDir}/java/lib">
+           <include name="*.jar"/>
+       </fileset>
+       <fileset dir="${jsunitDir}/java/bin">
+           <include name="jsunit.jar"/>
+       </fileset>
+       <dirset dir="${jsunitDir}/java/config"/>
+    </path>
+
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+    <!-- XAP project specific targets                                      -->
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+	
+	
+	<target name="help" description="Prints help" >
+<echo>Build script help
+This build script requires jdk1.5 for JSUnit
+Available targets:
+   tests : runs JSUnit tests. You will need to modify 
+           jsunit-server-properties.xml to point to a browser on your machine.
+   examples : builds example apps. 
+           Usage: examples and demos -DwebappsRoot=[dir] -DexamplesAppName=[name]
+   doc : builds JSDoc to doc/xap directory
+   all : runs tests, examples and doc
+   help : prints this message
+   </echo>
+	</target>
+			
+	<!-- Runs all XAP project targets                                      -->
+	<target name="all" description="Runs tests, examples and doc targets." 
+					   depends="tests,examples,doc">
+    </target>
+	
+	<!-- This target builds XAP examples app. The default dist location is -->
+	<!-- ./staging and the webapp context is xap (appname).                -->
+	<!-- So, by default if you run 'build.bat examples' a xap folder will  -->
+	<!-- be created under ./staging that you can copy to your deployment   -->
+	<!-- area (i.e. webapps folder under tomcat).                          -->
+	<!-- To specify custom dist location and appname, use the following:   -->
+	<!-- build.bat examples -DwebappsRoot=<dir> -DexamplesAppName=<name>   -->
+	<target name="examples" description="Builds examples. Usage: examples -DwebappsRoot=[dir]
+		-DexamplesAppName=[name]">
+        <delete dir="${webappsRoot}/${examplesAppName}"/>
+    	<mkdir dir="${webappsRoot}/${examplesAppName}"/>
+    	<copy todir="${webappsRoot}/${examplesAppName}" overwrite="true">
+    		<fileset dir="./WebContent" includes="*/**" />
+    	</copy>
+       	<copy todir="${webappsRoot}/${examplesAppName}" overwrite="true">
+        	<fileset dir="." includes="src/**" />
+        </copy>
+        <copy todir="${webappsRoot}/${examplesAppName}" overwrite="false">
+        	<fileset dir="." includes="css/**" />
+        </copy>
+    </target>
+    
+	<!-- Builds XAP source code jsdoc. Currently does not include Zimbra docs -->
+    <target name="doc" description="Builds JSDoc">
+        <echo message="Building docs"/>
+        <delete dir="doc/xap"/>
+        <exec executable="perl">
+            <arg value="JSDoc-1.9.9.2/jsdoc.pl" />
+            <arg value="-r" />
+            <arg value="--package-naming" />
+            <arg value="--no-lexical-privates" />
+            <arg value="--project-name" />
+            <arg value="XAP source" />
+            <arg value="--logo" />
+            <arg value="doc/header_logo.gif" />
+            <arg value="--directory" />
+            <arg value="doc/xap" />
+            <arg value="src/xap" />
+        </exec>
+    </target>
+	
+	<!-- Runs all JSUnit tests. The standalone_test is defined in the imported -->
+	<!-- ./jsunit/build.xml that came with jsunit.                             -->
+    <target name="tests" description="Runs JSUnit tests">
+    	<antcall target="standalone_test"></antcall>
+    </target>
+
+	<target name="compile-tools" description="Compiles various tools">
+		<mkdir dir="tools/dist"/>
+		<javac srcdir="tools/src" destdir="tools/dist"/>
+    </target>
+	
+	<target name="compress-source" description="Compresses javascript source"> 
+			<delete dir="compressedSource"/>
+			<java fork="yes" classname="JsCompress" classpath="tools/dist">
+				<arg value="tools/lib/custom_rhino.jar"/>
+				<arg value="src"/>
+				<arg value="compressedSource"/>
+			</java>
+	</target>
+	
+</project>
\ No newline at end of file