adding all of botlist, initial add
[botlist.git] / openbotlist / tests / unit / build.xml
blob30ea0bd27e0c0e54f468acfd78686bd6af498430
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Copyright (c) 2006 - Berlin Brown -->
3 <project name="Botlist Test Framework (Unit Tests)" default="scala.compile.tests" basedir=".">\r
4         
5         <property file="build.properties" />    
6         <property name="home.base.dir" value="${basedir}/../.." />\r
7         \r
8         <!-- **************************************** -->\r
9         <!-- Set distinct property names -->    \r
10         <!-- **************************************** -->
11         <property name="build.dir"          value="${basedir}/build"/>
12         <property name="build.classes.dir"      value="${basedir}/build/classes"/>
13         <property name="home.build.classes.dir" value="${home.base.dir}/build/classes"/>        
14         <property name="scala.test_src.dir" value="${basedir}/scalacheck" />    \r
15         
16         <property name="loadtest.dir"           value="${home.base.dir}/tests/system/loadhttptest" />
17         <property name="loadtest.src.dir"       value="${loadtest.dir}/src" />
18         \r
19         <!-- **************************************** -->\r
20         <!-- Include the classpath property settings (jar path locations) from the main project HOME top directory -->\r
21         <!-- **************************************** -->\r
22         <property name="lib.dir"                value="${home.base.dir}/WEB-INF/lib" />\r
23         <property name="lib.runtime.dir"    value="${home.base.dir}/runtime-lib" />\r
24         <property name="lib.servlet.dir"    value="${home.base.dir}/servlet-lib"/>
25         <property file="${home.base.dir}/build_classpath.properties" />
26                       
27         <!-- **************************************** -->
28         <!-- Target: CLASSPATH -->
29         <!-- **************************************** -->
30         <!-- Import the classpath usage and variable names -->
31         <import file="${home.base.dir}/build_classpath_paths.xml" />
32         
33         <path id="classpath.tests">             
34                 <!-- Include the CLASSES directory -->
35                 <pathelement location="${build.classes.dir}" />
36                 <pathelement location="${home.build.classes.dir}" />
37         </path>
38         
39         <path id="classpath.scala">
40                 <pathelement location="${hibernate.jar}"/>
41                 <pathelement location="${jta.jar}" />
42                 <pathelement location="${spring.jar}" />
43                 <pathelement location="${logging.jar}" />
44         <pathelement location="${scala.jar}" />
45         <pathelement location="${scala-compiler.jar}" />
46         <pathelement location="${lift.jar}" />
47                 <pathelement location="${scalacheck.jar}" />
48                 <pathelement location="${servlet.jar}" />
49         <pathelement location="${jsp-api.jar}" />\r
50                 
51                 <pathelement location="${build.classes.dir}" />
52                 <pathelement location="${home.build.classes.dir}" />
53         </path>\r
54         
55         <target name="init" description="Initialization">
56                 <tstamp/>
57                 <fail unless="classpath.include">Error loading build_classpath.property file.  Make sure it exists.</fail>
58 <echo>
59  Valid test tasks:
60  compile - Compile the botlist project, from the HOME directory.\r
61  scala.compile.tests - Compile the scala check test suite.\r
62  unit.scala.tests - Run the unit test task.
63 </echo>
64         </target>
65         \r
66         <!-- **************************************** -->\r
67         <!-- Main Task Targets -->\r
68         <!-- **************************************** -->\r
69         
70         <!-- Target: Prepare -->
71         <target name="prepare" depends="init">
72                 <mkdir dir="${build.dir}"/>
73                 <mkdir dir="${build.classes.dir}"/>
74         </target>
75         \r
76         <!-- **************************************** -->\r
77         <!-- Build the core botlist/HOME project including the beans and other POJOS -->\r
78         <!-- Use the ant 'ant' task to launch botlist build.xml file -->\r
79         <!-- **************************************** -->\r
80         <target name="compile" depends="prepare">\r
81                 <ant antfile="${home.base.dir}/build.xml" target="compile" \r
82                                 inheritAll="false" dir="${home.base.dir}" />
83                 <javac deprecation="false"              
84                                 debug="true"
85                                 srcdir="${loadtest.src.dir}"
86                                 destdir="${build.classes.dir}"
87                                 target="1.5"
88                                 includes="**/*.java">
89                         <classpath refid="classpath"/>
90                 </javac>\r
91         </target>\r
92         
93         <!-- **************************************** -->
94         <!-- Add support for scala compiles, used with liftweb apps -->
95         <!-- Date Created: 12/29/2007 -->
96         <!-- **************************************** -->
97         <taskdef resource="scala/tools/ant/antlib.xml">
98               <classpath refid="classpath.scala" />
99         </taskdef>
101         <!-- Import the test case target partial build file --> 
102         <import file="${basedir}/build_scala_tests.xml" />      
104         <!-- Main Clean -->
105         <target name="clean">
106                 <delete dir="${build.dir}" />                   
107         </target>
109 </project>
110 <!-- End of the File -->