当前位置:网站首页>搭建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
再次运行,应该就不会报错了。
边栏推荐
猜你喜欢

本体开发日记04-努力理解protege的某个方面

div模拟textarea文本框,输入文字高度自适应,且实现字数统计和限制

The div simulates the textarea text box, the height of the input text is adaptive, and the word count and limit are implemented

年薪40W测试工程师成长之路,你在哪个阶段?

Do you know the basic process and use case design method of interface testing?

接口测试的概念、目的、流程、测试方法有哪些?
功能自动化测试实施的原则以及方法有哪些?

列表
What does the test plan include?What is the purpose and meaning?

【百日行动】炎炎夏日安全不松懈 消防培训“加满”安全知识“油”
随机推荐
游戏测试的概念是什么?测试方法和流程有哪些?
米斗APP逆向分析
MySQL transaction isolation
自动化测试简历编写应该注意哪方面?有哪些技巧?
Do you know the principles of test cases and how to write defect reports?
What are the basic concepts of performance testing?What knowledge do you need to master to perform performance testing?
网络安全入门基础:IP地址
Onnx - environment build 】 【 tensorrt
本体开发日记05-努力理解SWRL(上)
“摄像头用不了”+win8.1+DELL+外置摄像头+USB免驱的解决办法
字典
软件测试面试思路技巧和方法分享,学到就是赚到
Django实现对数据库数据增删改查(一)
条件和递归
Redis high availability
本体开发日记04-努力理解protege的某个方面
3.编码方式
Another implementation of lateral view explode
本体开发日记05-努力理解SWRL(下)
软件测试面试题目:请你列举几个物品的测试方法怎么说?





