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 ‘build.properties.xml’ 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 build.properties.xml. 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
|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
|clean||cleans the ‘target’ directory|
|prepare||prepares the ‘target’ directory + copies resources|
|compile||compiles all Core and Web classes|
|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-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|
Creating an installer