65e9daef858cd07261b7a885d0b9db3f8a43f636
[java-idp.git] / build.xml
1 <project default="dist" basedir=".">
2
3         <property name="distname" value="shibboleth"/>
4
5         <!-- set global properties for this build -->
6         <property name="root" value="."/>
7         <property name="src" value="${root}/source"/>
8         <property name="approot" value="${root}/webApplication"/>
9         <property name="build" value="${approot}/WEB-INF/classes"/>
10         <property name="libdir" value="${approot}/WEB-INF/lib"/>
11         <property name="buildlibs" value="${root}/buildlibs"/>
12         <property name="dist" value="${root}/dist"/>
13
14         <path id="build.path">
15                 <pathelement path="${classpath}"/>
16                 <pathelement location="${build}"/>
17                 <fileset dir="${libdir}">
18                         <include name="**/*.jar"/>
19                 </fileset>
20                 <fileset dir="${buildlibs}">
21                         <include name="**/*.jar"/>
22                 </fileset>
23
24         </path>
25
26         <!-- Prepare directory structure for project build-->
27         <target name="init">
28                 <mkdir dir="${build}"/>
29                 <mkdir dir="${dist}"/>
30         </target>
31
32         <!-- Compile classes and move them to ${build} -->
33         <target name="compile" depends="init">
34                 <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on">
35                         <classpath refid="build.path"/>
36                 </javac>
37         </target>
38
39         <target name="package">
40                 <war warfile="${dist}/${distname}.war" webxml="${approot}/WEB-INF/web.xml" basedir="${approot}" update="no"/>
41         </target>
42
43         <target name="dist" depends="compile, package, clean-build"/>
44
45         <!-- Delete the ${build} and ${dist} directory trees -->
46         <target name="clean" depends="clean-build, clean-dist"/>
47
48         <target name="clean-build">
49                 <delete dir="${build}"/>
50         </target>
51
52         <target name="clean-dist">
53                 <delete dir="${dist}"/>
54         </target>
55         
56         <target name="test" depends="test-common" />
57         <target name="test-common" depends="compile">
58                 <junit printsummary="yes" fork="no" haltonfailure="yes" haltonerror="no">
59                         <classpath refid="build.path"/>
60                         <formatter type="plain" />
61                         <test name="edu.internet2.middleware.shibboleth.common.AQHTest" />
62                 </junit>
63         </target>
64         
65
66 </project>
67