<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Jive Messenger Source Instructions</title> <link href="style.css" rel="stylesheet" type="text/css"> <style type="text/css"> .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"> <h1>Jive Messenger Source Instructions</h1> <p> This document provides detailed information for developers that wish to compile and make changes to the Jive Messenger source code. Use of the source code is governed by the GPL or the commercial license you purchased for the codebase from Jive Software. <b>If Jive Messenger source is embedded into another application, that application must also be released under the Open Source GPL license (unless you have a commercial OEM license in place with Jive Software). Please see the license agreement for further details.</b>. Some of the source code in this package is Open Source software developed by third parties. Wherever this is the case, it is specifically noted in the source, and that source is governed by the license given to it by its author. <p>For additional developer resources, please visit: <a href="http://www.jivesoftware.org"> http://www.jivesoftware.org</a>. The Jive Messenger build process is based on Ant. Visit the <a href="http://ant.apache.org/">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 three sections: <ol> <li> <a href="#source">Source</a> -- get te Jive Messenger source code. <li> <a href="#setup">Setup</a> -- how to setup your environment for Jive Messenger development. <li> <a href="#tasks">Build tasks</a> -- tasks that can be performed using the build program. </ol> <p><a name="source"><b><font color="#0066cc">1.</font> Get the Jive Messenger Source</b></a><p> You can get the Jive Messenger source code by downloading a source distribution or by checking out the source code from CVS. Instructions for both options can be found on the <a href="http://www.jivesoftware.org/source.jsp">source page</a>. <p><a name="setup"><b><font color="#0066cc">2.</font> Setup Your Environment</b></a><p> Getting your machine ready for development requires a few steps. Wherever possible, instructions are provided for both Unix/Linux and Windows users. <p> <b><a name="javaSetup">Configure Java for Jive Messenger</a></b> <ul> Java 5 (JDK 1.5) 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.5 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 Messenger 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><span class="code"> export JAVA_HOME=/usr/local/jdk1.5 </span> <p> 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. <li>Save changes to the file and then "source" it: <p><span class="code"> source .profile </span> <p> The JAVA_HOME variable should now be configured correctly. </ol> <p> <li> WindowsNT/2000/XP <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.5". 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><span class="code"> set JAVA_HOME=c:\jdk1.5 </span> <p> The value "c:\jdk1.5" 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="ant">Install the Ant Build Tool</a></b><p> The Jive Messenger build process uses Ant, so that tool must be installed and configured on your computer. First download Ant from: <a href="http://ant.apache.org/">http://ant.apache.org</a>. Next, follow the <a href="http://ant.apache.org/manual/installlist.html">installation instructions</a>. <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 border="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> </td></table> <p> Now, invoke the build tool to compile the Jive Messenger source code <p> Windows:<span class="code"> ant <br> </span><br clear="left"> Unix/Linux:<span class="code"> ./ant </span> <p> If the build tool is invoked correctly and Jive Messenger compiles, you've correctly configured your copy of the Jive Messenger source distribution. </ul> <p><b>Finished!</b><p> <ul> If you've gotten this far, you've finished setting up the Jive Messenger source 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">3.</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 Jive Messenger 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 on several commands, 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="#jar">jar</a> <li><a href="#plugins">plugins</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. If you would like to permanently set the value of a property, add it to build/build.xml file. <!-- default --> <p><b><a name="noparams"><i>Default</i></a></b> <ul> <i>Syntax:</i><p> <span class="code"> ant <br></span> <p><i>Description:</i></p> Equivalent of calling "ant <a href="#jar">jar</a> javadoc". <p>[<a href="#tasks">return to task list</a>] </ul> <!--JAR--> <p><b><a name="jar">jar</a></b> <ul> <i>Syntax:</i><p> <span class="code"> ant jar <br></span> <p><i>Description:</i></p> Builds Jive Messenger into the <tt>target</tt> directory. You can then launch Jive Messenger using the scripts in <tt>target/bin/</tt>. <p>[<a href="#tasks">return to task list</a>] </ul> <!--PLUGINS--> <p><b><a name="jar">plugins</a></b> <ul> <i>Syntax:</i><p> <span class="code"> ant plugins <br></span> <p><i>Description:</i></p> Builds all plugins into the <tt>target/plugins</tt> 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> <span class="code"> ant clean <br></span> <p><i>Description:</i></p> Cleans all artifacts of the build process by deleting the <tt>target/</tt> directory.<p> <p>[<a href="#tasks">return to task list</a>] </ul> </body> </html>