# 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 Requirements

Ensure the following requirements are met before performing builds:
* Ensure JAVA_HOME environment variable is set and points to a JDK installation (1.4 or later).
* Ensure ANT_HOME environment variable is set and points to an Ant installation (1.7.0 or later).
* Ensure junit.jar is present in your ANT_HOME/lib directory.

## Ant Targets
### 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
* Ensure the above configurations have been made and get-deps has been run.
* Run the Ant target build-framework to build the framework:
    ant build-framework

### Building Extras

Click Extras JAR file click-extras.jar
* Ensure the above configurations have been made and get-deps has been run.
* Run the Ant targets framework and build-extras:
    ant build-framework build-extras

### Building Examples

To build the Click Examples and Click QuickStart web application WAR files:
* Please see the examples/README.txt file, ensuring the required properties have been configured and the dependencies downloaded.
* Ensure the above configurations have been made and get-deps has been run.
* Run the Ant target build-all:
    ant build-all

## Framework Dependencies

The Click framework has the following runtime dependencies.
| Library | Version | JAR / Source | Author | Description |
| Java Runtime | 1.4 | n/a | Sun Microsystems | J2SE Runtime Environment |
| Servlet API | 2.3 | servlet-2.3.jar | Sun Microsystems | JEE Servlet API |
| Velocity Engine | 1.5 | velocity-1.5.jar* | Apache Velocity | Velocity Templating Framework |
| Velocity Tools | 1.1 | WebappLoader source* | Jakarta Velocity Tools | Velocity Tools Utility Library |
| OGNL | 2.6.9 | ognl-2.6.9.jar * | OGNL | Object Graph Navigation Library |
| Common Language | 2.1 | commons-lang-2.1.jar * | Jakarta Commons | General Language Utilities Library |
| Common FileUpload | 1.2 | commons-fileupload-1.2.jar * | Jakarta Commons | HTTP File Upload Library |
| Commons Codec | 1.3 | commons-codec-1.3.jar * | Jakarta Commons | Encoding Decoding Library |
| Commons Collections | 3.1 | commons-collections-3.1.jar * | Jakarta Commons | Collection Utilities Library |
| Common IO | 1.1 | commons-io-1.3.jar * | Jakarta Commons | IO Utilities Library |
| Concurrent | 1.3.4 | ConcurrentReaderHashMap source* | Doug Lea | Concurrent utilities library |
*: marked libraries and source are included in the click.jar file.
The standard click-xx.jar includes all of the listed dependencies. Alternatively use the click-nodeps-xx.jar which includes none of these dependencies.

## Extras Dependencies

The Click Extras has the following runtime dependencies in addition to the Framework dependencies.
| Library | Version | JAR | Author | Description |
| Cayenne | 2.0.3 | cayenne-nodeps-2.0.3.jar | Apache Cayenne | ORM Framework |
| Hibernate | 3.1.3 | hibernate-3.1.3.jar | Hibernate | ORM Framework |
| Log4J | 1.2.14 | log4j-1.2.14.jar | Log4j | Logging Framework |
| Spring | 1.2.9 | spring-1.2.9.jar | Spring Framework | IoC Framework |
| JSCalendar | 1.0 | JavaScript source* | Dynarch.com | JavaScript Calendar Widget |
| JSGraphics | 2.33 | JavaScript source* | Walter Zorn | JavaScript Graphics library |
| Prototype | 1.5.0 | JavaScript source* | Prototype Org | JavaScript library |
| script.aculo.us | 1.7.0 | JavaScript source* | script.aculo.us | JavaScript library |
*: marked libraries and source are included in the click.jar file.