Initial check-in.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1810 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-01-17 20:28:53 +00:00 committed by mtucker
parent bd07f5a9aa
commit 44ab0fb8fa
1 changed files with 314 additions and 0 deletions

314
build/README.html Normal file
View File

@ -0,0 +1,314 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Smack Source Distribution</title>
<style type="text/css">
BODY {
font-size : 100%;
}
BODY, TD, TH {
font-family : tahoma, verdana, arial, helvetica, sans-serif;
font-size : 0.8em;
}
A:hover {
text-decoration : none;
}
.pageheader {
font-family : arial, helvetica, sans-serif;
font-size : 14pt;
font-weight: bold;
}
.header {
font-family : arial, helvetica, sans-serif;
font-size : 12pt;
font-weight: bold;
}
.subheader {
font-weight: bold;
color: #600;
}
.path {
color : #3333cc;
}
.question {
font-style : italic;
}
.answer {
padding-left : 15px;
}
.code {
font-family : courier new;
border : 1px #ccc solid;
padding : 6px;
margin : 5px 20px 5px 20px;
}
TT {
font-family : courier new;
font-weight : bold;
color : #060;
}
PRE, CODE {
font-family : courier new;
font-size : 100%;
}
.footer {
font-size : 0.8em;
color : #666;
text-align : center;
}
</style>
</head>
<body bgcolor="#ffffff">
<font size=4>
Smack Source Distribution<br>
</font><br>
<p>
This document provides detailed information for developers that wish to
compile and make changes to the Smack source code.
<p>For additional developer resources, please visit:
<a href="http://www.jivesoftware.com/xmpp/smack/">
http://www.jivesoftware.com/xmpp/smack/</a>. The Smack build process is based on Ant. Visit the
<a href="http://jakarta.apache.org/ant/index.html">Ant website</a>
for more information. There is no need to download and install Ant - a version of it is included
in this distribution.
<p>
This documentation is divided into two sections:
<ol>
<li> <a href="#setup">Setup</a> -- how to setup your environment for Smack development.
<li> <a href="#tasks">Build tasks</a> -- tasks that can be performed using the build program.
</ol>
<p><a name="setup"><b><font color="#0066cc">1.</font> Setup Your Environment</b></a><p>
Getting your machine ready for Smack development requires a few steps. Wherever
possible, instructions are provided for both Unix/Linux and Windows users.
<p>
<b><a name="javaSetup">Configure Java</a></b>
<ul>
Java 2 (JDK 1.2 or later) must be installed and setup on your machine. To test the installation,
open a shell in a Unix or a MS-DOS prompt in Windows. Check your version of
Java with "java -version" -- it must version 1.2 or greater.
If Java isn't installed, download a copy from the
<a href="http://java.sun.com/">Java website</a>.
<p>
<font color="red">Important!</font> -- the Jive Forums build tool needs to know
where Java is installed on your system. You must configure the "JAVA_HOME"
environment variable to point to the correct directory. Instructions on
how to set this variable for various platforms are as follows:
<p>
<ul>
<li> Unix/Linux
<ol>
<li>Edit the ".profile" file in your home directory (or
corresponding file for your shell).
<li>Set the JAVA_HOME environment variable by adding the
following line to the file:
<p></font><code>
export JAVA_HOME=/usr/local/jdk1.3
</code><font face="verdana, arial, helvetica" size=2>
<p>
The value "/usr/local/jdk1.3" should be replaced with your actual
Java directory. Be sure there are no spaces after the end of
the directory name. Do not add an extra slash after the directory name.
<li>Save changes to the file and then "source" it:
<p></font><code>
source .profile
</code><font face="verdana, arial, helvetica" size=2>
<p>
The JAVA_HOME variable should now be configured correctly.
</ol>
<p>
<li> WindowsNT/2000
<ol>
<li>Navigate to your desktop and right click on "My Computer";
choose properties.
<li>Select the "Advanced" tab and click on the
"Environment Variables" button.
<li>Click the "New..." button in the System variables section.
Enter the variable name "JAVA_HOME" and set the variable
value to the full path of your Java installation. For example,
"c:\jdk1.3". Be sure to not add an extra slash to the end
of the directory name.
<li>Click "OK" in all of the menus to accept the changes.
<li>Close any open command prompt windows. The next time you
open a command prompt, the "JAVA_HOME" variable will be set
correctly.
</ol>
<p>
<li> Windows95/98
<ol>
<li>Open your autoexec.bat file (often at "c:\autoexec.bat") using Notepad.
<li>Add a line to the end of the file that resembles the following:
<p></font><code>
set JAVA_HOME=c:\jdk1.3
</code><font face="verdana, arial, helvetica" size=2>
<p>
The value "c:\jdk1.3" should be replaced with your actual
Java directory. Be sure there are no spaces between
the "=" sign or after the end of the directory name. Do
not add an extra slash after the directory name.
<li>Save changes to autoexec.bat and restart your computer.
</ol>
</ul>
</ul>
<p><b><a name="checkout">Test the Build Script</a></b><p>
<ul>
Navigate into the subdirectory of this distribution named "build" via the command-line.<p>
<table boder=0 cellpadding=2 cellspacing=0><td bgcolor="#EEEEEE">
<font face="verdana, arial, helvetica" size=2>
<font color="red">Linux/Unix users only:</font>You must make the ant script
executable. From the build directory, type:
<p></font><code>
chmod u+x ant
</code><font face="verdana, arial, helvetica" size=2>
</td></table>
<p>
Now, invoke the build tool to compile the Smack source code
<p>
Windows:</font><code> ant <br>
</code><font face="verdana, arial, helvetica" size=2>
Unix/Linux:</font><code> ./ant
</code><font face="verdana, arial, helvetica" size=2>
<p>
If the build tool is invoked correctly and Smack compiles, you've correctly
configured your copy of the Smack developer distribution.
</ul>
<p><b>Finished!</b><p>
<ul>
If you've gotten this far, you've finished setting up the Smack developer
distribution. Now, read below to learn about all of the tasks that you can perform
with the build tool.
</ul>
<br><br>
<p><b><a name="tasks"><font color="#0066cc">2.</font> Build Tasks</a></b><p>
The list of build tasks is below. All build commands should be
run from the "build" directory of your Smack distribution.
<br><br>
For a list of the commands and a brief description from the command line, type
<code>ant -projecthelp</code>. For more complete help, read the documentation below.
<br><br>
To execute a build task, type <code>ant [options] targetname</code> where "targetname" is
one of the targets listed below:
<ul>
<li><a href="#noparams"><i>Default</i></a>
<li><a href="#compile">compile</a>
<li><a href="#jar">jar</a>
<li><a href="#javadoc">javadoc</a>
<li><a href="#clean">clean</a>
</ul>
<p>
Each task is documented with a syntax guide and description. Optional paramaters
for each task are enclosed with braces.
<!--COMPILE-->
<p><b><a name="noparams"><i>Default</i></a></b>
<ul>
<i>Syntax:</i><p>
</font><code>
ant<br>
</code><font face="verdana, arial, helvetica" size=2>
<p><i>Description:</i></p>
Equivalent of calling "ant <a href="#jar">jar</a>".
<p>[<a href="#tasks">return to task list</a>]
</ul>
<!--COMPILE-->
<p><b><a name="compile">compile</a></b>
<ul>
<i>Syntax:</i><p>
</font><code>
ant compile <br>
</code><font face="verdana, arial, helvetica" size=2>
<p><i>Description:</i></p>
Compiles all the Jive Forums source code.
The build directory is the "classes" directory under your Jive Forums source distribution.
<p>[<a href="#tasks">return to task list</a>]
</ul>
<!--JAR-->
<p><b><a name="jar">jar</a></b>
<ul>
<i>Syntax:</i><p>
</font><code>
ant jar <br>
</code><font face="verdana, arial, helvetica" size=2>
<p><i>Description:</i></p>
Bundles the Jive Forums class files into two JAR files (jivebase.jar and jiveforums.jar)
that are suitable for adding
into the classpath of an application server.
The resulting files are copied into build/WEB-INF/lib. To deploy
the JAR files, use the <a href="#deployjar">deployjar</a> task.
<p>[<a href="#tasks">return to task list</a>]
</ul>
<!--JAVADOC-->
<p><b><a name="javadoc">javadoc</a></b>
<ul>
<i>Syntax:</i><p>
</font><code>
ant javadoc <br>
</code><font face="verdana, arial, helvetica" size=2>
<p><i>Description:</i></p>
JavaDocs all Jive Forums source code in the source directory.
<p>[<a href="#tasks">return to task list</a>]
</ul>
<!--CLEAN-->
<p><b><a name="clean">clean</a></b>
<ul>
<i>Syntax:</i><p>
</font><code>
ant clean<br>
</code><font face="verdana, arial, helvetica" size=2>
<p><i>Description:</i></p>
Cleans your Jive Forums distribution directory by deleting compiled class files, the
jive.jar file and Javadoc files. If you specified alternate
destination directories for any of those files, you'll need to delete them
manually.<p>
<p>[<a href="#tasks">return to task list</a>]
</ul>
</body>
</html>