(no commit message)
authorErik Brakkee <erik@brakkee.org>
Mon, 24 Apr 2006 20:26:18 +0000 (20:26 +0000)
committerErik Brakkee <erik@brakkee.org>
Mon, 24 Apr 2006 20:26:18 +0000 (20:26 +0000)
build/header.xml
build/trailer.xml

index 9fac8d996385a4d193dde646d0bd29e82fdc137d..8d03063e4eeb714e5ef8ebf317bb048e14de6633 100644 (file)
   </antcall>
 </target>
 
+<target name="servletapi.d">
+  <antcall target="download.dep">
+    <param name="group" value="servletapi"/>
+    <param name="version" value="2.4"/>
+  </antcall>
+</target>
+
+<target name="quartz.d">
+  <antcall target="download.dep">
+    <param name="group" value="quartz"/>
+    <param name="version" value="1.5.1"/>
+  </antcall>
+</target>
 
 
 
   </copy>
 </target>
 
-<property name="crawler.dist.dir" value="${lib.dir}/wamblee/crawler/basic"/>
-<target name="wamblee.crawler.d">
-  <copy todir="${download.dir}">
-    <fileset dir="${crawler.dist.dir}">
-      <include name="wamblee-crawler-basic.jar"/>
-    </fileset>
-  </copy>
-</target>
-<target name="wamblee.crawler.test.d">
-  <copy todir="${download.dir}">
-    <fileset dir="${crawler.dist.dir}">
-      <include name="wamblee-crawler-basic-test.jar"/>
-    </fileset>
-  </copy>
-</target>
 
 <target name="junit.d">
   <antcall target="download.dep">
 
 
  <target name="import_header" unless="build_header_included">
+    <property name="ant.lib.dir" value="${build.dir}/lib/ant"/>
+    <property name="test.lib.dir" value="lib/test"/>
+    <property name="special.lib.dir" value="${build.dir}/lib/special"/>
+       <property name="ant.downloaded.lib.dir" value="${build.dir}/lib/ant/downloaded"/>
+
+       
+    <!-- ========================================================================================
+         Ant task defs
+         ======================================================================================== -->
+    <!-- ant-contrib integration --> 
+    <property name="ant.contrib.home" value="${ant.lib.dir}/ant-contrib-1.0b2"/>
+    <taskdef resource="net/sf/antcontrib/antlib.xml">
+      <classpath>
+        <pathelement location="${ant.contrib.home}/ant-contrib.jar" />
+      </classpath>
+    </taskdef>
+    
+    <!-- taskdef for ant-dependencies task --> 
+    <taskdef name="dependencies" classpath="${ant.lib.dir}/ant-dependencies.jar" 
+      classname="org.apache.tools.ant.taskdefs.optional.dependencies.Dependencies"/>
+  
+    <!-- Emma integration --> 
+    <path id="emma.lib">
+      <fileset dir="${test.lib.dir}" includes="emma*.jar"/>
+    </path>
+    <taskdef resource="emma_ant.properties" classpathref="emma.lib" />
+    <property name="emma.enabled" value="false"/>
+    
+    <!-- checkstyle -->
+    <property name="checkstyle.home" value="${ant.downloaded.lib.dir}"/>
+    <taskdef resource="checkstyletask.properties">
+      <classpath>
+        <fileset dir="${checkstyle.home}">
+         <include name="*.jar"/>
+       </fileset>
+      </classpath>
+    </taskdef>
+    <property name="checkstyle.rules" value="style.xml"/>
+    <property name="checkstyle.test.rules" value="test-style.xml"/>
+    
+             
+    <!-- jalopy -->
+    <!-- TMP download this dependence as well 
+    <property name="jalopy.home" value="${lib.dir}/jalopy-ant-0.6.2"/>
+    <property name="jalopy.rules" value="${build.dir}/formatting-rules.xml"/>
+    <taskdef name="jalopy"
+         classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
+      <classpath>
+        <fileset dir="${jalopy.home}">
+          <include name="*.jar" />
+        </fileset>
+      </classpath>
+    </taskdef>
+    -->
+  
+    <!-- simian integration -->
+    <!-- TMP download this dependence as well 
+    <property name="simian.home" value="${lib.dir}/simian"/>
+    <taskdef resource="simiantask.properties" classpath="${simian.home}/simian.jar"/>
+    --> 
+    
+    <!-- macker integration -->
+    <!-- TMP download this dependence as well 
+    <property name="macker.home" value="${lib.dir}/macker-0.4.2"/>
+    <path id="macker.path">
+         <fileset dir="${macker.home}">
+           <include name="**/*.jar"/>
+         </fileset>
+    </path>
+    <taskdef name="macker"
+      classname="net.innig.macker.ant.MackerAntTask"
+      classpathref="macker.path"/>
+
+    --> 
     
     <!-- ========================================================================================
          Locate user properties to (optionally) override defaults
             in case the source is in a subdirectory and not necessarily
             in the top-level directory --> 
    
-    <property name="ant.lib.dir" value="${build.dir}/lib/ant"/>
-    <property name="ant.downloaded.lib.dir" value="${build.dir}/lib/ant/downloaded"/>
-    <property name="external.lib.dir" value="lib/external"/>
-    <property name="test.lib.dir" value="lib/test"/>
-    <property name="special.lib.dir" value="${build.dir}/lib/special"/>
+  
+       <if>
+         <isset property="webroot.dir"/>
+         <then>
+           <property name="external.lib.dir" value="${webroot.dir}/WEB-INF/lib"/>
+         </then>
+         <else>
+           <property name="external.lib.dir" value="lib/external"/>
+         </else>
+       </if>
+   
     <property name="build.properties.dir" value="${project.home}" />
     <property name="build.properties.name" value="build.properties" />
     
          ======================================================================================== -->
     <property name="database" value="Derby"/>
     
-    <!-- ========================================================================================
-         Ant task defs
-         ======================================================================================== -->
-    <!-- ant-contrib integration --> 
-    <property name="ant.contrib.home" value="${ant.lib.dir}/ant-contrib-1.0b2"/>
-    <taskdef resource="net/sf/antcontrib/antlib.xml">
-      <classpath>
-        <pathelement location="${ant.contrib.home}/ant-contrib.jar" />
-      </classpath>
-    </taskdef>
-    
-    <!-- taskdef for ant-dependencies task --> 
-    <taskdef name="dependencies" classpath="${ant.lib.dir}/ant-dependencies.jar" 
-      classname="org.apache.tools.ant.taskdefs.optional.dependencies.Dependencies"/>
   
-    <!-- Emma integration --> 
-    <path id="emma.lib">
-      <fileset dir="${test.lib.dir}" includes="emma*.jar"/>
-    </path>
-    <taskdef resource="emma_ant.properties" classpathref="emma.lib" />
-    <property name="emma.enabled" value="false"/>
-    
-    <!-- checkstyle -->
-    <property name="checkstyle.home" value="${ant.downloaded.lib.dir}"/>
-    <taskdef resource="checkstyletask.properties">
-      <classpath>
-        <fileset dir="${checkstyle.home}">
-         <include name="*.jar"/>
-       </fileset>
-      </classpath>
-    </taskdef>
-    <property name="checkstyle.rules" value="style.xml"/>
-    <property name="checkstyle.test.rules" value="test-style.xml"/>
-    
-             
-    <!-- jalopy -->
-    <!-- TMP download this dependence as well 
-    <property name="jalopy.home" value="${lib.dir}/jalopy-ant-0.6.2"/>
-    <property name="jalopy.rules" value="${build.dir}/formatting-rules.xml"/>
-    <taskdef name="jalopy"
-         classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
-      <classpath>
-        <fileset dir="${jalopy.home}">
-          <include name="*.jar" />
-        </fileset>
-      </classpath>
-    </taskdef>
-    -->
-  
-    <!-- simian integration -->
-    <!-- TMP download this dependence as well 
-    <property name="simian.home" value="${lib.dir}/simian"/>
-    <taskdef resource="simiantask.properties" classpath="${simian.home}/simian.jar"/>
-    --> 
-    
-    <!-- macker integration -->
-    <!-- TMP download this dependence as well 
-    <property name="macker.home" value="${lib.dir}/macker-0.4.2"/>
-    <path id="macker.path">
-         <fileset dir="${macker.home}">
-           <include name="**/*.jar"/>
-         </fileset>
-    </path>
-    <taskdef name="macker"
-      classname="net.innig.macker.ant.MackerAntTask"
-      classpathref="macker.path"/>
-
-    --> 
    
     <!-- ========================================================================================
          Information
                value="${build.dir}/${module.reldir}" / -->
     <property name="module.build.dir" value="build"/>
        <property name="module.api.forrest.dir" value="${forrest.build.site.dir}/api/${module.name}" />
-       <property name="module.classes.dir" value="${module.build.dir}/bin" />
+       <if>
+         <isset property="webroot.dir"/>
+         <then>
+           <property name="module.classes.dir" value="${webroot.dir}/WEB-INF/classes" />
+         </then>
+         <else>
+           <property name="module.classes.dir" value="${module.build.dir}/bin" />
+         </else>
+       </if>
+       
        <property name="module.testclasses.dir" value="${module.build.dir}/testbin" />
        <!-- Directory where generated SQL will be put by the schema export-->
        <property name="module.sql.dir" value="${module.build.dir}/sql" />
       checkstyle:    Checks the style of the code. 
       format:        Formats to the code in accordance with the checkstyle rules.
       simian:        Analyse similarities in the code.
+         
+         Building a web application: 
+         
+         To build a web application archive (WAR) you must set the property
+         webroot.dir to the value of the directory which is the root of your
+         web application. This must be done before the header.xl is 
+         sourced. The build support will then make sure that 
+         classes and libs are put in the correct directories below 
+         ${webroot.dir}/WEB-INF, and it will build a web archive. 
       
       Database targets:  ** database targets are not functional yet **
       
index 92896545fb82328a3288a7b945aa4256cfa9811c..d210ff5ca3be533c87b7e58407231f383fc1f76b 100644 (file)
                        <include name="**/*.pdf" />
                </fileset>
        </copy>
+       <if>
+         <isset property="webroot.dir"/>
+         <then>
+           <jar destfile="${module.dist.dir}/${module.name}.war"
+                    basedir="${webroot.dir}"/>
+         </then>
+       </if>
 </target>
 
 <target name="dist-lite-test" depends="deps,testclasses">