-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathINSTALL
91 lines (63 loc) · 3.54 KB
/
INSTALL
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
This section explains how to compile and deploy the onesocialweb plugin in an
Ignite’s Openfire server installation.
Last updated April 12th 2010.
1. Pre-requisites
=================
In order to build the code of the onesocialweb plugin you will need the following:
- A JDK with Java 1.5 compliance or higher.
- The Ant Java build tool.
- The source code of the Openfire server, and to compile them. Please refer to: http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/source-build.html
- A properly configured installation of the Openfire server in which to deploy the plugin. Please see: http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/install-guide.html
2. Getting the code from the repository
=======================================
The source code of the onesocialweb plugin can be obtained from the Github repository.
git clone http://github.com/onesocialweb/openfire-plugin.git
The high level folder should have the following structure:
- /src
- /lib
- changelog.html
- license.html
- plugin.xml
- readme.html
3. Compiling the plugin
=======================
Once the plugin source code is in your local system, place the high level
folder into the /src/plugins folder of your Openfire source. You probably want
to rename the directory or use a symbolic name with a different name
(e.g. call it 'onesocialweb' instead of 'openfire-plugin')
After that, you can invoke via command line the plugin task in the
/build/build.xml file of the Openfire source
ant plugin –Dplugin=onesocialweb (or whatever the name of the folder in /plugins)
This will compile the onesocialweb plugin source and package it into a
jar file. You will find it in the /target/openfire/plugins folder of your
Openfire source.
4. Deploying
============
Once the plugin jar file has been built you can now place it in the
/plugins directory of your Openfire installation. The jar file will be
extracted and initialized by Openfire.
5. Working with the code - Project dependencies
===============================================
If you wish to dive into the code of the onesocialweb plugin, you can go
ahead and create an Eclipse project and name it ‘openfire-plugin’, for example.
Select the high-level plugin source code folder as the src folder of the
Eclipse Project (Create Project from Existing Source).
As you will find, the plugin requires classes in the Openfire server API,
so you will also need to create an Eclipse project for the Openfire server
and add it to the classpath (Buildpath) of your plugin project.
6. Remote Process and XML debugging
===================================
Ignite’s Openfire source is shipped with the xmldebugger plugin, which you
can also compile and deploy in your sever installation. This will print the
XML traffic on your server to the server’s console, and it is a nice way for
you to see how Profile and Activity querying and publishing in OneSocialWeb
looks like in terms of XMPP stanzas.
You can also setup remote debugging to the Openfire server and by placing
breakpoints into the onesocialweb plugin code you could follow the execution
of a bit of code that interests you. For this, start the Openfire sever in
remote debug mode; for example:
java -Xdebug -Xint -server -Xnoagent –
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -jar ..\lib\startup.jar
and create a Remote Java Application Debug Configuration in Eclipse,
indicating the onesocialweb plugin project as the source, as well as the
address and remote debugging port of your Openfire server.