1 <!-- Main build configutaion for Shibboleth java components - Walter Hoehn 06/04/2002 -->
3 <project name="Shibboleth" default="dist-all" basedir=".">
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" />
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" />
24 <fileset dir="${buildlibs}">
25 <include name="**/*.jar" />
30 <!-- Prepare directory structure for project build-->
32 <mkdir dir="${build}" />
33 <mkdir dir="${dist}" />
37 <!-- This target should be run before checking code into the repository -->
38 <target name="pre-checkin" depends="compile-all, test-all, clean-all" />
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" />
48 <copy todir="${build}/schemas">
49 <fileset dir="${src}/schemas"/>
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" />
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" />
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" />
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" />
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" />
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}" />
89 <target name="clean-test">
91 <fileset dir="${root}">
92 <include name="**/TEST*.txt" />
96 <target name="clean-dist">
97 <delete dir="${dist}" />
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" /> -->