Java Web Application Development With Click Framework/Building

Click uses an Ant based build system for creating JAR files, application WAR files and the Click distribution.


 * Build Configuration
 * Ant Targets
 * Framework Dependencies
 * Extras Dependencies

Build Configuration
The configuration of the Click Ant build system is detailed below:

--[build]                     Ant build directory |  | |    ---build.xml               Ant build script |  | |    ---build.properties        Ant build properties | --[dist]                       JAR and WAR file output directory | --[documentation]              Click documentation set application | --[examples]                   Click Examples application |  | |    ---build.xml               Ant build script |  | |    ---README.txt              Click Examples Readme file | --[extras]                     Click Extras source directory | --[framework]                  Click framework source directory | --[lib]                        Dependent JAR libraries directory | --[mock]                       Mock objects source directory

Build Requirements
Ensure the following requirements are met before performing builds:


 * 1) Ensure JAVA_HOME environment variable is set and points to a JDK installation (1.4 or later).
 * 2) Ensure ANT_HOME environment variable is set and points to an Ant installation (1.7.0 or later).
 * 3) Ensure junit.jar is present in your ANT_HOME/lib directory.

Ant Targets
ant help Buildfile: build.xml help: [echo] Click web application framework [echo] =============================== [echo] Main targets: [echo] build-all            build framework, extras, examples [echo] build-distribution   build distribution ZIP file [echo] build-examples       build click-examples WAR file [echo] build-extras         build click-extras JAR file [echo] build-framework      build click framework JAR file [echo] build-maven-bundles  build Maven repository upload bundles [echo] build-sources        build source ZIP files for use with IDEs [echo] deploy-examples      copy examples WAR files to app server [echo] get-deps             download JAR dependencies [echo] get-deps-proxy       download JAR dependencies via proxy [echo] help                 display the Help message [echo] javadoc              create Javadoc HTML files [echo] Please ensure you have configured build.properties BUILD SUCCESSFUL

Getting Dependencies
Run the Ant target get-deps to download JAR dependencies from Ibiblio Maven repository:
 * ant get-deps

If you are behind a firewall use the Ant target get-deps-proxy and configure your proxy settings in build.properties

Building Framework
To build the Click framework JAR file click.jar


 * 1) Ensure the above configurations have been made and <tt>get-deps</tt> has been run.
 * 2) Run the Ant target <tt>build-framework</tt> to build the framework:
 * ant build-framework

Building Extras
Click Extras JAR file <tt>click-extras.jar</tt>


 * 1) Ensure the above configurations have been made and <tt>get-deps</tt> has been run.
 * 2) Run the Ant targets <tt>framework</tt> and <tt>build-extras</tt> :
 * ant build-framework build-extras

Building Examples
To build the Click Examples and Click QuickStart web application WAR files:


 * 1) Please see the <tt>examples/README.txt</tt> file, ensuring the required properties have been configured and the dependencies downloaded.
 * 2) Ensure the above configurations have been made and <tt>get-deps</tt> has been run.
 * 3) Run the Ant target <tt>build-all</tt> :
 * ant build-all

Framework Dependencies
The Click framework has the following runtime dependencies.

* : marked libraries and source are included in the <tt>click.jar</tt> file.

The standard <tt>click-xx.jar</tt> includes all of the listed dependencies. Alternatively use the <tt>click-nodeps-xx.jar</tt> which includes none of these dependencies.

Extras Dependencies
The Click Extras has the following runtime dependencies in addition to the Framework dependencies.

* : marked libraries and source are included in the <tt>click.jar</tt> file.