source-build.html 8.88 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
<!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>