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"/>
55 <copy todir="${build}/conf">
56 <fileset dir="${src}/conf"/>
61 <!-- Generate API docs -->
62 <target name="javadocs">
63 <mkdir dir="${docs}" />
64 <mkdir dir="${javadocs}" />
65 <javadoc packagenames='edu.internet2.middleware.*'
66 sourcepath='${src}' destdir='${javadocs}'
67 author='true' version='true'
68 windowtitle='Shibboleth Java API' doctitle='Shibboleth Java API'
69 bottom='${copyright}'>
70 <classpath refid="build.path" />
74 <!-- Create various product distributions and move them to ${dist} -->
75 <target name="dist" depends="dist-all" />
76 <target name="dist-all" depends="compile-all, test-all, package-all, clean-build" />
77 <target name="package-all">
78 <war warfile="${dist}/${distname}.war" webxml="${configroot}/all.xml" basedir="${approot}" update="no" />
81 <target name="dist-origin" depends="compile-all, test-origin, package-origin, clean-build" />
82 <target name="package-origin">
83 <war warfile="${dist}/${distname}.war" webxml="${configroot}/origin.xml" basedir="${approot}" update="no" />
86 <!-- Build utilities -->
87 <target name="build-util" depends="compile-all">
88 <jar jarfile="${distlibs}/shib-util.jar" basedir="${build}" />
91 <target name="dist-wayf" depends="compile-all, test-wayf, package-wayf, clean-build" />
92 <target name="package-wayf">
93 <war warfile="${dist}/${distname}-wayf.war" webxml="${configroot}/wayf.xml" basedir="${approot}" update="no" />
97 <!-- Cleanup after the build, test, and distribution processes -->
98 <target name="clean" depends="clean-all" />
99 <target name="clean-all" depends="clean-build, clean-dist, clean-test, clean-javadocs, clean-util" />
100 <target name="clean-build">
101 <delete dir="${build}" />
103 <target name="clean-test">
105 <fileset dir="${root}">
106 <include name="**/TEST*.txt" />
110 <target name="clean-dist">
111 <delete dir="${dist}" />
113 <target name="clean-javadocs">
114 <delete dir="${javadocs}" />
116 <target name="clean-util">
118 <fileset dir="${buildlibs}">
119 <include name="shib-util.jar" />
125 <!-- Run automated tests on compiled code -->
126 <target name="test-all" depends="test-origin, test-wayf" />
127 <target name="test-origin" depends="test-common">
128 <junit printsummary="no" fork="yes" haltonfailure="yes" haltonerror="yes" dir="${root}">
129 <classpath refid="build.path" />
130 <formatter type="plain" />
131 <test name="edu.internet2.middleware.shibboleth.aa.arp.ArpTests" />
134 <target name="test-wayf" depends="test-common" />
135 <target name="test-common" depends="compile-all"/>