<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.7.1</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
	<groupId>com.neotel</groupId>
	<artifactId>smf-core</artifactId>
	<version>${app.version}</version>
	<packaging>war</packaging>
	<name>smf-core</name>
	<description>SMF project for Spring Boot</description>
	<properties>
		<maven.build.timestamp.format>M.ddHHmm</maven.build.timestamp.format>
		<main.version>3.${maven.build.timestamp}</main.version>
		<app.version>${main.version}</app.version>
		<java.version>1.8</java.version>
		<jjwt.version>0.11.1</jjwt.version>
		<!-- oshi监控需要指定jna版本, 问题详见 https://github.com/oshi/oshi/issues/1040 -->
		<jna.version>5.8.0</jna.version>
		<hutool.version>5.3.4</hutool.version>
		<fastjson.version>1.2.70</fastjson.version>
		<swagger.version>2.9.2</swagger.version>
		<log4j2.version>2.17.0</log4j2.version>
		<classfinal.version>1.2.1</classfinal.version>
	</properties>
	<profiles>
		<profile>
			<id>prod</id>
			<properties>
				<!--这里定义package.environment这个变量-->
				<package.environment>prod</package.environment>
			</properties>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
		</profile>
	</profiles>
	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-mongodb</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-security</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
			<!--<exclusions>-->
				<!--<exclusion>-->
					<!--<groupId>org.springframework.boot</groupId>-->
					<!--<artifactId>spring-boot-starter-tomcat</artifactId>-->
				<!--</exclusion>-->
			<!--</exclusions>-->
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-configuration-processor</artifactId>
			<optional>true</optional>
		</dependency>
		<!--<dependency>-->
			<!--<groupId>org.springframework.boot</groupId>-->
			<!--<artifactId>spring-boot-starter-tomcat</artifactId>-->
			<!--<scope>provided</scope>-->
		<!--</dependency>-->

		<dependency>
			<!-- 排除 spring-boot-starter-logging -->
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-logging</artifactId>
			<exclusions>
				<exclusion>
					<groupId>*</groupId>
					<artifactId>*</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<!-- 其他依赖省略 -->
		<!-- 引入 Log4j2 https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-log4j2 -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-log4j2</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-websocket</artifactId>
		</dependency>


		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>

		<!-- jwt -->
		<dependency>
			<groupId>io.jsonwebtoken</groupId>
			<artifactId>jjwt-api</artifactId>
			<version>${jjwt.version}</version>
		</dependency>
		<dependency>
			<groupId>io.jsonwebtoken</groupId>
			<artifactId>jjwt-impl</artifactId>
			<version>${jjwt.version}</version>
		</dependency>
		<dependency>
			<groupId>io.jsonwebtoken</groupId>
			<artifactId>jjwt-jackson</artifactId>
			<version>${jjwt.version}</version>
		</dependency>

		<!--工具包-->
		<dependency>
			<groupId>cn.hutool</groupId>
			<artifactId>hutool-all</artifactId>
			<version>${hutool.version}</version>
		</dependency>

		<!-- fastjson -->
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
			<version>${fastjson.version}</version>
		</dependency>

		<!-- Swagger UI 相关 -->
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger2</artifactId>
			<version>${swagger.version}</version>
			<exclusions>
				<exclusion>
					<groupId>io.swagger</groupId>
					<artifactId>swagger-annotations</artifactId>
				</exclusion>
				<exclusion>
					<groupId>io.swagger</groupId>
					<artifactId>swagger-models</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger-ui</artifactId>
			<version>${swagger.version}</version>
		</dependency>
		<dependency>
			<groupId>io.swagger</groupId>
			<artifactId>swagger-annotations</artifactId>
			<version>1.5.21</version>
		</dependency>
		<dependency>
			<groupId>io.swagger</groupId>
			<artifactId>swagger-models</artifactId>
			<version>1.5.21</version>
		</dependency>

		<!-- excel工具 -->
<!--		<dependency>-->
<!--			<groupId>org.apache.poi</groupId>-->
<!--			<artifactId>poi</artifactId>-->
<!--			<version>3.17</version>-->
<!--		</dependency>-->
<!--		<dependency>-->
<!--			<groupId>org.apache.poi</groupId>-->
<!--			<artifactId>poi-ooxml</artifactId>-->
<!--			<version>3.17</version>-->
<!--		</dependency>-->
<!--		<dependency>-->
<!--			<groupId>xerces</groupId>-->
<!--			<artifactId>xercesImpl</artifactId>-->
<!--			<version>2.12.0</version>-->
<!--		</dependency>-->
		<!--mapStruct-->
		<dependency>
			<groupId>org.mapstruct</groupId>
			<artifactId>mapstruct</artifactId>
			<version>1.4.2.Final</version>
		</dependency>
		<dependency>
			<groupId>org.mapstruct</groupId>
			<artifactId>mapstruct-processor</artifactId>
			<version>1.4.2.Final</version>
		</dependency>
		<dependency>
			<groupId>org.mapstruct</groupId>
			<artifactId>mapstruct-jdk8</artifactId>
			<version>1.4.2.Final</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/org.apache.mina/mina-core -->
		<dependency>
			<groupId>org.apache.mina</groupId>
			<artifactId>mina-core</artifactId>
			<version>2.1.0</version>
		</dependency>
		<dependency>
			<groupId>org.samba.jcifs</groupId>
			<artifactId>jcifs</artifactId>
			<version>1.3.3</version>
		</dependency>
        <dependency>
            <groupId>com.lowagie</groupId>
            <artifactId>itext</artifactId>
            <version>2.1.7</version>
        </dependency>
		<dependency>
			<groupId>com.google.zxing</groupId>
			<artifactId>core</artifactId>
			<version>3.2.1</version>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>4.4</version>
		</dependency>
        <dependency>
            <groupId>com.mks.api</groupId>
            <artifactId>mksapi-jar</artifactId>
            <version>4.10.9049</version>
        </dependency>
		<dependency>
			<groupId>commons-httpclient</groupId>
			<artifactId>commons-httpclient</artifactId>
			<version>3.1</version>
		</dependency>

		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>easyexcel</artifactId>
			<version>3.1.1</version>
		</dependency>

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



	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<targetPath>META-INF/resources</targetPath>
				<includes>
					<include>*.*</include>
				</includes>
				<filtering>true</filtering>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<includes>
					<include>**/*.*</include>
				</includes>
				<filtering>true</filtering>
			</resource>
		</resources>

		<!--<finalName>-->
			<!--${project.artifactId}.${project.version}.${current.time}-->
		<!--</finalName>-->
		<!--</plugins>-->
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<excludes>
						<exclude>
							<groupId>org.projectlombok</groupId>
							<artifactId>lombok</artifactId>
						</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<configuration>
					<encoding>utf-8</encoding>
					<useDefaultDelimiters>false</useDefaultDelimiters>
					<delimiters>
						<delimiter>@</delimiter>
					</delimiters>
				</configuration>
			</plugin>
			<!--时间的时区-->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>3.0.0</version>
				<executions>
					<execution>
						<id>timestamp-property</id>
						<goals>
							<goal>timestamp-property</goal>
						</goals>
						<configuration>
							<name>current.time</name>
							<pattern>H</pattern>
							<timeZone>GMT+8</timeZone>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<!-- https://gitee.com/roseboy/classfinal -->
				<groupId>net.roseboy</groupId>
				<artifactId>classfinal-maven-plugin</artifactId>
				<version>${classfinal.version}</version>
				<configuration>
					<!--加密密码,如果是#号,则使用无密码模式加密,【加密后没有pom文件,不用担心泄漏】

					将加密后的war放在tomcat/webapps下, tomcat/bin/catalina 增加以下配置:

//linux下 catalina.sh
CATALINA_OPTS="$CATALINA_OPTS -javaagent:classfinal-fatjar.jar='-pwd 0000000'";
export CATALINA_OPTS;

//win下catalina.bat
set JAVA_OPTS="-javaagent:classfinal-fatjar.jar=-pwd 000000"
set "JAVA_OPTS=%JAVA_OPTS% -javaagent:classfinal-fatjar.jar='-nopwd'"

//参数说明
// -pwd      加密项目的密码
// -nopwd    无密码加密时启动加上此参数,跳过输密码过程
// -pwdname  环境变量中密码的名字
					-->
					<password>#</password>
					<!--					<code>F0CC84061C58DADF9AC3F20600C6EF6398CB5A55F9A086A9671136521C4B40CF5F7589F6D78A591D6456AA5055E1E9E9</code>-->
					<packages>com.neotel</packages>
					<cfgfiles>application.yml</cfgfiles>
					<excludes>org.spring</excludes>
					<!--                    <libjars>a.jar,b.jar</libjars>-->
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>classFinal</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>