Building betterFORM

This page describes how to build betterFORM Core and Web. To update betterFORM running within eXist see ‘deploying a dev version to eXist’.

betterFORM uses Apache Ant as its primary build tool. All dependencies are kept in a central location in the file ‘’ which is found in the root of the source tree.

In addition to Ant there is support for Maven 2.x. However the Maven files are not maintained by hand but generated from The Maven pom files can be used directly with some IDEs like JetBrains IntelliJ.

All build products are created in a directory named ‘target’ that is created in the root directory of the respective module e.g. when executing ‘compile’ for module ‘core’ the compiled classes will be in BETTERFORM_HOME/core/target. If the ‘target’ directory does not exist it is created.

To build a module it is sufficient to cd into the respective directory and call Ant:


This will execute the default target which will create the artifacts for this module.

Building the core

Build file: $betterFORM_HOME/core/build.xml

Ant Target Description
clean delete the ‘target’ directory of the current module
prepare creates ‘target’ directory if needed and copies all resources to it.
compile Compile Java classes of the module to ‘target/classes’
distribute creates binary and source distributions
distribute-binary creates an archive with the compiled classes, all dependent libraries and a config file
distribute-sources creates an archive of the source tree
package creates a jar-files of all betterFORM classes
distribute Create a distribution version of the current module.
doc creates JavaDoc files
test execute all test of the current module

Building the web application

Build file: $betterFORM_HOME/web/build.xml

Ant target


clean cleans the ‘target’ directory
prepare prepares the ‘target’ directory + copies resources
compile compiles all Core and Web classes
create-single-jar compiles all classes and packages them along with all resources (CSS, JavaScript, images and XSLTs) into a single jar file. The jar will contain the compressed and optimized version of the JavaScript files.
create-war creates a web application archive (.war) for deployment in your web container
deploy creates a webapp structure in ‘target’ along with all needed config files using the optimized single-jar
deploy-exploded creates a webapp structure in ‘target’ as the ‘deploy’ but using the uncompressed JavaScript files for debugging purposes.
deploy-forms copies all files from resources/main/src/xforms to the webapp structure in ‘target’.
deploy-test-resources copies the XForms 1.1 Test Suite files to the webapp structure
doc create JavaDoc for the web classes

Building Zaphod


Creating an installer


1 Comment Add your own

  • 1. News from the editor « betterFORM  |  December 16, 2011 at 2:46 pm

    […] you have to checkout and build the development branch on GitHub. Instruction on building are found here. However if you like to have a online presentation please send a notice to info at betterform dot […]


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

%d bloggers like this: