incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bbuff...@apache.org
Subject svn commit: r498221 - /incubator/xap/trunk/buildsystem/build.xml
Date Sun, 21 Jan 2007 00:55:21 GMT
Author: bbuffone
Date: Sat Jan 20 16:55:20 2007
New Revision: 498221

URL: http://svn.apache.org/viewvc?view=rev&rev=498221
Log:
cleaned up the build.xml file and added a manufacturing process.

Modified:
    incubator/xap/trunk/buildsystem/build.xml

Modified: incubator/xap/trunk/buildsystem/build.xml
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/buildsystem/build.xml?view=diff&rev=498221&r1=498220&r2=498221
==============================================================================
--- incubator/xap/trunk/buildsystem/build.xml (original)
+++ incubator/xap/trunk/buildsystem/build.xml Sat Jan 20 16:55:20 2007
@@ -1,43 +1,47 @@
-<project name="OpenXap" default="help">
+<project name="Apache Xap - Build System" default="help">
 
-
-    <description>OpenXap project</description>
+	<description>Apache Xap - Build System</description>
     
     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
     <!-- Project specific properties.                                      -->
     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-	<property name="isDebug" value="true" />
-	<property name="jsunitDir" value="./jsunit" />
-	<property name="webappsRoot" value="./staging" />
-  	<property name="dist" value="./dist" />
-	<property name="examplesAppName" value="xap" />
+	<property name="isDebug" value="true"/>
+	<property name="web.application.output.location" value="../.dist/samples" />
+	<property name="web.application.directory.name" value="xap" />
 	<property name="profile" value="xap"/>
-  	<property name="release_dir" value="release"/>	
-			
+  	
+	<property name="codebase.location" value="../codebase"/>	
+	<property name="staging.location" value="../.dist/.temp/.staging"/>	
+	<property name="dist.location" value="../.dist"/>	
+	<property name="unittests.location" value="../unittests"/>	
+	<property name="jsunit.location" value="${unittests.location}/jsunit" />
+	<property name="release.location" value="${dist.location}/.temp/release/dojo"/>	
+	<property name="samples.location" value="../samples/WebContent"/>	
+	<property name="tools.location" value="tools"/>	
+	
     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
     <!-- Import other build files.                                         -->
     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <import file="./jsunit/build.xml" />
-    <import file="./jsunit-server-properties.xml" />
+	<import file="${unittests.location}/jsunit/build.xml" />
+	<import file="${unittests.location}/jsunit-server-properties.xml" />
+	<import file="build-manufacturing.xml" />
 	
     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
     <!-- Overrides of ./jsunit/build.xml                                   -->
     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
     <path id="classpath">
-       <fileset dir="${jsunitDir}/java/lib">
+       <fileset dir="${jsunit.location}/java/lib">
            <include name="*.jar"/>
        </fileset>
-       <fileset dir="${jsunitDir}/java/bin">
+       <fileset dir="${jsunit.location}/java/bin">
            <include name="jsunit.jar"/>
        </fileset>
-       <dirset dir="${jsunitDir}/java/config"/>
+       <dirset dir="${jsunit.location}/java/config"/>
     </path>
 
     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
     <!-- XAP project specific targets                                      -->
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-	
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->	
 	<target name="help" description="Prints help" >
 	<echo>
 Build script help
@@ -49,8 +53,8 @@
 	browser on your machine.
 
 deploy-examples: deploys examples without rebuilding profile
-	usage: ant deploy-examples -DwebappsRoot=[dir] 
-		-DexamplesAppName=[name]
+	usage: ant deploy-examples -Dweb.application.output.location=[dir] 
+		-Dweb.application.directory.name=[name]
 
 examples: rebuilds profile and redeploys examples
 	usage: ant examples
@@ -58,7 +62,7 @@
 build-profile: compresses based on a profile in 
 	buildscripts/profiles to a specified directory
 	usage: ant build-profile -Dprofile=[profile_name] 
-		-Drelease_dir=[dir]
+		-Drelease.location=[dir]
 
 doc: builds JSDoc to doc/xap directory
 
@@ -68,9 +72,7 @@
 	</echo>
 	</target>
 
-
-
-			
+	
 	<!-- Runs all XAP project targets                                      -->
 	<target name="all" description="Runs tests, examples and doc targets." 
 					   depends="tests,examples,doc">
@@ -82,34 +84,47 @@
 	<!-- 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" depends="build-profile, deploy-examples"/>
-    
+	<!-- build.bat examples -Dweb.application.output.location=<dir> -Dweb.application.directory.name=<name>
  -->
+	<target name="examples">
+		<antcall target="build-profile">
+			<param name="profile-name" value="${profile}"/>			
+		</antcall>
+		<antcall target="deploy-examples"></antcall>
+	</target>
+	
+	<target name="profile-examples">
+		<antcall target="jsLex"></antcall>
+		<antcall target="build-profile">
+			<param name="profile-name" value="${profile}.performance"/>			
+		</antcall>
+		<antcall target="deploy-examples"></antcall>
+	</target>
+	
+    <target name="deploy-examples" 
+    	description="Builds examples. Usage: examples -Dweb.application.output.location=[dir]
-Dweb.application.directory.name=[name]">
+    	
+      	<!--<delete dir="${web.application.output.location}/${web.application.directory.name}"/>-->
+    	<mkdir dir="${web.application.output.location}/${web.application.directory.name}"/>
+    	<copy todir="${web.application.output.location}/${web.application.directory.name}"
overwrite="true">
+    		<fileset dir="${samples.location}" includes="*/**" />
+    	</copy>
+
+        <copy file="${dist.location}/lib/xapcore.js" todir="${web.application.output.location}/${web.application.directory.name}"/>
     
-    <target name="deploy-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 file="./dist/xapcore.js" todir="${webappsRoot}/${examplesAppName}"/>
-
-      
-       	<copy todir="${webappsRoot}/${examplesAppName}" overwrite="true">
-        	<fileset dir="." includes="src/**" />
+       	<copy todir="${web.application.output.location}/${web.application.directory.name}"
overwrite="true">
+       		<fileset dir="${codebase.location}" includes="src/**" />
         </copy>
-        <copy todir="${webappsRoot}/${examplesAppName}" overwrite="false">
-        	<fileset dir="." includes="css/**" />
+        <copy todir="${web.application.output.location}/${web.application.directory.name}"
overwrite="false">
+        	<fileset dir="${codebase.location}" includes="css/**" />
         </copy>
     </target>
     
 	<!-- Builds XAP source code jsdoc. -->
     <target name="doc" description="Builds JSDoc">
         <echo message="Building docs"/>
-        <delete dir="doc/xap"/>
-        <exec executable="perl">
+    	<delete dir="${dist.location}/doc/xap"/>
+    	<mkdir dir="${dist.location}/doc/xap"/>
+    	<exec executable="perl">
             <arg value="JSDoc-1.9.9.2/jsdoc.pl" />
             <arg value="-r" />
             <arg value="--package-naming" />
@@ -119,108 +134,74 @@
             <arg value="--logo" />
             <arg value="doc/header_logo.gif" />
             <arg value="--directory" />
-            <arg value="doc/xap" />
-            <arg value="src/xap" />
+    		<arg value="${dist.location}/doc/xap" />
+        	<arg value="${codebase.location}/src/xap" />
         </exec>
     </target>
 	
-	<!-- Builds XAP source code jsdoc. These docs will be used on the XAP website. -->
-	<target name="doc-site" description="Builds JSDoc">
-		<echo message="Building docs"/>
-		<delete dir="doc/xap-site"/>
-		
-		<!-- replace the main.tmpl in the jsdoc.pl to main-site.tmpl -->
-		<replace file="JSDoc-1.9.9.2/jsdoc.pl"
-			token="main.tmpl" value="main-site.tmpl"/>
-		
-		<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-site" />
-			<arg value="src/xap" />
-		</exec>
-		
-		<!-- Change back the  main.tmpl in the jsdoc.pl -->
-		<replace file="JSDoc-1.9.9.2/jsdoc.pl"
-			token="main-site.tmpl" value="main.tmpl"/>
-			
-			
-		<zip destfile="doc/xap-site/site.zip" > 
-			<fileset dir="doc/xap-site/">
-				<include name="xap.Xap.html"/>
-				<include name="xap.application.Application.html"/>
-				<include name="xap.session.ClientSession.html"/>
-				<include name="xap.xml.dom.XapElement.html"/>
-				<include name="xap.xml.dom.Document.html"/>
-				<include name="xap.requestservice.RequestService.html"/>
-				<include name="xap.requestservice.HttpRequest.html"/>
-				<include name="xap.requestservice.NetServiceListener.html"/>
-				<include name="xap.session.ClientEvent.html"/>
-				<include name="xap.session.Container.html"/>
-				<include name="xap.xml.DocumentContainer.html"/>
-				<include name="xap.macro.Macro.html"/>
-				<include name="xap.util.LogFactory.html"/>
-				<include name="xap.util.LogFactory.ConsoleLog.html"/>
-				
-				<!-- -->
-				<include name="overview-summary-Xap.js.html"/>
-				<include name="overview-summary-application_Application.js.html"/>
-				<include name="overview-summary-session_ClientSession.js.html"/>
-				<include name="overview-summary-xml_dom_XapElement.js.html"/>
-				<include name="overview-summary-xml_dom_Document.js.html"/>
-				<include name="overview-summary-xml_requestservice_RequestService.js.html"/>
-				<include name="overview-summary-xml_requestservice_HttpRequest.js.html"/>
-				<include name="overview-summary-xml_requestservice_NetServiceListener.js.html"/>
-				<include name="overview-summary-session_ClientEvent.js.html"/>
-				<include name="overview-summary-session_Container.js.html"/>
-				<include name="overview-summary-xml_DocumentContainer.js.html"/>
-				<include name="overview-summary-macro_Macro.js.html"/>
-				<include name="overview-summary-util_LogFactory.js.html"/>
-				<include name="stylesheet.css"/>
-				
-			</fileset>
-		</zip>
-		
-	</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">
+    	<delete dir="${dist.location}/jsunit/"/>
+    	
+    	<!-- Make the directories to copy the testing stuff into. -->
+    	<!-- This directory will be the root of the application. -->
+    	<mkdir dir="${dist.location}/jsunit/testsrc"/>
+    	<copy todir="${dist.location}/jsunit/testsrc">
+    		<fileset dir="${unittests.location}/testsrc"/>
+    	</copy>
+
+    	<mkdir dir="${dist.location}/jsunit/src"/>
+    	<copy todir="${dist.location}/jsunit/src">
+    		<fileset dir="${codebase.location}/src"/>
+    	</copy>
+
+    	<mkdir dir="${dist.location}/jsunit/jsunit"/>
+    	<copy todir="${dist.location}/jsunit/jsunit">
+    		<fileset dir="${unittests.location}/jsunit">
+    			<include name="app/**"/>
+    			<include name="css/**"/>
+    			<include name="images/**"/>
+    			<include name="testRunner.html"/>
+    			<include name="index.jsp"/>
+    		</fileset>
+    	</copy>
+    	
+		<!-- all log files will end up in this location -->    	
+    	<mkdir dir="${dist.location}/jsunit/logs"/>
+    	
+    	<!-- This call actually makes the test run -->
     	<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"/>
+		<mkdir dir="${tools.location}/dist"/>
+		<javac srcdir="${tools.location}/src" destdir="${tools.location}/dist"/>
     </target>
 	
-	<target name="build-profile" description="Builds a xap profile usage
-	is -Dprofile=PROFILE_NAME ">
+	<target name="build-profile" 
+		description="Builds a xap profile usage is -Dprofile=PROFILE_NAME ">
 		<exec dir="buildscripts" executable="ant.bat">
-      <arg value="-Dprofile=${profile}" />
-      <arg value="-Drelease_dir=../${release_dir}" />
-      <arg value="compress" />
+			<arg value="-Dprofile=${profile-name}" />
+      		<arg value="-Drelease=../${release.location}" />
+      		<arg value="compress" />
   		</exec>
-  		<copy file="${release_dir}/xapcore.js" todir="dist"/>
-  		<copy file="${release_dir}/xapcore.js.uncompressed.js" todir="dist"/>
-  		<copy file="${release_dir}/build.txt" todir="dist"/>
+		<delete dir="${dist.location}/lib"/>
+		<mkdir dir="${dist.location}/lib"/>
+		<copy file="${release.location}/xapcore.js" todir="${dist.location}/lib"/>
+		<copy file="${release.location}/xapcore.js.uncompressed.js" todir="${dist.location}/lib"/>
+		<copy file="${release.location}/build.txt" todir="${dist.location}/lib"/>
+		
+		<delete dir="${dist.location}/.temp"/>
 	</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>
+		<delete dir="compressedSource"/>
+		<java fork="yes" classname="JsCompress" classpath="${tools.location}/dist">
+			<arg value="${tools.location}/lib/custom_rhino.jar"/>
+			<arg value="${codebase}/src"/>
+			<arg value="${codebase}/compressedSource"/>
+		</java>
 	</target>
 	
 </project>



Mime
View raw message