*** empty log message ***
[java-idp.git] / build.xml
1 <!-- Main build configutaion for Shibboleth java components - Walter Hoehn 06/04/2002 -->
2
3 <project 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}/source" />
9         <property name="approot" value="${root}/webApplication" />
10         <property name="build" value="${approot}/WEB-INF/classes" />
11         <property name="libdir" value="${approot}/WEB-INF/lib" />
12         <property name="buildlibs" value="${root}/buildlibs" />
13         <property name="dist" value="${root}/dist" />
14
15
16         <!-- Construct the CLASSPATH -->
17         <path id="build.path">
18                 <pathelement path="${classpath}" />
19                 <pathelement location="${build}" />
20                 <fileset dir="${libdir}">
21                         <include name="**/*.jar" />
22                 </fileset>
23                 <fileset dir="${buildlibs}">
24                         <include name="**/*.jar" />
25                 </fileset>
26         </path>
27
28
29         <!-- Prepare directory structure for project build-->
30         <target name="init">
31         <mkdir dir="${build}" />
32         <mkdir dir="${dist}" />
33         </target>
34
35
36         <!-- Compile classes and move them to ${build} -->
37         <target name="compile-all" depends="init">
38                 <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on">
39                         <classpath refid="build.path" />
40                 </javac>
41         </target>
42
43
44         <!-- Create various product distributions and move them to ${dist} -->
45         <target name="dist-all" depends="compile-all, package, clean-build" />
46         <target name="dist-origin" depends="compile-all, package, clean-build" />
47         <target name="dist-target" depends="compile-all, package, clean-build" />
48         <target name="dist-wayf" depends="compile-all, package, clean-build" />
49         <target name="package">
50                 <war warfile="${dist}/${distname}.war" webxml="${approot}/WEB-INF/web.xml" basedir="${approot}" update="no" />
51         </target>
52
53
54         <!-- Cleanup after the build, test, and distribution processes -->
55         <target name="clean-all" depends="clean-build, clean-dist, clean-test" />
56         <target name="clean-build">
57                 <delete dir="${build}" />
58         </target>
59         <target name="clean-test">
60                 <delete>
61                         <fileset dir="${root}">
62                                 <include name="**/TEST*.txt" />
63                         </fileset>
64                 </delete>
65         </target>
66         <target name="clean-dist">
67                 <delete dir="${dist}" />
68         </target>
69
70         
71         <!-- Run automated tests on compiled code -->
72         <target name="test-all" depends="test-common" />
73         <target name="test-common" depends="compile-all">
74                 <junit printsummary="no" fork="no" haltonfailure="yes" haltonerror="no">
75                         <classpath refid="build.path" />
76                         <formatter type="plain" />
77                         <test name="edu.internet2.middleware.shibboleth.common.AQHTest" />
78                 </junit>
79         </target>
80
81 </project>
82