1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-01 01:35:59 +01:00
Smack/build
Matt Tucker dee9b8a297 Fixing version in Javadoc.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7007 b35dd754-fafc-0310-a699-88a17e54d16e
2007-02-06 20:08:19 +00:00
..
merge Initial version. SMACK-112 2006-01-16 17:26:31 +00:00
projects Updates for release. 2007-02-04 21:24:51 +00:00
resources Updated date. 2007-02-06 17:51:49 +00:00
ant Add junit to classpath. 2003-08-02 17:32:23 +00:00
ant-contrib.jar Initial check-in. 2003-04-05 01:13:16 +00:00
ant.bat Updated ant.bat to run 2006-02-16 20:18:18 +00:00
ant.jar Upgrading to ant 1.5.4 2003-09-28 18:44:28 +00:00
build.properties Added support for a messenger test suite. To write messenger-assuming tests, just use the MessengerXXXTest.java naming convention. From the build dir call 'ant test.messenger'. All host/port/user properties have default values in build.xml and you should edit the values in build.properties to match your environment. 2003-08-19 17:44:45 +00:00
build.xml Fixing version in Javadoc. 2007-02-06 20:08:19 +00:00
junit.jar Add junit to classpath. 2003-08-02 17:32:23 +00:00
README.html Updates for release. 2007-02-04 21:24:51 +00:00
release.xml Changing src name. 2007-02-06 19:30:53 +00:00

<!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.org/smack/">
http://www.jivesoftware.org/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 5 (JDK 1.5 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.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 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:
	<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.5
					</code><font face="verdana, arial, helvetica" size=2>
					<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></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> Windows 
			<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>
	</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 Smack source code.
The build directory is the "target/classes" directory under your Smack 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 Smack class files into a JAR file (smack.jar)
that is suitable for adding
into the classpath of an application server.
<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 Smack 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 Smack distribution directory by deleting compiled class files, the
smack.jar file and Javadoc files.<p>

<p>[<a href="#tasks">return to task list</a>]
</ul>

</body>
</html>