1 <project name="Mir" default="deploy" basedir=".">
3 - Build script for the binary distribution of the Mir project
7 - Creates the jars needed for a mir deployment
10 <property name="version" value="1.1.0rc0"/>
11 <property name="app.name" value="mir"/>
12 <property name="deploy.home" value="."/>
14 <!-- The temporary files made during the build process
15 will be created here: -->
16 <property name="build" value="./build"/>
17 <property name="build.classes" value="./${build}/classes"/>
18 <property name="build.jars" value="./${build}/jars"/>
19 <property name="build.javadoc" value="${build}/javadoc"/>
21 <!-- retrieve environment variables -->
22 <property environment="env"/>
24 <property name="tomcat.home" value="${env.TOMCAT_HOME}"/>
26 <target name="deploy" depends="compile,generate-deployment-tree"
27 description="Sets up a deployment directory">
30 <target name="generate-deployment-tree">
31 <property name="destination" value="${deploy.home}"/>
33 <copy todir="${destination}/lib">
34 <fileset dir="${build.jars}" />
39 <delete dir="${build}"/>
42 <!-- Construct the classpath -->
43 <path id="project.classpath">
45 <include name="*.jar"/>
47 <fileset dir="etc/extralib">
48 <include name="*.jar"/>
51 <pathelement path="${tomcat.home}/lib/tomcat.jar"/>
53 <!-- for libs shared between tomcat and webapps (tomcat 3.3.x) -->
54 <fileset dir="${tomcat.home}">
55 <include name="lib/common/*.jar" />
57 <!-- for libs shared between webapps (tomcat 3.3.x) -->
58 <fileset dir="${tomcat.home}">
59 <include name="lib/apps/*.jar" />
61 <!-- for libs shared between tomcat and webapps (tomcat 4.x.x) -->
62 <fileset dir="${tomcat.home}">
63 <include name="common/lib/*.jar" />
65 <!-- for libs shared between webapps (tomcat 4.0.x) -->
66 <fileset dir="${tomcat.home}">
67 <include name="lib/*.jar" />
69 <!-- for libs shared between webapps (tomcat 4.1.x) -->
70 <fileset dir="${tomcat.home}">
71 <include name="shared/lib/*.jar" />
74 <fileset dir="${tomcat.home}">
75 <include name="common/endorsed/*.jar" />
80 <target name="prepare-compilation">
81 <mkdir dir="${build.classes}"/>
82 <mkdir dir="${build.jars}"/>
83 <uptodate property="up.to.date" targetfile="${build.jars}/mir.jar">
84 <srcfiles dir="source" includes="**/*.java"/>
85 <srcfiles dir="lib" includes="*.jar"/>
86 <srcfiles dir="etc/extrasource" includes="**/*"/>
87 <srcfiles dir="etc/extralib" includes="*"/>
91 <!-- compile target: compiles all files into the build/classes dir -->
92 <target name="compile" depends="prepare-compilation" unless="up.to.date"
93 description="Creates the jars needed for a mir deployment">
95 <javac destdir="${build.classes}" debug="true" deprecation="off" source="1.3">
96 <src path="etc/extrasource"/>
97 <classpath refid="project.classpath"/>
100 <delete file="${build.jars}/mir.jar"/>
103 jarfile="${build.jars}/mir.jar">
104 <fileset dir="${build.classes}" includes="**/*.class" />
106 <attribute name="Built-By" value="${user.name}"/>