<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>cn.wildfirechat</groupId>
	<artifactId>app</artifactId>
	<version>0.64</version>
	<packaging>jar</packaging>

	<name>app</name>
	<description>Demo project for Wildfire chat app server</description>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.10.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<java.version>1.8</java.version>
		<log4j2.version>2.17.2</log4j2.version>
		<wfc.sdk.version>1.0</wfc.sdk.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-rest</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
		</dependency>

		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>8.0.28</version>
		</dependency>

		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.8.9</version>
		</dependency>

		<dependency>
			<groupId>com.google.protobuf</groupId>
			<artifactId>protobuf-java</artifactId>
			<version>2.5.0</version>
		</dependency>

		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-slf4j-impl</artifactId>
			<version>${log4j2.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
			<version>${log4j2.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<version>${log4j2.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-to-slf4j</artifactId>
			<version>${log4j2.version}</version>
		</dependency>

		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.7</version>
		</dependency>

		<dependency>
			<groupId>com.googlecode.json-simple</groupId>
			<artifactId>json-simple</artifactId>
			<version>1.1.1</version>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.5</version>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.7.5</version>
		</dependency>


		<dependency>
			<groupId>commons-httpclient</groupId>
			<artifactId>commons-httpclient</artifactId>
			<version>3.1</version>
		</dependency>

		<dependency>
			<groupId>uk.org.lidalia</groupId>
			<artifactId>slf4j-test</artifactId>
			<version>1.0.0-jdk6</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>1.9.5</version>
			<type>jar</type>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>com.tencentcloudapi</groupId>
			<artifactId>tencentcloud-sdk-java-sms</artifactId>
			<version>3.1.410</version>
		</dependency>

		<dependency>
			<groupId>cn.wildfirechat</groupId>
			<artifactId>sdk</artifactId>
			<version>${wfc.sdk.version}</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/src/lib/sdk-${wfc.sdk.version}.jar</systemPath>
		</dependency>

		<dependency>
			<groupId>cn.wildfirechat</groupId>
			<artifactId>common</artifactId>
			<version>${wfc.sdk.version}</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/src/lib/common-${wfc.sdk.version}.jar</systemPath>
		</dependency>


		<dependency>
			<groupId>com.aliyun</groupId>
			<artifactId>aliyun-java-sdk-core</artifactId>
			<version>4.1.0</version>
		</dependency>

		<dependency>
			<groupId>com.qiniu</groupId>
			<artifactId>qiniu-java-sdk</artifactId>
			<version>7.3.0</version>
		</dependency>

		<dependency>
			<groupId>com.aliyun.oss</groupId>
			<artifactId>aliyun-sdk-oss</artifactId>
			<version>3.10.2</version>
		</dependency>

		<dependency>
			<groupId>io.minio</groupId>
			<artifactId>minio</artifactId>
			<version>7.0.2</version>
		</dependency>

		<dependency>
			<groupId>com.qcloud</groupId>
			<artifactId>cos_api</artifactId>
			<version>5.6.28</version>
		</dependency>

		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>25.1-jre</version>
		</dependency>

		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-spring</artifactId>
			<version>1.7.1</version>
		</dependency>

		<dependency>
			<groupId>ws.schild</groupId>
			<artifactId>jave-core</artifactId>
			<version>2.7.3</version>
		</dependency>

		<dependency>
			<groupId>ws.schild</groupId>
			<artifactId>jave-nativebin-linux64</artifactId>
			<version>2.7.3</version>
		</dependency>

<!--		为了减少包的大小，ws.schild只打包目标架构的库。如果您使用非Linux，请把上面注释掉，然后下面打开自己平台-->

<!--		<dependency>-->
<!--			<groupId>ws.schild</groupId>-->
<!--			<artifactId>jave-nativebin-win64</artifactId>-->
<!--			<version>2.7.3</version>-->
<!--		</dependency>-->

<!--		<dependency>-->
<!--			<groupId>ws.schild</groupId>-->
<!--			<artifactId>jave-nativebin-osx64</artifactId>-->
<!--			<version>2.7.3</version>-->
<!--		</dependency>-->

<!--		<dependency>-->
<!--			<groupId>ws.schild</groupId>-->
<!--			<artifactId>jave-all-deps</artifactId>-->
<!--			<version>2.7.3</version>-->
<!--		</dependency>-->

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-mail</artifactId>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<includeSystemScope>true</includeSystemScope>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>jdeb</artifactId>
				<groupId>org.vafer</groupId>
				<version>1.8</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jdeb</goal>
						</goals>
						<configuration>
							<controlDir>${project.basedir}/deb/control</controlDir>
							<skipPOMs>false</skipPOMs>
							<deb>${project.build.directory}/app-server-${project.version}.deb</deb>
							<dataSet>
								<data>
									<src>${project.build.directory}/${project.name}-${project.version}.jar</src>
									<type>file</type>
									<mapper>
										<type>perm</type>
										<prefix>/opt/app-server</prefix>
									</mapper>
								</data>
								<data>
									<src>${project.basedir}/config</src>
									<type>directory</type>
									<mapper>
										<type>perm</type>
										<prefix>/opt/app-server/config</prefix>
									</mapper>
								</data>
								<data>
									<src>${project.basedir}/systemd/app-server.service</src>
									<type>file</type>
									<mapper>
										<type>perm</type>
										<prefix>/usr/lib/systemd/system</prefix>
									</mapper>
								</data>
							</dataSet>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!--        RPM Plugin 开始-->
			<!--        打包RPM 包需要本地有rpm命令才可以，linux和mac都可以安装rpm。如果是windows需要cygwin安装rpm才可以，如果需要rpm包，可以把这个plugin取消注释-->
<!--			<plugin>-->
<!--				<groupId>org.codehaus.mojo</groupId>-->
<!--				<artifactId>rpm-maven-plugin</artifactId>-->
<!--				<version>2.2.0</version>-->
<!--				<executions>-->
<!--					<execution>-->
<!--						<id>generate-rpm</id>-->
<!--						<goals>-->
<!--							<goal>rpm</goal>-->
<!--						</goals>-->
<!--					</execution>-->
<!--				</executions>-->
<!--				<configuration>-->
<!--					<group>Applications/Chat</group>-->
<!--					<name>app-server</name>-->
<!--					<needarch>noarch</needarch>-->
<!--					<targetOS>linux</targetOS>-->
<!--					<prefix>/opt/app-server</prefix>-->
<!--					<defineStatements>-->
<!--						<defineStatement>_unpackaged_files_terminate_build 0</defineStatement>-->
<!--					</defineStatements>-->
<!--					<copyTo>-->
<!--						target/app-server-${project.version}.rpm-->
<!--					</copyTo>-->
<!--					<requires>-->
<!--						<require>java-1.8.0-openjdk-headless</require>-->
<!--					</requires>-->
<!--					<mappings>-->
<!--						<mapping>-->
<!--							<directory>/opt/app-server</directory>-->
<!--							<filemode>755</filemode>-->
<!--							<sources>-->
<!--								<source>-->
<!--									<location>${project.build.directory}/${project.name}-${project.version}.jar</location>-->
<!--								</source>-->
<!--							</sources>-->
<!--						</mapping>-->
<!--						<mapping>-->
<!--							<directory>/opt/app-server/config</directory>-->
<!--							<filemode>755</filemode>-->
<!--							<sources>-->
<!--								<source>-->
<!--									<location>${project.basedir}/config</location>-->
<!--								</source>-->
<!--							</sources>-->
<!--						</mapping>-->
<!--						<mapping>-->
<!--							<directory>/usr/lib/systemd/system</directory>-->
<!--							<filemode>644</filemode>-->
<!--							<username>root</username>-->
<!--							<groupname>root</groupname>-->
<!--							<directoryIncluded>false</directoryIncluded>-->
<!--							<sources>-->
<!--								<source>-->
<!--									<location>${project.basedir}/systemd/app-server.service</location>-->
<!--								</source>-->
<!--							</sources>-->
<!--						</mapping>-->
<!--					</mappings>-->
<!--					<postinstallScriptlet>-->
<!--						<script>-->
<!--							mv -f /opt/app-server/app-*.jar /opt/app-server/app-server.jar ; echo "Im server installed in /opt/app-server" ; systemctl daemon-reload-->
<!--						</script>-->
<!--					</postinstallScriptlet>-->
<!--					<postremoveScriptlet>-->
<!--						<script>-->
<!--							echo "Remove files..." ; cd /opt/app-server ; rm -rf * ; rm -rf /usr/lib/systemd/system/app-server.service ; systemctl daemon-reload-->
<!--						</script>-->
<!--					</postremoveScriptlet>-->
<!--				</configuration>-->
<!--			</plugin>-->
			<!--            RPM Plugin 结束-->

		</plugins>
	</build>

</project>
