blob: b87a5487d0b29a8a301484b6fa909e0886db0df4 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<meta name="Author" content="Malcolm Edgar"/>
<meta name="description" lang="en" content="Apache Click Java web application framework"/>
<meta name="keywords" lang="en" content="Apache Click, Click, Click Framework, Java, JEE, J2EE, web application framework, open source"/>
<title>Apache Click</title>
<link rel="stylesheet" type="text/css" href="../../help.css"/>
<style type="text/css">
th { text-align: left; }
td { vertical-align: top; white-space: nowrap; }
</style>
</head>
<body>
<h1>Building</h1>
Click uses an <a href="http://ant.apache.org">Ant</a> based build system for
creating JAR files, application WAR files and the Click distribution.
<ol>
<li><a href="#configuration">Build Configuration</a>
</li>
<li><a href="#ant-targets">Ant Targets</a>
</li>
<li><a href="#framework-dependencies">Framework Dependencies</a>
</li>
<li><a href="#extras-dependencies">Extras Dependencies</a>
</li>
<li><a href="#third-party-licensing-issues">Third-party Licensing Issues</a>
</li>
</ol>
<p>&nbsp;</p>
<a name="build-configuration"></a><h2>1.&nbsp; Build Configuration</h2>
The configuration of the Click Ant build system is detailed below:
<pre class="codeConfig" style="margin-left:3em;">
+--[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 </pre>
<h3>1.1&nbsp; Build Requirements</h3>
Ensure the following requirements are met before performing builds:
<ol>
<li>Ensure <tt>JAVA_HOME</tt> environment variable is set and points to
a JDK installation (1.5 or later).<p/>
</li>
<li>Ensure <tt>ANT_HOME</tt> environment variable is set and points to
an Ant installation (1.9.0 or later).<p/>
</li>
</ol>
<a name="ant-targets"></a><h2>2.&nbsp; Ant Targets</h2>
<pre class="codeConfig" style="margin-left:3em;">
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-mock build mock JAR file
[echo] build-sources build source ZIP files for use with IDEs
[echo] checkstyle run checkstyle report on Java source
[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] project-quick-start build application template
[echo] test-all run all unit tests
[echo] Please ensure you have configured build.properties
BUILD SUCCESSFUL </pre>
<h3>2.1&nbsp; Getting Dependencies</h3>
<ol>
<li>Run the Ant target <tt>get-deps</tt> to download JAR dependencies
from the <a href="http://repo1.maven.org/maven2">Maven</a> repository:
<pre class="codeConfig">
ant get-deps </pre>
If you are behind a firewall use the Ant target <tt>get-deps-proxy</tt>
and configure you proxy settings in <tt>build.properties</tt>
<pre class="codeConfig">
# Proxy hostname used by Ant target 'get-deps-proxy'
proxy.host=192.168.0.3
# Proxy port for by Ant target 'get-deps-proxy'
proxy.port=3128 </pre>
</li>
</ol>
<h3>2.2&nbsp; Building Framework</h3>
To build the Click framework JAR file <tt>click.jar</tt>
<ol>
<li>Ensure the above configurations have been made and <tt>get-deps</tt> has
been run.<p/>
</li>
<li>Run the Ant target <tt>build-framework</tt> to build the framework:
<pre class="codeConfig">
ant build-framework </pre>
</li>
</ol>
<h3>2.3&nbsp; Building Extras</h3>
Click Extras JAR file <tt>click-extras.jar</tt>
<ol>
<li>Ensure the above configurations have been made and <tt>get-deps</tt> has
been run.<p/>
</li>
<li>Run the Ant targets <tt>framework</tt> and <tt>build-extras</tt>:
<pre class="codeConfig">
ant build-framework build-extras </pre>
</li>
</ol>
<h3>2.4&nbsp; Building Examples</h3>
To build the Click Examples and Click QuickStart web application WAR files:
<ol>
<li>Please see the <tt>examples/README.txt</tt> file, ensuring the
required properties have been configured and the dependencies downloaded.<p/>
</li>
<li>Ensure the above configurations have been made and <tt>get-deps</tt> has
been run.<p/>
</li>
<li>Run the Ant target <tt>build-all</tt>:
<pre class="codeConfig">
ant build-all </pre>
</li>
</ol>
<a name="framework-dependencies"></a><h2>3.&nbsp; Framework Dependencies</h2>
The Click framework has the following runtime dependencies.
<table style="border: 1px solid black; margin: 1em 0em;" cellspacing="0" cellpadding="6">
<tr style="background-color: navy; color: white;">
<th>Library</th>
<th>Version</th>
<th>JAR / Source</th>
<th>Author</th>
<th>Description</th>
</tr>
<tr>
<td>Java Runtime</td>
<td>1.5</td>
<td>n/a</td>
<td><a target="_blank" href="http://java.sun.com/j2se/">Sun Microsystems</a></td>
<td>J2SE Runtime Environment</td>
</tr>
<tr>
<td>Servlet API</td>
<td>2.4</td>
<td>servlet-2.4.jar</td>
<td><a target="_blank" href="http://java.sun.com/products/servlet/">Sun Microsystems</a></td>
<td>JEE Servlet API</td>
</tr>
<tr>
<td>Velocity Engine</td>
<td>1.7</td>
<td>velocity-1.7.jar<span class="red">*</span></td>
<td><a target="_blank" href="http://velocity.apache.org/">Apache Velocity</a></td>
<td>Velocity Templating Framework</td>
</tr>
<tr>
<td>Velocity Tools</td>
<td>2.0</td>
<td>WebappResourceLoader source<span class="red">**</span></td>
<td><a target="_blank" href="http://velocity.apache.org/tools/releases/2.0/">Jakarta Velocity Tools</a></td>
<td>Velocity Tools Utility Library</td>
</tr>
<tr>
<td>MVEL</td>
<td>2.0.19</td>
<td>mvel-2.0.19.jar <span class="red">*</span></td>
<td><a target="_blank" href="http://mvel.codehaus.org/">MVEL</a></td>
<td>MVEL Expression Language Library</td>
</tr>
<tr>
<td>Common Language</td>
<td>2.5</td>
<td>commons-lang-2.5.jar <span class="red">*</span></td>
<td><a target="_blank" href="http://jakarta.apache.org/commons/">Jakarta Commons</a></td>
<td>General Language Utilities Library</td>
</tr>
<tr>
<td>Common FileUpload</td>
<td>1.2.1</td>
<td>commons-fileupload-1.2.1.jar <span class="red">*</span></td>
<td><a target="_blank" href="http://jakarta.apache.org/commons/">Jakarta Commons</a></td>
<td>HTTP File Upload Library</td>
</tr>
<tr>
<td>Commons Codec</td>
<td>1.4</td>
<td>commons-codec-1.4.jar <span class="red">*</span></td>
<td><a target="_blank" href="http://jakarta.apache.org/commons/">Jakarta Commons</a></td>
<td>Encoding Decoding Library</td>
</tr>
<tr>
<td>Commons Collections</td>
<td>3.2.1</td>
<td>commons-collections-3.2.1.jar <span class="red">*</span></td>
<td><a target="_blank" href="http://jakarta.apache.org/commons/">Jakarta Commons</a></td>
<td>Collection Utilities Library</td>
</tr>
<tr>
<td>Common IO</td>
<td>2.0.1</td>
<td>commons-io-2.0.1.jar <span class="red">*</span></td>
<td><a target="_blank" href="http://jakarta.apache.org/commons/">Jakarta Commons</a></td>
<td>IO Utilities Library</td>
</tr>
</table>
<span class="red">*</span> : marked JAR libraries or Java source are included in the
<tt>click.jar</tt> file.
<p/>
<span class="red">**</span> : marked JAR libraries or Java source are included in both
the <tt>click.jar</tt> and <tt>click-nodeps.jar</tt> files.
<p/>
The standard <tt>click-xx.jar</tt> includes all of the listed dependencies.<br/>
Alternatively use the <tt>click-nodeps-xx.jar</tt> which includes none of these
dependencies (except dependencies marked with <span class="red">**</span>, which
are included in both jars).
<p/>
<a name="extras-dependencies"></a><h2>4.&nbsp; Extras Dependencies</h2>
The Click Extras has the following runtime dependencies in addition to the
Framework dependencies.
<p/>
<b>Please note:</b> a runtime dependency is only required if you use the specific
library. For example, if you use Hibernate, you need hibernate.jar on your
classpath, otherwise it is not needed.
<table style="border: 1px solid black; margin: 1em 0em;" cellspacing="0" cellpadding="6">
<tr style="background-color: navy; color: white;">
<th>Library</th>
<th>Version</th>
<th>JAR</th>
<th>Author</th>
<th>Description</th>
</tr>
<tr>
<td>Cayenne</td>
<td>3.0</td>
<td>cayenne-server-3.0.jar</td>
<td><a target="_blank" href="http://cayenne.apache.org/">Apache Cayenne</a></td>
<td>ORM Framework</td>
</tr>
<tr>
<td>Freemarker</td>
<td>2.3.16</td>
<td>freemarker-2.3.16.jar</td>
<td><a target="_blank" href="http://freemarker.sourceforge.net/">Freemarker</a></td>
<td>Alternate Template Engine to Velocity</td>
</tr>
<tr>
<td>Hibernate</td>
<td>3.2.6</td>
<td>hibernate-3.2.6.ga.jar</td>
<td><a target="_blank" href="http://www.hibernate.org/">Hibernate</a></td>
<td>ORM Framework</td>
</tr>
<tr>
<td>Log4J</td>
<td>1.2.17</td>
<td>log4j-1.2.17.jar</td>
<td><a target="_blank" href="http://logging.apache.org/log4j/">Log4j</a></td>
<td>Logging Framework</td>
</tr>
<tr>
<td>Spring</td>
<td>2.5.6</td>
<td >spring-2.5.6.jar</td>
<td><a target="_blank" href="http://www.springframework.org/">Spring Framework</a></td>
<td>IoC Framework</td>
</tr>
<tr>
<td>Prototype</td>
<td>1.6.1</td>
<td>JavaScript source<span class="red">*</span></td>
<td><a target="_blank" href="http://www.prototypejs.org/">Prototype Org</a></td>
<td>JavaScript library</td>
</tr>
<tr>
<td>script.aculo.us</td>
<td>1.8.3</td>
<td>JavaScript source<span class="red">*</span></td>
<td><a target="_blank" href="http://script.aculo.us/">script.aculo.us</a></td>
<td>JavaScript library</td>
</tr>
</table>
<span class="red">*</span> : marked JavaScript sources are included in the
<tt>click-extras.jar</tt> file.
<p/>
<a name="third-party-licensing-issues"></a><h2>5.&nbsp; Third-party Licensing Issues</h2>
<ul>
<li><a target="_blank" class="external" href="http://www.hibernate.org/">Hibernate</a>
is licensed under the Lesser GNU Public License, which is a more restrictive license
than the Apache Software License used by Apache Click. The restriction only
really applies when you try and redistribute a modified version of Hibernate
and should not affect the majority of users. Please see their
<a target="_blank" class="external" href="http://hibernate.org/356.html">FAQ</a>
for more detail.
<p/>
Because of these licensing issues, the Hibernate package can optionally be
excluded from the Click Extras build. Please see <tt>build.properties</tt>
for details.
</li>
</ul>
<!-- FOOTER -->
<div id="footer">
<hr/>
<p>
<a target='_blank' href='http://www.apache.org' title='Apache Software Foundation'>
<img id="asf-logo" src="http://www.apache.org/images/asf-logo.gif" alt="Apache Software Foundation"/>
</a>
Copyright &copy; 2001-2013 Apache Software Foundation. Apache Click,
Click, Apache, the Apache feather logo, and the Apache Click project logo are
trademarks of The Apache Software Foundation.
<a href="http://cayenne.apache.org/privacy-policy.html">Privacy policy.</a>
</p>
</div>
</body>
</html>