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="appconfig" value="${src}/conf/" />
11 <property name="configroot" value="${root}/webAppConfig/" />
12 <property name="build" value="${approot}/WEB-INF/classes/" />
13 <property name="libdir" value="${approot}/WEB-INF/lib/" />
14 <property name="buildlibs" value="${root}/lib/" />
15 <property name="distlibs" value="${root}/lib/" />
16 <property name="dist" value="${root}/dist/" />
17 <property name="docs" value="${root}/docs/" />
18 <property name="javadocs" value="${docs}/api/" />
20 <property name="year" value="2002"/>
21 <property name="copyright" value="Copyright © ${year} UCAID. All Rights Reserved."/>
24 <!-- Construct the CLASSPATH -->
25 <path id="build.path">
26 <pathelement path="${classpath}" />
27 <pathelement location="${build}" />
28 <fileset dir="${libdir}">
29 <include name="**/*.jar" />
31 <fileset dir="${buildlibs}">
32 <include name="**/*.jar" />
37 <!-- Prepare directory structure for project build-->
39 <mkdir dir="${build}" />
40 <mkdir dir="${dist}" />
44 <!-- This target should be run before checking code into the repository -->
45 <target name="pre-checkin" depends="compile-all, test-all, clean-all" />
48 <!-- Compile classes and move them to ${build} -->
49 <target name="compile-all" depends="init">
50 <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on">
51 <classpath refid="build.path" />
53 <copy todir="${build}/schemas">
54 <fileset dir="${src}/schemas"/>
56 <copy todir="${build}/conf">
57 <fileset dir="${src}/conf"/>
62 <!-- Generate API docs -->
63 <target name="javadocs">
64 <mkdir dir="${docs}" />
65 <mkdir dir="${javadocs}" />
66 <javadoc packagenames='edu.internet2.middleware.*'
67 sourcepath='${src}' destdir='${javadocs}'
68 author='true' version='true'
69 windowtitle='Shibboleth Java API' doctitle='Shibboleth Java API'
70 bottom='${copyright}'>
71 <classpath refid="build.path" />
75 <!-- Create various product distributions and move them to ${dist} -->
76 <target name="dist" depends="dist-all" />
77 <target name="dist-all" depends="compile-all, test-all, package-all, clean-build" />
78 <target name="package-all">
79 <war warfile="${dist}/${distname}.war" webxml="${configroot}/all.xml" basedir="${approot}" update="no" />
82 <target name="dist-origin" depends="compile-all, test-origin, package-origin, clean-build" />
83 <target name="package-origin">
84 <war warfile="${dist}/${distname}.war" webxml="${configroot}/origin.xml" basedir="${approot}" update="no" />
87 <!-- Build utilities -->
88 <target name="build-util" depends="compile-all">
89 <jar jarfile="${distlibs}/shib-util.jar" basedir="${build}" />
92 <target name="dist-wayf" depends="compile-all, test-wayf, package-wayf, clean-build" />
93 <target name="package-wayf">
94 <war warfile="${dist}/${distname}-wayf.war" webxml="${configroot}/wayf.xml" basedir="${approot}" update="no" />
98 <!-- Cleanup after the build, test, and distribution processes -->
99 <target name="clean" depends="clean-all" />
100 <target name="clean-all" depends="clean-build, clean-dist, clean-test, clean-javadocs, clean-util" />
101 <target name="clean-build">
102 <delete dir="${build}" />
104 <target name="clean-test">
106 <fileset dir="${root}">
107 <include name="**/TEST*.txt" />
111 <target name="clean-dist">
112 <delete dir="${dist}" />
114 <target name="clean-javadocs">
115 <delete dir="${javadocs}" />
117 <target name="clean-util">
119 <fileset dir="${buildlibs}">
120 <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"/>
137 <target name="genSecret" depends="compile-all">
138 <taskdef name="genSecret" classname="edu.internet2.middleware.shibboleth.utils.HandleRepositorySecretGenerator" classpathref="build.path"/>
139 <genSecret keyStorePath="${appconfig}/handle.jks" keyStorePassword="shibhs" keyStoreKeyAlias="handleKey" keyStoreKeyPassword="shibhs" />