Changed eclipse project name.
[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
6         <!-- Set global properties for this build -->
7         <property name="distname" value="shibboleth" />
8         <property name="root" value="." />
9         <property name="src" value="${root}/source" />
10         <property name="approot" value="${root}/webApplication" />
11         <property name="build" value="${approot}/WEB-INF/classes" />
12         <property name="libdir" value="${approot}/WEB-INF/lib" />
13         <property name="buildlibs" value="${root}/buildlibs" />
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         <!-- Compile classes and move them to ${build} -->
38         <target name="compile-all" depends="init">
39                 <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on">
40                         <classpath refid="build.path" />
41                 </javac>
42         </target>
43
44
45         <!-- Create various product distributions and move them to ${dist} -->
46         <target name="dist-all" depends="compile-all, package, clean-build" />
47         <target name="dist-origin" depends="compile-all, package, clean-build" />
48         <target name="dist-target" depends="compile-all, package, clean-build" />
49         <target name="dist-wayf" depends="compile-all, package, clean-build" />
50         <target name="package">
51                 <war warfile="${dist}/${distname}.war" webxml="${approot}/WEB-INF/web.xml" basedir="${approot}" update="no" />
52         </target>
53
54
55         <!-- Cleanup after the build, test, and distribution processes -->
56         <target name="clean-all" depends="clean-build, clean-dist, clean-test" />
57         <target name="clean-build">
58                 <delete dir="${build}" />
59         </target>
60         <target name="clean-test">
61                 <delete>
62                         <fileset dir="${root}">
63                                 <include name="**/TEST*.txt" />
64                         </fileset>
65                 </delete>
66         </target>
67         <target name="clean-dist">
68                 <delete dir="${dist}" />
69         </target>
70
71         
72         <!-- Run automated tests on compiled code -->
73         <target name="test-all" depends="test-common" />
74         <target name="test-common" depends="compile-all">
75                 <junit printsummary="no" fork="no" haltonfailure="yes" haltonerror="no">
76                         <classpath refid="build.path" />
77                         <formatter type="plain" />
78                         <test name="edu.internet2.middleware.shibboleth.common.AQHTest" />
79                 </junit>
80         </target>
81
82         
83 </project>
84