SOURCE Building
:
Address: http://www.igniterealtime.org/downloads/source.jsp
Environment preparation
1th step: On the official website under the latest source code, here is 3.8.1. Unzip to get as shown:
2nd step: Create a new Java generic project name OpenFire on the IDE tool
3rd step: The extracted openfire_src directory under the source of all the files copied to this project, the example shown in the figure
Wait here for a moment and see the following:
There is an error message report in the project, do not worry. The reason is that some jar packages have not been added to the newly imported project. Keep looking down!
4th Step: Right click on the project selection properties, in the "Java Build Path" in the "Libraries" to add all the build/lib under the jar package. As shown in the following:
Note: There are three 3 packages under this LIB package, all add in:
5th step: After loading these jars, do not close the current window. Continue clicking on the Source tab
6th step: Click Add Folder ... Choose:
In order to facilitate the editing, the source code of the plug-in display, in the Properties folder select Source,add Folders, in the build path configuration /openfire_src/src/i18n ,/ Openfire_src/src/resources/jar ,/openfire_src/build/lib/dist folders are added to Source
7th step: For example, the error is due to the lack of coherence corresponding package: Coherence.jar, Coherence-work.jar Jartangosol.jar
These jars are http://www.oracle.com/technetwork/middleware/coherence/downloads/index.html. Available for download. Next, copy the three jar packages to:/openfire_src/src/plugins/clustering/lib.
8th step: Eclipse has integrated ant, so we only need to right-click on the/openfire_src/build/build.xml file, select Run as–> Ant build to complete the compilation, after the program is successful, the/OPENFIRE_SRC /The following directory generates two new folders: Target and work
9th Step: Configure startup Parameters
Choose Run–>run configurations ... Left Java application, right-click and select New:
Change the default name:new_configuration to:serverstarter
The Main class is configured as: Org.jivesoftware.openfire.starter.ServerStarter
Select the Arguments tab and fill in the VM arguments:
-dopenfirehome = " ${workspace_loc:openfire}/target/openfire "
Note: Project path ${workspace_loc:openfire}
Check the Common tab to hook Debug and run (easy to start quickly), then click Apply
The development model provided
-ddevelopmentmode= "true"
At this point the Opnefire source environment is built up.
OpenFire Source Learning Three: Building the source code in eclipse