1 <project name="Mir" default="compile" basedir=".">
3 <!-- Property Definitions
5 Please not that only the first couple of properties have to be defined.
6 The rest, residing below the "no customization needed" line may be
7 customized if you know what you are doing. Else, leave the defaults
8 and use them to look up where ant places all the files.
10 app.name Base name of this application, used to
11 construct filenames and directories.
13 deploy.home The name of the directory into which the
14 deployment hierarchy will be created.
15 Normally, this will be the name of a
16 subdirectory under $TOMCAT_HOME/webapps.
18 deploy.classes The name of the directory that will contain
21 dist.home The name of the base directory in which
22 distribution files are created.
24 dist.src The name of the distribution JAR file
25 containing the application source code,
26 to be stored in the "dist.home" directory.
27 This filename should end with ".jar".
29 dist.war The name of the Web ARchive (WAR) file
30 containing our deployable application.
31 This filename should end with ".war".
33 javadoc.home The name of the base directory in which
34 the JavaDoc documentation for this application
37 tomcat.home The name of the base directory in which
38 Tomcat has been installed. This value is
39 normally set automatically from the value
40 of the TOMCAT_HOME environment variable.
42 java.home The location of your Java SDK.
44 java.localhome Where your local java classes and jar files
47 tomcat.home The location of the tomcat root directory.
51 <property name="app.name" value="mir"/>
52 <property name="deploy.home" value="./bin/${app.name}"/>
54 <!-- don't use unless your Jikes is >= v1.18 -->
55 <!-- <property name="build.compiler" value="jikes"/>-->
58 <!-- No customization required after this line -->
60 <property environment="env"/>
61 <property file="build.properties"/>
62 <property name="dist.home" value="${deploy.home}"/>
63 <property name="deploy.webinf" value="${deploy.home}/WEB-INF"/>
64 <property name="deploy.classes" value="${deploy.webinf}/classes"/>
65 <property name="dist.src" value="${app.name}.jar"/>
66 <property name="dist.war" value="${app.name}.war"/>
67 <property name="javadoc.home" value="${deploy.home}/javadoc"/>
68 <property name="tomcat.home" value="${env.TOMCAT_HOME}"/>
69 <property name="compile.optimize" value="off" />
70 <property name="compile.debug" value="on" />
73 <!-- Construct the classpath -->
74 <path id="project.class.path">
75 <pathelement path="${deploy.home}"/>
76 <pathelement path="${deploy.classes}"/>
77 <pathelement path="source"/>
78 <pathelement path="etc/extrasource"/>
80 <include name="*.jar"/>
84 <target name="prepare">
85 <mkdir dir="${deploy.home}"/>
86 <mkdir dir="${deploy.webinf}"/>
87 <mkdir dir="${deploy.classes}"/>
88 <mkdir dir="${deploy.webinf}/log"/>
90 <copy todir="${deploy.home}">
94 <copy todir="${deploy.webinf}/etc">
95 <fileset dir="etc" excludes="bundles/** web.xml"/>
97 <copy todir="${deploy.classes}/bundles">
98 <fileset dir="etc/bundles"/>
100 <copy todir="${deploy.webinf}" file="etc/web.xml"/>
102 <copy todir="${deploy.webinf}/templates">
103 <fileset dir="templates"/>
106 <copy todir="${deploy.webinf}" file="source/default.properties" />
108 <copy todir="${deploy.classes}/bundles">
109 <fileset dir="bundles"/>
112 <copy todir="${deploy.home}/WEB-INF/lib">
114 <exclude name="ant.jar"/>
115 <exclude name="xerces.jar"/>
120 <target name="clean">
121 <delete dir="${deploy.classes}"/>
122 <mkdir dir="${deploy.classes}"/>
125 <target name="mrproper">
126 <delete dir="${deploy.home}"/>
129 <target name="compile" depends="prepare">
133 includes="**/*.java"/>
134 <!-- ML: now why can't this be added?
136 dir="etc/extrasource"
137 includes="**/*.java"/> -->
142 dir="${deploy.classes}"
143 includes="**/*.class"/>
145 <javac destdir="${deploy.classes}"
146 debug="${compile.debug}" optimize="${compile.optimize}" deprecation="on">
148 <src path="etc/extrasource"/>
149 <classpath refid="project.class.path"/>
153 <target name="perms">
154 <exec executable="./perms.sh"/>
157 <target name="javadoc" depends="prepare">
158 <javadoc packagenames="mir.*, mircoders.*"
159 sourcefiles="source/Mir.java,source/OpenMir.java"
161 destdir="${javadoc.home}">
162 <classpath refid="project.class.path"/>
166 <target name="all" depends="clean,prepare,compile,javadoc"/>