This document provides detailed information for developers that wish to compile and make changes to the Smack source code.
For additional developer resources, please visit: http://www.jivesoftware.org/smack/. The Smack build process is based on Ant. Visit the Ant website for more information and downloads.
This documentation is divided into two sections:
Getting your machine ready for Smack development requires a few steps. Wherever possible, instructions are provided for both Unix/Linux and Windows users.
Important! -- the Smack 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:
The value "/usr/local/jdk1.5" 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.
The JAVA_HOME variable should now be configured correctly.
export JAVA_HOME=/usr/local/jdk1.5
source .profile
Linux/Unix users only:You must make the ant script
executable. From the build directory, type:
chmod u+x ant
|
Now, invoke the build tool to compile the Smack source code
Windows:
If the build tool is invoked correctly and Smack compiles, you've correctly
configured your copy of the Smack developer distribution.
ant
Unix/Linux:
./ant
Finished!
The list of build tasks is below. All build commands should be
run from the "build" directory of your Smack distribution.
For a list of the commands and a brief description from the command line, type
ant -projecthelp
. For more complete help, read the documentation below.
To execute a build task, type ant [options] targetname
where "targetname" is
one of the targets listed below:
Each task is documented with a syntax guide and description. Optional paramaters for each task are enclosed with braces.
ant
Description:
Equivalent of calling "ant jar".
ant compile
Description:
Compiles all the Smack source code. The build directory is the "target/classes" directory under your Smack source distribution.
ant jar
Description:
Bundles the Smack class files into a JAR file (smack.jar) that is suitable for adding into the classpath of an application server.
ant javadoc
Description:
JavaDocs all Smack source code in the source directory.
ant clean
Description:
Cleans your Smack distribution directory by deleting compiled class files, the smack.jar file and Javadoc files.