当前位置:网站首页>搭建Tigase进行二次开发
搭建Tigase进行二次开发
2022-08-09 09:26:00 【心中要有一片海】
一、导入tigase到eclipse
1、通过git克隆项目到本地。
git地址 https://repository.tigase.org/git/tigase-server.git。打开 window->show View->other,选择Git Repositories点击OK,在左下角就会看到Git Repositories。点击clone,
将上面的git地址复制进去。一直next,最后finish。
等待一段时间后,就将tigase克隆到本地了。
如果已经安装好了git,并将git 添加到了环境变量中,直接用命令行提示符输入git clone https://repository.tigase.org/git/tigase-server.git 也是可以直接将项目克隆到本地
将
2、使用eclipse 将项目导入
file->import->Existing maven projects
browse->选择tigase路径->finish
导入之后会报错
首先tigase-server依赖tigase-utils,而tigase-utils又依赖tigase-xmltools,所以需要将tigase-utils和tigase-xmltools加入本地maven仓库
git地址分别是:https://repository.tigase.org/git/tigase-utils.git https://repository.tigase.org/git/tigase-xmltools.git
将项目拉取下来之后,在命令行提示符里面定位到项目目录,在项目根目录执行mvn install(需要安装maven并将maven添加到环境变量中,如果是linux安装完maven后,就可以直接使用了),由于tigase-utils依赖tigase-xmltools,所以先将tigase-xmltools安装到本地maven仓库,再安装tigase-utils
还有一个错误要解决,报错信息:Plugin execution not covered by lifecycle configuration: org.codehaus.gmaven:gmaven-plugin:1.5:execute (execution: gitver, phase: validate)
解决办法可以看这里:http://stackoverflow.com/a/13733232/3079390
就是将<plugins>...</plugins>转换成<pluginManagement><plugins>...</plugins></pluginManagement>
这样错误应该就解决了。
二、创建数据库
我这里使用的是Mysql数据库在tigase-server根目录中执行./scripts/db-create-mysql.sh tigase_username tigase_password database_name root_username root_password database_host (除了”./scripts/db-create-mysql.sh“,后面字段根据自己情况填写)。我这里使用的是linux系统,所以直接运行shell脚本就可以创建。如果是windows系统,可以安装cygwin来运行
执行完后登陆mysql查看是否创建成功了。
三、运行
在/tigase-server/src/main/java/tigase/server/XMPPServer.java 上右键->Run As->Java Application然后会报错,因为还有一些东西没有配置再次右键->Run As->Run configurations填写下面的配置Program arguments:
--property-file etc/init.properties
Vm arguments:
-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Djdbc.drivers=com.mysql.jdbc.Driver -server -Xms100M -Xmx200M -XX:PermSize=32m -XX:MaxPermSize=256m -XX:MaxDirectMemorySize=128m
修改etc/ini.properties文件
--virt-hosts = reason-sz.no-ip.org
--user-db-uri = jdbc:mysql://localhost/tigasedb?user=tigase&password=tigase12&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true
--user-db = mysql
--admins = [email protected]
config-type = --gen-config-all
--cluster-mode = true
sess-man/plugins-conf/presence/auto-authorize=true
sess-man/plugins-conf/jabber\:iq\:roster/auto-authorize=true
sess-man/plugins-conf/auto-authorize=true
c2s/processors[s]=urn:xmpp:sm:3
--sm-plugins = +message-archive-xep-0136,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,+jabber:iq:register,+jabber:iq:roster,+presence,+jabber:iq:privacy,+jabber:iq:version,+http://jabber.org/protocol/stats,+starttls,+msgoffline,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,+pep,-zlib
--debug = server,xmpp.impl
--virt-hosts = reason-sz.no-ip.org是我自己定义的虚拟主机域名,具体根据自己的实际情况定义
出现问题java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
在将连接mysql的jar包add to path
再次运行,应该就不会报错了。
边栏推荐
- Redis Basics
- Do you know the principles of test cases and how to write defect reports?
- JMeter初探五-配置元件与参数化
- 游戏测试的概念是什么?测试方法和流程有哪些?
- 接口测试的概念、目的、流程、测试方法有哪些?
- 4.泛型和工具类
- 8.递归遍历和删除案例
- Venture DAO Industry Research Report: Macro and Classic Case Analysis, Model Summary, Future Suggestions
- 8.Properties属性集合
- What are the basic concepts of performance testing?What knowledge do you need to master to perform performance testing?
猜你喜欢
随机推荐
功能自动化测试实施的原则以及方法有哪些?
div模拟textarea文本框,输入文字高度自适应,且实现字数统计和限制
Domestic with Google earth software, see the download 19th level high-resolution satellite images so easy!
1.流的概念
Onnx - environment build 】 【 tensorrt
These 12 GIS software are better than the other
LPP代码及其注释
【个人学习总结】CRC校验原理及实现
A Practical Guide to Building OWL Ontologies using Protege4 and CO-ODE Tools - Version 1.3 (7.4 Annotation Properties - Annotation Properties)
类 对象 属性 方法 类的成员
迭代
5.转换流
JS报错-Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on...
年薪40W测试工程师成长之路,你在哪个阶段?
TestNG使用教程详解
【机器学习】网络爬虫实战详解
常用功能测试的检查点与用例设计思路
接口测试的基础流程和用例设计方法你知道吗?
列表
“摄像头用不了”+win8.1+DELL+外置摄像头+USB免驱的解决办法