一.下载源码
1.仓库地址 https://github.com/tigase 下载版本7.5.1 , master 8.0需要jdk高版本支持 所以不用了
二.修改maven 配置
<mirror>
<id>alimaven</id>
<mirrorOf>*,!tigase</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>
使用镜像去掉tiagse 加载 使用项目中
三.导入项目 tigase-server
修改配置仓库为
<repositories>
<repository>
<id>tigase</id>
<name>Tigase repository</name>
<url>http://maven-repo.tigase.org/repository/release</url>
</repository>
<repository>
<id>tigase-snapshot</id>
<name>Tigase repository</name>
<url>http://maven-repo.tigase.org/repository/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
四.手动添加依赖
pom添加依赖:
<!--整合mongodb 对应的是基础业务-->
<dependency>
<groupId>tigase</groupId>
<artifactId>tigase-mongodb</artifactId>
<version>1.1.0</version>
</dependency>
<!--整合群聊模块-->
<dependency>
<groupId>tigase</groupId>
<artifactId>tigase-muc</artifactId>
<version>2.4.2-SNAPSHOT</version>
</dependency>
<!--整合消息归档模块-->
<dependency>
<groupId>tigase</groupId>
<artifactId>tigase-message-archiving</artifactId>
<version>1.1.0</version>
</dependency>
<!-- <!–整合api模块–>
<dependency>
<groupId>tigase</groupId>
<artifactId>tigase-http-api-jetty</artifactId>
<version>1.0.0</version>
</dependency>-->
<!--添加mongodb驱动-->
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.6.4</version>
</dependency>
一.修改配置文件 init.properties
config-type=--gen-config-def
--admins=admin@192.168.2.149
--virt-hosts = 192.168.2.149
--debug=server
--comp-name-1=http
--comp-class-1=tigase.http.HttpMessageReceiver
http/setup/admin-credentials=admin:tigase
#数据库资源配置 可用mysql等其他存储 要加入 tigase-mongo 模块
--user-db=tigase.mongodb.MongoRepository
--auth-db=tigase.mongodb.MongoRepository
--user-db-uri=mongodb://127.0.0.1:27017/tigase
二.启动项目可以看到: 前提启动本地 mongo
mongodb 创建集合:
备注:官方文档地址 https://docs.tigase.net/