当前位置:网站首页>搭建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 = truesess-man/plugins-conf/presence/auto-authorize=truesess-man/plugins-conf/jabber\:iq\:roster/auto-authorize=truesess-man/plugins-conf/auto-authorize=truec2s/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
再次运行,应该就不会报错了。
边栏推荐
- 2.字节流
- 本体开发日记05-努力理解SWRL(Built-Ins)
- What are the basic concepts of performance testing?What knowledge do you need to master to perform performance testing?
- 通用的测试用例编写大全(登录测试/web测试等)
- 3.编码方式
- 3.练习Thread
- 7.FileFilter接口
- Do you know the basic process and use case design method of interface testing?
- 接口测试的概念、目的、流程、测试方法有哪些?
- Ontology Development Diary 05-Strive to Understand SWRL (Part 2)
猜你喜欢
随机推荐
初窥门径代码起手,Go lang1.18入门精炼教程,由白丁入鸿儒,首次运行golang程序EP01
7.FileFilter接口
The div simulates the textarea text box, the height of the input text is adaptive, and the word count and limit are implemented
使用Protege4和CO-ODE工具构建OWL本体的实用指南-1.3版本(4.Building An OWL Ontology)
本体开发日记05-努力理解SWRL(上)
[Pytorch] Install mish_cuda
你一定要看的安装及卸载测试用例的步骤及方法总结
map去重代码实现
7.Collections工具类
【个人学习总结】CRC校验原理及实现
软件测试分析流程及输出项包括哪些内容?
seata处理分布式事务
可以写进简历的软件测试项目实战经验(包含电商、银行、app等)
第四讲 SVN
MySQL event_single event_timed loop event
Redis Basics
MySQL lock
6.File类
栈的实现之用链表实现
运行flutter项目时遇到的问题










