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" />
15 <property name="docs" value="${root}/docs" />
16 <property name="javadocs" value="${docs}/api" />
18 <property name="year" value="2002"/>
19 <property name="copyright" value="Copyright © ${year} UCAID. All Rights Reserved."/>
22 <!-- Construct the CLASSPATH -->
23 <path id="build.path">
24 <pathelement path="${classpath}" />
25 <pathelement location="${build}" />
26 <fileset dir="${libdir}">
27 <include name="**/*.jar" />
29 <fileset dir="${buildlibs}">
30 <include name="**/*.jar" />
35 <!-- Prepare directory structure for project build-->
37 <mkdir dir="${build}" />
38 <mkdir dir="${dist}" />
42 <!-- This target should be run before checking code into the repository -->
43 <target name="pre-checkin" depends="compile-all, test-all, clean-all" />
46 <!-- Compile classes and move them to ${build} -->
47 <target name="compile-all" depends="init">
48 <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on">
49 <exclude name="edu/internet2/middleware/shibboleth/hs-cmu/**" />
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="${approot}/WEB-INF/web.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}-origin.war" webxml="${configroot}/origin.xml" basedir="${approot}" update="no" />
83 <target name="dist-target" depends="compile-all, test-target, package-target, clean-build" />
84 <target name="package-target">
85 <war warfile="${dist}/${distname}-target.war" webxml="${configroot}/target.xml" basedir="${approot}" update="no" />
88 <target name="dist-target-includewayf" depends="compile-all, test-target, test-wayf, package-target-includewayf, clean-build" />
89 <target name="package-target-includewayf">
90 <war warfile="${dist}/${distname}-target.war" webxml="${configroot}/target-includewayf.xml" basedir="${approot}" update="no" />
93 <!-- Build utilities -->
94 <target name="build-util" depends="compile-all">
95 <jar jarfile="${dist}/shib-util.jar" basedir="${build}" />
98 <target name="dist-wayf" depends="compile-all, test-wayf, package-wayf, clean-build" />
99 <target name="package-wayf">
100 <war warfile="${dist}/${distname}-wayf.war" webxml="${configroot}/wayf.xml" basedir="${approot}" update="no" />
104 <!-- Cleanup after the build, test, and distribution processes -->
105 <target name="clean" depends="clean-all" />
106 <target name="clean-all" depends="clean-build, clean-dist, clean-test, clean-javadocs" />
107 <target name="clean-build">
108 <delete dir="${build}" />
110 <target name="clean-test">
112 <fileset dir="${root}">
113 <include name="**/TEST*.txt" />
117 <target name="clean-dist">
118 <delete dir="${dist}" />
120 <target name="clean-javadocs">
121 <delete dir="${javadocs}" />
125 <!-- Run automated tests on compiled code -->
126 <target name="test-all" depends="test-origin, test-target, test-wayf" />
127 <target name="test-origin" depends="test-common" />
128 <target name="test-target" depends="test-common" />
129 <target name="test-wayf" depends="test-common" />
130 <target name="test-common" depends="compile-all">
131 <junit printsummary="no" fork="no" haltonfailure="yes" haltonerror="no">
132 <classpath refid="build.path" />
133 <formatter type="plain" />
134 <!-- <test name="edu.internet2.middleware.shibboleth.common.AQHTest" /> -->