Apache Ant Build System

Apache Ant is a Java-based build tool. In theory, it is kind of like make, without its wrinkles. Ant uses an XML file called, by convention, build.xml to control the build process. The basic use of Ant is to run the following command in a shell in the root of the fusion directory structure:

ant [target]

The optional target specifies one of the build targets, described below.

Fusion Build Targets


The "prepare" target is used to create the "build" destination directory, and copy the static contents of your web application to it. Normally, this task is executed indirectly when needed.


The "docs" target runs NaturalDocs on the code base to create API documentation.


The compress target combines various javascript source files into a single file and runs the jsmin tool on it to create a minimized file for use in production applications.


The "singleFile" target will build Fusion as a single JavaScript file to be included in your Application which helps with the initial load time. You may optionally specify the ApplicationDefinition file to include in the build process. The resulting file will then include all widgets specified in the ApplicationDefinition and the ApplicationDefinition file itself converted to JSON. To use this target run ant setting the path to the ApplicationDefinition file (either relative to the build.xml file location or an absolute path) as a property:

ant singleFile -DappDef=templates/mapguide/standard/ApplicationDefinition.xml


The "deploy" target synchronizes the build directory with an external directory. This can be used to move a fusion build into a web accessible location for instance.


The "dist" target creates a binary distribution of your application in a directory structure ready to be archived in a tar.gz or zip file.


The "clean" target removes previous build and dist directories to ensure that a newly built version of Fusion doesn't contain extra stuff.


The "clean-all" target runs the "clean" target and removes anything from the deployment location.

Customizing the Build Process

You can customize the build process. coming soon.

Last modified 16 years ago Last modified on May 6, 2008, 12:04:12 PM
Note: See TracWiki for help on using the wiki.