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="distlibs" value="${root}/lib" />
15 <property name="dist" value="${root}/dist" />
16 <property name="docs" value="${root}/docs" />
17 <property name="javadocs" value="${docs}/api" />
19 <property name="year" value="2002"/>
20 <property name="copyright" value="Copyright © ${year} UCAID. All Rights Reserved."/>
23 <!-- Construct the CLASSPATH -->
24 <path id="build.path">
25 <pathelement path="${classpath}" />
26 <pathelement location="${build}" />
27 <fileset dir="${libdir}">
28 <include name="**/*.jar" />
30 <fileset dir="${buildlibs}">
31 <include name="**/*.jar" />
36 <!-- Prepare directory structure for project build-->
38 <mkdir dir="${build}" />
39 <mkdir dir="${dist}" />
43 <!-- This target should be run before checking code into the repository -->
44 <target name="pre-checkin" depends="compile-all, test-all, clean-all" />
47 <!-- Compile classes and move them to ${build} -->
48 <target name="compile-all" depends="init">
49 <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on">
50 <classpath refid="build.path" />
52 <copy todir="${build}/schemas">
53 <fileset dir="${src}/schemas"/>
58 <!-- Generate API docs -->
59 <target name="javadocs">
60 <mkdir dir="${docs}" />
61 <mkdir dir="${javadocs}" />
62 <javadoc packagenames='edu.internet2.middleware.*'
63 sourcepath='${src}' destdir='${javadocs}'
64 author='true' version='true'
65 windowtitle='Shibboleth Java API' doctitle='Shibboleth Java API'
66 bottom='${copyright}'>
67 <classpath refid="build.path" />
71 <!-- Create various product distributions and move them to ${dist} -->
72 <target name="dist" depends="dist-all" />
73 <target name="dist-all" depends="compile-all, test-all, package-all, clean-build" />
74 <target name="package-all">
75 <war warfile="${dist}/${distname}.war" webxml="${configroot}/all.xml" basedir="${approot}" update="no" />
78 <target name="dist-origin" depends="compile-all, test-origin, package-origin, clean-build" />
79 <target name="package-origin">
80 <war warfile="${dist}/${distname}.war" webxml="${configroot}/origin.xml" basedir="${approot}" update="no" />
83 <!-- Build utilities -->
84 <target name="build-util" depends="compile-all">
85 <jar jarfile="${distlibs}/shib-util.jar" basedir="${build}" />
88 <target name="dist-wayf" depends="compile-all, test-wayf, package-wayf, clean-build" />
89 <target name="package-wayf">
90 <war warfile="${dist}/${distname}-wayf.war" webxml="${configroot}/wayf.xml" basedir="${approot}" update="no" />
94 <!-- Cleanup after the build, test, and distribution processes -->
95 <target name="clean" depends="clean-all" />
96 <target name="clean-all" depends="clean-build, clean-dist, clean-test, clean-javadocs, clean-util" />
97 <target name="clean-build">
98 <delete dir="${build}" />
100 <target name="clean-test">
102 <fileset dir="${root}">
103 <include name="**/TEST*.txt" />
107 <target name="clean-dist">
108 <delete dir="${dist}" />
110 <target name="clean-javadocs">
111 <delete dir="${javadocs}" />
113 <target name="clean-util">
115 <fileset dir="${buildlibs}">
116 <include name="shib-util.jar" />
122 <!-- Run automated tests on compiled code -->
123 <target name="test-all" depends="test-origin, test-wayf" />
124 <target name="test-origin" depends="test-common" />
125 <target name="test-wayf" depends="test-common" />
126 <target name="test-common" depends="compile-all">
127 <junit printsummary="no" fork="no" haltonfailure="yes" haltonerror="no">
128 <classpath refid="build.path" />
129 <formatter type="plain" />
130 <!-- <test name="edu.internet2.middleware.shibboleth.common.AQHTest" /> -->