-<project name="Mir" default="compile" basedir=".">
-
-
-<!-- Property Definitions
- app.name Base name of this application, used to
- construct filenames and directories.
-
- deploy.home The name of the directory into which the
- deployment hierarchy will be created.
- Normally, this will be the name of a
- subdirectory under $TOMCAT_HOME/webapps.
-
- dist.home The name of the base directory in which
- distribution files are created.
-
- dist.src The name of the distribution JAR file
- containing the application source code,
- to be stored in the "dist.home" directory.
- This filename should end with ".jar".
-
- dist.war The name of the Web ARchive (WAR) file
- containing our deployable application.
- This filename should end with ".war".
-
- javadoc.home The name of the base directory in which
- the JavaDoc documentation for this application
- is generated.
-
- tomcat.home The name of the base directory in which
- Tomcat has been installed. This value is
- normally set automatically from the value
- of the TOMCAT_HOME environment variable.
--->
-
- <property name="app.name" value="Mir"/>
- <property name="deploy.home" value="../${app.name}"/>
- <property name="dist.home" value="${deploy.home}"/>
- <property name="dist.src" value="${app.name}.jar"/>
- <property name="dist.war" value="${app.name}.war"/>
- <property name="javadoc.home" value="${deploy.home}/javadoc"/>
- <property name="build.compiler" value="jikes"/>
-
-
-<!-- The "prepare" target is used to construct the deployment home
- directory structure (if necessary), and to copy in static files
- as required. In the example below, Ant is instructed to create
- the deployment directory, copy the contents of the "web/" source
- hierarchy, and set up the WEB-INF subdirectory appropriately.
--->
-
- <target name="prepare">
- <mkdir dir="${deploy.home}"/>
- <copy todir="${deploy.home}">
+<project name="Mir" default="deploy" basedir=".">
+ <!--
+ - Build script for the Mir project
+ -
+ - usefull tasks are:
+ - * compile
+ - Creates the jars needed for a mir deployment
+ - * deploy
+ - Sets up a deployment directory
+ - * binary-distribution
+ - Sets up a distributable version of mir in the
+ - form of a war file
+ - * source-distribution
+ - Sets up a distributable version of mir as a
+ - gzipped tar version of the source tree
+ - * full-distribution
+ - Sets up a distributable version of mir in the
+ - form of a gzipped tar file with the sources
+ - * javadoc
+ - Generates the project's javadoc
+ -->
+
+ <property name="version" value="1.1.0rc0"/>
+
+ <property name="app.name" value="mir"/>
+
+ <!-- -->
+ <property name="deploy.home" value="./bin/${app.name}"/>
+
+ <!-- The distribution will be built here: -->
+ <property name="distribution.home" value="./dist"/>
+
+
+
+ <!-- The temporary files made during the build process
+ will be created here: -->
+ <property name="build" value="./build"/>
+ <property name="build.classes" value="./${build}/classes"/>
+ <property name="build.jars" value="./${build}/jars"/>
+ <property name="build.javadoc" value="${build}/javadoc"/>
+
+ <!-- retrieve environment variables -->
+ <property environment="env"/>
+
+ <property name="tomcat.home" value="${env.TOMCAT_HOME}"/>
+
+<!--
+ <property name="compile.optimize" value="off" />
+ <property name="compile.debug" value="on" />
+ -->
+
+ <target name="deploy" depends="compile,generate-deployment-tree"
+ description="Sets up a deployment directory">
+ </target>
+
+ <target name="debug" depends="compile-debug,generate-deployment-tree"
+ description="Sets up a deployment directory with debug enabled">
+ </target>
+
+ <target name="generate-deployment-tree">
+ <property name="destination" value="${deploy.home}"/>
+ <mkdir dir="${destination}"/>
+ <mkdir dir="${destination}/WEB-INF"/>
+ <delete dir="${destination}/WEB-INF/lib"/>
+ <mkdir dir="${destination}/WEB-INF/lib"/>
+ <mkdir dir="${destination}/WEB-INF/log"/>
+
+ <copy todir="${destination}">