Included aaLocal in the build
[java-idp.git] / build.xml
1 <!-- Main build configutaion for Shibboleth java components - Walter Hoehn 06/04/2002 -->
2
3 <project name="Shibboleth" default="dist-all" basedir=".">
4
5         <!-- Set global properties for this build -->
6         <property name="distname" value="shibboleth" />
7         <property name="root" value="." />
8         <property name="src" value="${root}/src" />
9         <property name="approot" value="${root}/webApplication" />
10         <property name="configroot" value="${root}/webAppConfig" />
11         <property name="build" value="${approot}/WEB-INF/classes" />
12         <property name="libdir" value="${approot}/WEB-INF/lib" />
13         <property name="buildlibs" value="${root}/lib" />
14         <property name="dist" value="${root}/dist" />
15
16
17         <!-- Construct the CLASSPATH -->
18         <path id="build.path">
19                 <pathelement path="${classpath}" />
20                 <pathelement location="${build}" />
21                 <fileset dir="${libdir}">
22                         <include name="**/*.jar" />
23                 </fileset>
24                 <fileset dir="${buildlibs}">
25                         <include name="**/*.jar" />
26                 </fileset>
27         </path>
28
29
30         <!-- Prepare directory structure for project build-->
31         <target name="init">
32         <mkdir dir="${build}" />
33         <mkdir dir="${dist}" />
34         </target>
35
36
37         <!-- This target should be run before checking code into the repository -->
38         <target name="pre-checkin" depends="compile-all, test-all, clean-all" />
39
40
41         <!-- Compile classes and move them to ${build} -->
42         <target name="compile-all" depends="init">
43                 <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on">
44                         <exclude name="edu/internet2/middleware/shibboleth/hs-cmu/**" />
45                         <classpath refid="build.path" />
46                 </javac>
47                 <copy todir="${build}/schemas">
48                         <fileset dir="${src}/schemas"/>
49                 </copy>
50         </target>
51
52
53
54         <!-- Create various product distributions and move them to ${dist} -->
55         <target name="dist" depends="dist-all" />
56         <target name="dist-all" depends="compile-all, test-all, package-all, clean-build" />
57         <target name="package-all">
58                 <war warfile="${dist}/${distname}.war" webxml="${approot}/WEB-INF/web.xml" basedir="${approot}" update="no" />
59         </target>
60
61         <target name="dist-origin" depends="compile-all, test-origin, package-origin, clean-build" />
62         <target name="package-origin">
63                 <war warfile="${dist}/${distname}-origin.war" webxml="${configroot}/origin.xml" basedir="${approot}" update="no" />
64         </target>
65
66         <target name="dist-target" depends="compile-all, test-target, package-target, clean-build" />
67         <target name="package-target">
68                 <war warfile="${dist}/${distname}-target.war" webxml="${configroot}/target.xml" basedir="${approot}" update="no" />
69         </target>
70
71         <target name="dist-target-includeswayf" depends="compile-all, test-target, test-wayf, package-target-includeswayf, clean-build" />
72         <target name="package-target-includeswayf">
73                 <war warfile="${dist}/${distname}-target.war" webxml="${configroot}/target-includeswayf.xml" basedir="${approot}" update="no" />
74         </target>
75
76         <target name="dist-wayf" depends="compile-all, test-wayf, package-wayf, clean-build" />
77         <target name="package-wayf">
78                 <war warfile="${dist}/${distname}-wayf.war" webxml="${configroot}/wayf.xml" basedir="${approot}" update="no" />
79         </target>
80
81
82         <!-- Cleanup after the build, test, and distribution processes -->
83         <target name="clean" depends="clean-all" />
84         <target name="clean-all" depends="clean-build, clean-dist, clean-test" />
85         <target name="clean-build">
86                 <delete dir="${build}" />
87         </target>
88         <target name="clean-test">
89                 <delete>
90                         <fileset dir="${root}">
91                                 <include name="**/TEST*.txt" />
92                         </fileset>
93                 </delete>
94         </target>
95         <target name="clean-dist">
96                 <delete dir="${dist}" />
97         </target>
98
99         
100         <!-- Run automated tests on compiled code -->
101         <target name="test-all" depends="test-origin, test-target, test-wayf" />
102         <target name="test-origin" depends="test-common" />
103         <target name="test-target" depends="test-common" />
104         <target name="test-wayf" depends="test-common" />
105         <target name="test-common" depends="compile-all">
106                 <junit printsummary="no" fork="no" haltonfailure="yes" haltonerror="no">
107                         <classpath refid="build.path" />
108                         <formatter type="plain" />
109                 <!--    <test name="edu.internet2.middleware.shibboleth.common.AQHTest" /> -->
110                 </junit>
111         </target>
112
113 </project>
114