1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-05 11:45:58 +01:00
Smack/build
2011-05-04 23:41:24 +00:00
..
build merged branch improve_bytestreams in trunk 2010-08-15 11:57:11 +00:00
merge Updated XPP to 1.1.4c. SMACK-259 2008-10-31 04:03:15 +00:00
projects Intellij 8 settings? 2008-11-13 18:33:07 +00:00
resources Updated all version info for 3.2 release. 2011-05-04 23:41:24 +00:00
ant-contrib.jar Initial check-in. 2003-04-05 01:13:16 +00:00
asm.jar add pmd for codecheck 2009-06-04 09:56:20 +00:00
build.properties cleanup 2010-02-18 13:41:01 +00:00
build.xml Updated all version info for 3.2 release. 2011-05-04 23:41:24 +00:00
javassist-3.10.0.GA.jar merged branch improve_bytestreams in trunk 2010-08-15 11:57:11 +00:00
jaxen.jar add pmd for codecheck 2009-06-04 09:56:20 +00:00
junit.jar Added support for multiple message bodies and language on the message. SMACK-99 2007-04-26 06:22:55 +00:00
mockito-all-1.8.2.jar merged branch improve_bytestreams in trunk 2010-08-15 11:57:11 +00:00
objenesis-1.1.jar merged branch improve_bytestreams in trunk 2010-08-15 11:57:11 +00:00
pmd.jar add pmd for codecheck 2009-06-04 09:56:20 +00:00
powermock-mockito-1.3.5-full.jar merged branch improve_bytestreams in trunk 2010-08-15 11:57:11 +00:00
README.html HTML and comment cleanup. Small API refactors. Moved use of StringBuffer to StringBuilder. 2008-11-03 16:28:57 +00:00
release.xml Remove jingle JAR that is no longer used. 2007-03-31 17:59:55 +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;
        }
        TT {
            font-family : courier new, monospace;
            font-weight : bold;
            color : #060;
        }
        PRE, CODE {
            font-family : courier new, monospace;
            font-size : 100%;
        }
    </style>
</head>

<body>

<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 and downloads.
<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><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.</font>
			</ol>
         </li>
         <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>

<b><a name="antSetup">Configure Ant</a></b>
<ul>
Download the Ant build tool from the <a href="http://ant.apache.org">Ant website</a>. Follow
the setup instructions for your operating system.
</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 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 Smack source code

<p>
<font face="verdana, arial, helvetica" size=2> 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.
</font>
</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>

<code>
ant<br>
</code>

<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>

<code>
ant compile <br>
</code>

<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>

<code>
ant jar <br>
</code>

<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>

<code>
ant javadoc <br>
</code>

<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>

<code>
ant clean<br>
</code>

<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>