Updated eclipse config to match change in servlet jar.
[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/aaLocal/**" />
45                         <exclude name="edu/internet2/middleware/shibboleth/hs-cmu/**" />
46                         <classpath refid="build.path" />
47                 </javac>
48                 <copy todir="${build}/schemas">
49                         <fileset dir="${src}/schemas"/>
50                 </copy>
51         </target>
52
53
54
55         <!-- Create various product distributions and move them to ${dist} -->
56         <target name="dist" depends="dist-all" />
57         <target name="dist-all" depends="compile-all, test-all, package-all, clean-build" />
58         <target name="package-all">
59                 <war warfile="${dist}/${distname}.war" webxml="${approot}/WEB-INF/web.xml" basedir="${approot}" update="no" />
60         </target>
61
62         <target name="dist-origin" depends="compile-all, test-origin, package-origin, clean-build" />
63         <target name="package-origin">
64                 <war warfile="${dist}/${distname}-origin.war" webxml="${configroot}/origin.xml" basedir="${approot}" update="no" />
65         </target>
66
67         <target name="dist-target" depends="compile-all, test-target, package-target, clean-build" />
68         <target name="package-target">
69                 <war warfile="${dist}/${distname}-target.war" webxml="${configroot}/target.xml" basedir="${approot}" update="no" />
70         </target>
71
72         <target name="dist-target-includeswayf" depends="compile-all, test-target, test-wayf, package-target-includeswayf, clean-build" />
73         <target name="package-target-includeswayf">
74                 <war warfile="${dist}/${distname}-target.war" webxml="${configroot}/target-includeswayf.xml" basedir="${approot}" update="no" />
75         </target>
76
77         <target name="dist-wayf" depends="compile-all, test-wayf, package-wayf, clean-build" />
78         <target name="package-wayf">
79                 <war warfile="${dist}/${distname}-wayf.war" webxml="${configroot}/wayf.xml" basedir="${approot}" update="no" />
80         </target>
81
82
83         <!-- Cleanup after the build, test, and distribution processes -->
84         <target name="clean" depends="clean-all" />
85         <target name="clean-all" depends="clean-build, clean-dist, clean-test" />
86         <target name="clean-build">
87                 <delete dir="${build}" />
88         </target>
89         <target name="clean-test">
90                 <delete>
91                         <fileset dir="${root}">
92                                 <include name="**/TEST*.txt" />
93                         </fileset>
94                 </delete>
95         </target>
96         <target name="clean-dist">
97                 <delete dir="${dist}" />
98         </target>
99
100         
101         <!-- Run automated tests on compiled code -->
102         <target name="test-all" depends="test-origin, test-target, test-wayf" />
103         <target name="test-origin" depends="test-common" />
104         <target name="test-target" depends="test-common" />
105         <target name="test-wayf" depends="test-common" />
106         <target name="test-common" depends="compile-all">
107                 <junit printsummary="no" fork="no" haltonfailure="yes" haltonerror="no">
108                         <classpath refid="build.path" />
109                         <formatter type="plain" />
110                 <!--    <test name="edu.internet2.middleware.shibboleth.common.AQHTest" /> -->
111                 </junit>
112         </target>
113
114 </project>
115