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="opensaml" value="${root}/../../../opensaml/java/lib" />
7 <property name="distname" value="shibboleth" />
8 <property name="root" value="." />
9 <property name="src" value="${root}/src" />
10 <property name="bld" value="${root}/build" />
11 <property name="approot" value="${root}/webApplication" />
12 <property name="build" value="${approot}/WEB-INF/classes" />
13 <property name="libdir" value="${approot}/WEB-INF/lib" />
14 <property name="lib" value="${root}/lib" />
15 <property name="dist" value="${root}/dist" />
18 <!-- Construct the CLASSPATH -->
19 <path id="build.path">
20 <pathelement path="${classpath}" />
21 <pathelement location="${build}" />
22 <pathelement location="${bld}" />
23 <fileset dir="${libdir}">
24 <include name="**/*.jar" />
26 <fileset dir="${lib}">
27 <include name="**/*.jar" />
29 <fileset dir="${opensaml}">
30 <include name="opensaml.jar" />
35 <!-- Prepare directory structure for project build-->
37 <mkdir dir="${bld}" />
38 <mkdir dir="${build}" />
39 <mkdir dir="${dist}" />
43 <!-- Compile classes and move them to ${build} -->
44 <target name="compile-all" depends="package-common">
45 <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on">
46 <exclude name="edu/internet2/middleware/shibboleth/aaLocal/**" />
47 <exclude name="edu/internet2/middleware/shibboleth/common/**" />
48 <exclude name="edu/internet2/middleware/eduPerson/**" />
49 <classpath refid="build.path" />
53 <target name="compile-common" depends="init">
54 <javac srcdir="${src}" destdir="${bld}" debug="on">
55 <include name="edu/internet2/middleware/eduPerson/*.java" />
56 <include name="edu/internet2/middleware/shibboleth/common/*.java" />
57 <classpath refid="build.path" />
59 <copy todir="${bld}/schemas">
60 <fileset dir="${src}/schemas"/>
65 <!-- Create various product distributions and move them to ${dist} -->
66 <target name="dist-all" depends="compile-all, package, clean-build" />
67 <target name="dist-origin" depends="compile-all, package, clean-build" />
68 <target name="dist-target" depends="compile-all, package, clean-build" />
69 <target name="dist-wayf" depends="compile-all, package, clean-build" />
71 <target name="dist-common" depends="clean-common, compile-common, package-common" />
73 <target name="package">
74 <war warfile="${dist}/${distname}.war" webxml="${approot}/WEB-INF/web.xml" basedir="${approot}" update="no" />
77 <target name="package-common" depends="compile-common">
78 <jar jarfile="${dist}/${distname}.jar" basedir="${bld}">
79 <include name="schemas/**" />
80 <include name="edu/internet2/middleware/shibboleth/common/**" />
81 <include name="edu/internet2/middleware/eduPerson/**" />
86 <!-- Cleanup after the build, test, and distribution processes -->
87 <target name="clean-all" depends="clean-build, clean-dist, clean-test" />
88 <target name="clean-build">
89 <delete dir="${build}" />
90 <delete dir="${bld}" />
92 <target name="clean-test">
94 <fileset dir="${root}">
95 <include name="**/TEST*.txt" />
99 <target name="clean-dist">
100 <delete dir="${dist}" />
103 <target name="clean-common">
104 <delete dir="${bld}/schemas" />
105 <delete dir="${bld}/edu/internet2/middleware/shibboleth/common" />
106 <delete dir="${bld}/edu/internet2/middleware/eduPerson" />
109 <!-- Run automated tests on compiled code -->
110 <target name="test-all" depends="test-common" />
111 <target name="test-common" depends="compile-all">
112 <junit printsummary="no" fork="no" haltonfailure="yes" haltonerror="no">
113 <classpath refid="build.path" />
114 <formatter type="plain" />
115 <test name="edu.internet2.middleware.shibboleth.common.AQHTest" />