Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 161 lines (123 sloc) 5.85 KB
<?xml version="1.0" encoding="UTF-8"?>
Filename : build.xml
Project : proj4js
Document Type : XML
Purpose : build file for ant tool
Author Date Description
M.Adair 17-Dec-2001 initial version copied from mapbuilder
$Id: build.xml 2955 2007-07-09 12:12:27Z steven $
<!-- A "project" describes a set of targets that may be requested
when Ant is executed. The "default" attribute defines the
target which is executed if no specific target is requested,
and the "basedir" attribute defines the current working directory
from which Ant executes the requested task. This is normally
set to the current working directory.
<project basedir=".." default="dist" name="proj4js">
<!-- ===================== Property Definitions =========================== -->
Each of the following properties are used in the build script.
Values for these properties are set by the first place they are
defined, from the following list:
* Definitions on the "ant" command line (ant -Dfoo=bar compile).
* Definitions from a "" file in the top level
source directory of this application.
* Definitions from a "" file in the developer's
home directory.
* Default definitions in this build.xml file.
You will note below that property values can be composed based on the
contents of previously defined properties. This is a powerful technique
that helps you minimize the number of changes required when your development
environment is modified. Note that property composition is allowed within
"" files as well as in the "build.xml" script.
<property file=""/>
<property file="${user.home}/"/>
<property file=""/>
<!-- ==================== File and Directory Names ======================== -->
These properties generally define file and directory names (or paths) that
affect where the build process stores its outputs. Base name of this application, used to
construct filenames and directories.
Defaults to "myapp".
app.path Context path to which this application should be
deployed (defaults to "/" plus the value of the
"" property).
app.version Version number of this iteration of the application.
build.home The directory into which the "prepare" and
"compile" targets will generate their output.
Defaults to "build".
dist.home The name of the base directory in which
distribution files are created.
Defaults to "dist".
<property environment="env"/>
<property name="" value="proj4js"/>
<property name="app.path" value="/${}"/>
<property name="app.version" value="1.1.0"/>
<property name="build.home" value="${basedir}/tempBuild"/>
<property name="dist.home" value="${basedir}/dist"/>
<property name="docs.home" value="${build.home}/docs"/>
<!-- ==================== Prepare Target ================================== -->
The "prepare" target is used to create the "build" destination directory,
and copy the static contents of your web application to it. If you need
to copy static files from external dependencies, you can customize the
contents of this task.
Normally, this task is executed indirectly when needed.
<target name="prepare">
<!-- Create build directories as needed -->
<mkdir dir="${build.home}"/>
<!-- Copy static content of the mapbuilder project -->
<copy todir="${build.home}">
<fileset dir="${basedir}" excludes="tools/*.pyc "
<!-- ==================== Clean Target ==================================== -->
The "clean" target deletes any previous "build" and "dist" directory,
so that you can be ensured the application can be built from scratch.
<target description="Delete old build and dist directories" name="clean">
<delete dir="${build.home}"/>
<delete dir="${dist.home}"/>
<!-- ==================== Documentation =================================== -->
<target description="Create documentation" name="docs" depends="prepare">
<mkdir dir="${build.home}/docs"/>
<mkdir dir="${build.home}/docs/NaturalDocs"/>
<echo message="Generating documentation"/>
<exec executable="cmd" os="Windows XP" dir="${build.home}">
<arg line="/c perl C:\Progra~1\NaturalDocs\NaturalDocs -i ./lib -o html ./docs/NaturalDocs -p ./docs/NaturalDocs -r"/>
<!-- ==================== Dist Target ===================================== -->
The "dist" target creates the zip file distribution for the Apache/PHP
<target name="dist" description="Create binary distribution" depends="clean,prepare,docs">
<mkdir dir="${dist.home}"/>
<!-- Create application zip file -->
<zip destfile="${dist.home}/${}-${app.version}.zip" update="true">
<zipfileset dir="${build.home}" prefix="proj4js"/>