中文版:

2009-01-11 13:33

Openfire 是由Jive Software 主导开发的一套功能非常强大的开源im 服务器(前身是wildfire),它基于XMPP 协议,完全用java实现,是一款非常优秀的服务器端软件。

一. 安装JDK(我使用的是JDK1.6), 不再详述
二. 安装 Eclipse 3.3(不再详述)
三. 安装Subversive插件
     Subversive是一款不错的svn插件,具体安装方法请参看我的另一篇文章《Eclipse中安装svn插件Subversive 》,链接 http://blog.csdn.net/zhenyucheung/archive/2008/03/19/2195518.aspx

四. check out openfire 源码
   1. 在eclipse中点击Windows->Open Perspective->Other
   2. 在弹出窗口中点击SVN Repository Exploring 然后点OK
   3. 在SVN Repositories 点右键,选择 New->Repository Location...
   4. 在弹出的New Repository Location页面,将http://svn.igniterealtime.org/svn/repos输入URL文本框, 点 Finish. 你将会看到页面出现URL地址.
   5. 展开URL地址
   6. 展开openfire树形结构
   7. 在trunk上点击右键,选择Check Out
   剩下的就是等待check out完成了 :)

五. 创建openfire工程
对使用过eclipse的人来说,这一步不用多说,这里仅列出几个需要注意的地方.
1. check out完毕后,eclipse会自动创建一个openfire工程,请把它删除(注意删除时不要删除content),否则你将不得不手动配置一些开发环境。
2. 用Create project from existing source新建工程,注意工程名要用openfire。

-----------------

自己创建工程:

五.创建Java项目,将源代码导入此项目中。在Eclipse中将此Java文件夹当成源代码文件夹新建工程。库都在Build目录的lib目录下,将openfire用到的库都添加到这个新建工程的Referenced Libraries中。

六. Build openfire
openfire是用ant构建的,所以要先设置使得eclipse中每次编译都使用内置的ant工具,保证编译的正确执行。
1. eclipse中点击Window->Show View->Ant
2. 在Ant 页面点右键,选择 Add Buildfiles...
3. 展开openfire/build文件夹,选择build.xml, 点 OK.
4. 在Ant页面, 展开Openfire XMPP Server,双击 openfire ant 任务

七. 创建项目Builder
1. 点击Run->Open Run Dialog...
2. 选择Java Application,点击 New 按钮
3. 在Run窗口的Main选项卡中, 修改Name文本框中的值,改成Openfire,其他名字亦可
4. 点Browse按钮,选择openfire, 点ok
5. 点Search按钮,选择Main class为org.jivesoftware.openfire.starter.ServerStarter,点OK。(这是openfire的启动类)
6. 点击进入Arguments选项卡
7. 在VM arguments文本框中输入 -DopenfireHome="${workspace_loc:openfire}/target/openfire",这个是用于eclipse执行java命令时传递的参数,这样openfire程序可以通过System.getProperty(“openfireHome”)得到 openfire的本地位置。
8. 点击进入Classpath选项卡
9. 点选User Entries,这样Advanced...就处于可用状态
10. 点击Advanced...按钮
11. 在Advanced Options页面,选择Add Folders, 点ok.
12. 选择openfire\src\i18n, 点ok将这个文件夹加入到class path,同样的方式把openfire\src\resources\jar也加到class path中。
13. 在Common选项卡中,点选Run复选框。

设置完毕,这样以后在run这个工程的时候就会按照正确的配置进行了.

英文版

  1. 下载安装JDK1.6

    • http://java.sun.com/javase/downloads/index.jsp
  2. 下载安装Eclipse 3.3
    • http://www.eclipse.org/downloads/
  3. 下载openfire源代码
    1. http http://www.igniterealtime.org/downloads/index.jsp
    2. svn http://svn.igniterealtime.org/svn/repos
  4. 创建openfire项目
    1. Select Java::Java Project and click Next.
    2. On the New Java Project window choose Create project from existing source and browse to where openfire folder is located under your workspace.
    3. In the Project name box enter exactly as openfire.
  5. 编译openfire
    1. Click Window::Show View::Ant menu.
    2. Right-click the Ant screen and choose Add Buildfiles…
    3. Expand the openfire::build folder and select build.xml, then click OK.
    4. On the Ant screen, expand the Openfire XMPP Server and double-click on openfire ant task. The build may fail because you’re checking out the daily updates of Openfire sources, which may contain bugs. If so, wait for another day and hope that the developers discover and fix the bug; or you might dare to fix it yourself. During this first time setup, a successful build is necessary before you can proceed with the remaining tasks below.
  6. 创建项目编译器
    1. Click Run::Open Run Dialog… or Run::Open Debug Dialog… menu. A Run window shows.
    2. Select Java Application and click on the New button.
    3. On the Main tab of the Run window, change the New_configuration name to Openfire or anything you like.
    4. Click on Project::Browse button and select openfire and click OK.
    5. Click on Main class::Search button and select ServerStarter – org.jivesoftware.openfire.starter and click OK.
    6. I’d suggest that you select Stop in main check box so that you could later verify that debugging works.
    7. Click on the Arguments tab.
    8. Enter -DopenfireHome=”${workspace_loc:openfire}/target/openfire” in the VM arguments box.
    9. Click on Classpath tab.
    10. Select User Entries so that the Advanced… button will be enabled.
    11. Click on the Advanced… button.
    12. On the Advanced Options window select Add Folders and click OK.
    13. On the Folder Selection window select openfire::src::i18n folder and click OK.
    14. Click on the Advanced… and Add Folders buttons once again to include openfire::src::resources::jar folder.
    15. Click on Common tab.
    16. Select the Debug and Run check box.
    17. Click on Apply button.
    18. Click on Close button.
  7. 运行/调试
    1. The setting is now complete for Openfire.
    2. You may test running and debugging by clicking on Run::Run History::Openfire and Run::Debug History::Openfire respectively. If you choose the later and if you follow this instruction closely, execution will stop on the main method in ServerStarter.java.

自己写的:

从这个网址下载源码:http://www.igniterealtime.org/downloads/source.jsp;

接下来在Eclipse中新建工程,将源码导入:

 接下来:

openfire是用ant构建的,所以要先设置使得eclipse中每次编译都使用内置的ant工具,保证编译的正确执行。
1. eclipse中点击Window->Show View->Ant
2. 在Ant 页面点右键,选择 Add Buildfiles...
3. 展开openfire/build文件夹,选择build.xml, 点 OK.
4. 在Ant页面, 展开Openfire XMPP Server,双击 openfire  任务

再接下来:(由于我的Eclipse的版本是3.4的,所以和上边中、英文中说的不一样。)

创建项目编译器的路径:

run-->Run configurations...

记录一下用ant编译openfire的过程:

Buildfile: D:\Mayframework框架\消息组件\openfire_src\build\build.xml init: [mkdir] Created dir: D:\Mayframework框架\消息组件\openfire_src\work [mkdir] Created dir: D:\Mayframework框架\消息组件\openfire_src\work\overlay\classes compile: [mkdir] Created dir: D:\Mayframework框架\消息组件\openfire_src\work\classes [javac] Compiling 634 source files to D:\Mayframework框架\消息组件\openfire_src\work\classes [javac] D:\Mayframework框架\消息组件\openfire_src\src\java\org\jivesoftware\openfire\sasl\SaslServerFactoryImpl.java:20: 警告:com.sun.security.sasl.util.PolicyUtils 是 Sun 的专用 API,可能会在未来版本中删除 [javac] import com.sun.security.sasl.util.PolicyUtils; [javac] ^ [javac] D:\Mayframework框架\消息组件\openfire_src\src\java\org\jivesoftware\openfire\sasl\SaslServerFactoryImpl.java:32: 警告:com.sun.security.sasl.util.PolicyUtils 是 Sun 的专用 API,可能会在未来版本中删除 [javac] private static final int mechPolicies[] = { PolicyUtils.NOANONYMOUS, PolicyUtils.NOANONYMOUS }; [javac] ^ [javac] D:\Mayframework框架\消息组件\openfire_src\src\java\org\jivesoftware\openfire\sasl\SaslServerFactoryImpl.java:32: 警告:com.sun.security.sasl.util.PolicyUtils 是 Sun 的专用 API,可能会在未来版本中删除 [javac] private static final int mechPolicies[] = { PolicyUtils.NOANONYMOUS, PolicyUtils.NOANONYMOUS }; [javac] ^ [javac] D:\Mayframework框架\消息组件\openfire_src\src\java\org\jivesoftware\openfire\sasl\SaslServerFactoryImpl.java:52: 警告:com.sun.security.sasl.util.PolicyUtils 是 Sun 的专用 API,可能会在未来版本中删除 [javac] if (mechanism.equals(myMechs[PLAIN]) && PolicyUtils.checkPolicy(mechPolicies[PLAIN], props)) { [javac] ^ [javac] D:\Mayframework框架\消息组件\openfire_src\src\java\org\jivesoftware\openfire\sasl\SaslServerFactoryImpl.java:58: 警告:com.sun.security.sasl.util.PolicyUtils 是 Sun 的专用 API,可能会在未来版本中删除 [javac] else if (mechanism.equals(myMechs[CLEARSPACE]) && PolicyUtils.checkPolicy(mechPolicies[CLEARSPACE], props)) { [javac] ^ [javac] D:\Mayframework框架\消息组件\openfire_src\src\java\org\jivesoftware\openfire\sasl\SaslServerFactoryImpl.java:74: 警告:com.sun.security.sasl.util.PolicyUtils 是 Sun 的专用 API,可能会在未来版本中删除 [javac] return PolicyUtils.filterMechs(myMechs, mechPolicies, props); [javac] ^ [javac] 注意:某些输入文件使用或覆盖了已过时的 API。 [javac] 注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。 [javac] 注意:某些输入文件使用了未经检查或不安全的操作。 [javac] 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。 [javac] 6 警告 [echo] Nothing to compile from custom here jspc: [mkdir] Created dir: D:\Mayframework框架\消息组件\openfire_src\work\jspc [mkdir] Created dir: D:\Mayframework框架\消息组件\openfire_src\work\jspc\java [mkdir] Created dir: D:\Mayframework框架\消息组件\openfire_src\work\jspc\classes [mkdir] Created dir: D:\Mayframework框架\消息组件\openfire_src\work\webapp -jspc-impl: [mkdir] Created dir: D:\Mayframework框架\消息组件\openfire_src\work\jspc\jsp [copy] Copying 275 files to D:\Mayframework框架\消息组件\openfire_src\work\jspc\jsp [javac] Compiling 106 source files to D:\Mayframework框架\消息组件\openfire_src\work\jspc\classes [javac] 注意:某些输入文件使用了未经检查或不安全的操作。 [javac] 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。 [copy] Copying 1 file to D:\Mayframework框架\消息组件\openfire_src\work\webapp\WEB-INF [copy] Copying 1 file to D:\Mayframework框架\消息组件\openfire_src\work\webapp\WEB-INF [copy] Copying 1 file to D:\Mayframework框架\消息组件\openfire_src\work\webapp\WEB-INF [copy] Copying 1 file to D:\Mayframework框架\消息组件\openfire_src\work\webapp\WEB-INF [jar] Building jar: D:\Mayframework框架\消息组件\openfire_src\work\jspc\admin-jsp.jar -i18n: [mkdir] Created dir: D:\Mayframework框架\消息组件\openfire_src\work\tempbuild\i18n [copy] Copying 1 file to D:\Mayframework框架\消息组件\openfire_src\work\tempbuild\i18n openfire: [mkdir] Created dir: D:\Mayframework框架\消息组件\openfire_src\work\lib [jar] Building jar: D:\Mayframework框架\消息组件\openfire_src\work\lib\openfire.jar [jar] META-INF/LICENSE.txt already added, skipping [jar] META-INF/LICENSE.txt already added, skipping [jar] META-INF/NOTICE.txt already added, skipping [jar] META-INF/LICENSE.txt already added, skipping [jar] META-INF/NOTICE.txt already added, skipping [jar] META-INF/LICENSE.txt already added, skipping [jar] META-INF/LICENSE.txt already added, skipping [jar] META-INF/LICENSE.txt already added, skipping [jar] META-INF/NOTICE.txt already added, skipping [jar] META-INF/LICENSE.jzlib.txt already added, skipping [jar] META-INF/LICENSE.slf4j.txt already added, skipping [jar] META-INF/LICENSE.springframework.txt already added, skipping [jar] META-INF/LICENSE.txt already added, skipping [jar] META-INF/NOTICE.txt already added, skipping [jar] META-INF/LICENSE.jzlib.txt already added, skipping [jar] META-INF/LICENSE.slf4j.txt already added, skipping [jar] META-INF/LICENSE.springframework.txt already added, skipping [jar] META-INF/LICENSE.txt already added, skipping [jar] META-INF/NOTICE.txt already added, skipping [jar] META-INF/License.txt already added, skipping [jar] Building jar: D:\Mayframework框架\消息组件\openfire_src\work\lib\startup.jar [copy] Copying 10 files to D:\Mayframework框架\消息组件\openfire_src\work\lib [copy] Copying 1 file to D:\Mayframework框架\消息组件\openfire_src\work\lib [copy] Copying 2 files to D:\Mayframework框架\消息组件\openfire_src\work\lib openfireHome: [mkdir] Created dir: D:\Mayframework框架\消息组件\openfire_src\target\openfire [copy] Copying 1 file to D:\Mayframework框架\消息组件\openfire_src\target\openfire [copy] Copying 138 files to D:\Mayframework框架\消息组件\openfire_src\target\openfire\resources [copy] Copying 3 files to D:\Mayframework框架\消息组件\openfire_src\target\openfire\resources [copy] Copying 4 files to D:\Mayframework框架\消息组件\openfire_src\target\openfire\resources [copy] Copying 15 files to D:\Mayframework框架\消息组件\openfire_src\target\openfire\lib adminPlugin: [copy] Copying 1 file to D:\Mayframework框架\消息组件\openfire_src\target\openfire\plugins [copy] Copying 154 files to D:\Mayframework框架\消息组件\openfire_src\target\openfire\plugins\admin\webapp [copy] Copying 4 files to D:\Mayframework框架\消息组件\openfire_src\target\openfire\plugins\admin\webapp [copy] Copying 1 file to D:\Mayframework框架\消息组件\openfire_src\target\openfire\plugins\admin\webapp\WEB-INF\lib spank: [mkdir] Created dir: D:\Mayframework框架\消息组件\openfire_src\target\openfire\resources\spank [copy] Copying 2 files to D:\Mayframework框架\消息组件\openfire_src\target\openfire\resources\spank [copy] Copying 1322 files to D:\Mayframework框架\消息组件\openfire_src\target\openfire [copy] Copied 133 empty directories to 2 empty directories under D:\Mayframework框架\消息组件\openfire_src\target\openfire [mkdir] Created dir: D:\Mayframework框架\消息组件\openfire_src\target\openfire\logs BUILD SUCCESSFUL Total time: 49 seconds

注:我把openfire的源文件放到路径:D:\Mayframework框架\消息组件下边了。

转载于:https://www.cnblogs.com/zhouxiuquan/archive/2010/04/28/1912367.html

openfire+elipse的导入配置相关推荐

  1. ASP.NET Aries 高级开发教程:Excel导入配置之规则说明(下)

    前言: 前面两篇都是大体介绍流程,有一些配置细节,没有细说,这里用一篇补上. 1.Excel配置项 起始行索引.列头跨行数: 对于自定义的Excel导入模板(有时候模板是由客户提供,模板的规则很乱)比 ...

  2. Openfire 的安装和配置

    1. 下载最新的openfire安装文件 官方下载站点:http://www.igniterealtime.org/downloads/index.jsp#openfire 下载地址: Exe:htt ...

  3. H3C系列交换机系统版本升级及导入配置

    1.H3C系列交换机系统版本升级 a.在用户视图下输入命令将TFTP服务器上的软件版本*********.bin下载到交换机的flash中 <H3C> tftp x.x.x.x get * ...

  4. QCC304x系列开发教程(实战篇)之4.2QCC3040之MDE按键导入配置

    查看全部教程开发请点击:高通蓝牙耳机QCC304x开发详解汇总(持续更新中) 查看本文全部文章请点击:QCC304x系列开发教程(实战篇)之4.2QCC3040之MDE按键导入配置 ========= ...

  5. 【PX4-AutoPilot教程-0】使用VMware虚拟机导入配置好的Ubuntu系统

    使用VMware虚拟机导入配置好的Ubuntu系统 此教程是根据阿木实验室提供的Ubuntu虚拟机的开发环境配置进行编写的. 阿木实验室[PX4飞控源码和QGC开发环境]内有VMware12,配置好环 ...

  6. juniper SSG 导出导入配置

    原文链接:https://blog.51cto.com/huangwenpeng/829417 导入导出配置是我们设备经常用到的地方,这篇文章是针对刚购买juniper ssg 系列的新用户制作的,希 ...

  7. @Import注解:导入配置类的四种方式源码解析

    微信搜索:码农StayUp 主页地址:https://gozhuyinglong.github.io 源码分享:https://github.com/gozhuyinglong/blog-demos ...

  8. Spring - @Import - 导入配置类

    目录 前言 普通类导入 @Configuration的配置类导入 ImportSelector 方式导入 前言 @Import注解用来导入配置类或一些需要前置加载的类,其可以通过快速导入的方式实现把实 ...

  9. Spring导入配置类或文件

    第一种 spring.factories 第二种 @Import(Config.class) 第三种 @ImportResource(locations = "classpath:appli ...

最新文章

  1. linux基于文本的配置工具,Linux基本配置和管理 3 ---- Linux命令行文本处理工具
  2. 静态分配内存和动态分配内存
  3. 异步调用WebService方式!
  4. C#看书笔记_02 核心C#
  5. 基于卷积神经网络的微表情识别研究需要注意的一些问题【未完待续】
  6. 结构体变量偏移量及大小计算
  7. Installshield 静默安装
  8. 实用的网页模板(一)
  9. ios 4.2.1完全越狱图文教程
  10. 日更第1天:Linux常用命令之dnf用法
  11. BTRFS - what makes BTRFS different?
  12. 看MySQL数据库的观后感,【看点·光】谈谈赏析和读后感(随笔)_mysql执行语句...
  13. 苹果电脑合并pdf文件最简单的方法?苹果电脑怎么把多个pdf文件合并成一个?
  14. TensorFlow团队:TensorFlow Probability的简单介绍
  15. 目不暇接 时尚艳丽的新款苹果手机 MAC APPLE
  16. 数学建模国赛论文怎么写?
  17. 人机交互-7-交互需求定义
  18. xpath提取当当网数学书前十页信息
  19. 丧心病狂,竟有Thread.sleep(0)这种写法?JAVA旭阳lv-5
  20. [经验总结]我的Doxygen配置文件

热门文章

  1. Color类提供的颜色
  2. 数据库访问性能优化法则
  3. 生成patch的diff命令是怎么写的?
  4. Idea 版本控制冲突解决
  5. 华视读卡器多浏览器插件_翻遍Chrome商店,这9款插件值得安装
  6. 关于python的垃圾回收机制_Python的垃圾回收机制
  7. plugin ‘org.springframework.boot:spring-boot-maven-plugin:‘not found
  8. container view_高级UI晋升之常用View(三)中篇
  9. 深度学习在医疗方面的应用 精准医学受追捧
  10. ubuntu16.04安装微信