<?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>com.malk</groupId>
    <artifactId>java-mcli</artifactId>
    <version>1.0-SNAPSHOT</version>

    <modules>
        <module>mjava</module>
        <module>mjava-hangshi</module>
        <module>mjava-guyuan</module>
        <module>mjava-mcli</module>
        <module>mjava-suodisi</module>
        <module>mjava-cloudpure</module>
        <module>mjava-zhuogao</module>
        <module>mjava-fengkaili</module>
        <module>mjava-gewu</module>
        <module>mjava-shangfeng</module>
        <module>mjava-pake</module>
        <module>mjava-yangu</module>
        <module>mjava-kuaikeli</module>
        <module>mjava-laidi</module>
        <module>mjava-luyi</module>
        <module>mjava-taisen</module>
        <module>mjava-hake</module>
        <module>majva-hongfengrenli</module>
        <module>mjava_hongfeng</module>
    </modules>
    <packaging>pom</packaging>

    <name>java-mcli</name>
    <description>mjava framework</description>

    <!-- 版本管理 Management -->
    <properties>
        <!-- mjava版本: 修改mjava pom配置 -->
        <mjava.version>0.0.3</mjava.version>
        <!-- 全局配置 -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <!-- 公共依赖 -->
        <spring-boot-dependencies.version>2.2.13.RELEASE</spring-boot-dependencies.version>
        <junit.verson>4.12</junit.verson>
        <lombok.version>1.18.8</lombok.version>
        <validation-api.version>2.0.1.Final</validation-api.version>
        <fastjson.version>1.2.83</fastjson.version>
        <commons-lang3.version>3.10</commons-lang3.version>
        <guava.version>30.1.1-jre</guava.version>
        <hutool-all.version>5.6.0</hutool-all.version>
        <spring-boot-starter-data-jpa.version>2.1.3.RELEASE</spring-boot-starter-data-jpa.version>
        <querydsl-apt.version>4.2.1</querydsl-apt.version>
        <querydsl-jpa.version>4.2.1</querydsl-jpa.version>
        <spring-boot-starter-jdbc.version>2.2.13.RELEASE</spring-boot-starter-jdbc.version>
        <easyexcel.version>2.2.7</easyexcel.version>
        <!-- 数据库连接 [仅mysql为全局依赖] -->
        <mysql-connector-java.version>8.0.22</mysql-connector-java.version>
        <mssql-jdbc.version>6.4.0.jre8</mssql-jdbc.version>
        <ojdbc6.version>11.2.0.4</ojdbc6.version>
        <mongo-java-driver.version>3.12.7</mongo-java-driver.version>
        <spring-boot-starter-data-mongodb.version>2.2.13.RELEASE</spring-boot-starter-data-mongodb.version>
        <!-- jsp [非全局依赖] -->
        <tomcat-embed-jasper.version>9.0.41</tomcat-embed-jasper.version>
        <jstl.version>1.2</jstl.version>
        <javax.servlet-api.version>4.0.1</javax.servlet-api.version>
        <javax.servlet.jsp-api.version>2.3.1</javax.servlet.jsp-api.version>
        <!-- jwt [非全局依赖] -->
        <java-jwt.version>3.4.0</java-jwt.version>
        <!-- swagger3: todo -->
        <springfox-boot-starter.version>3.0.0</springfox-boot-starter.version>
        <!-- 网页转pdf [非全局依赖] -->
        <flying-saucer-pdf-itext5.version>9.0.3</flying-saucer-pdf-itext5.version>
        <!-- 腾讯云[发票识别] [非全局依赖] -->
        <tencentcloud-sdk-java.version>3.1.778</tencentcloud-sdk-java.version>
        <!-- 不执行单元测试，也不编译测试类 -->
        <skipTests>true</skipTests>
        <!-- 不执行单元测试，但会编译测试类，并在target/test-classes目录下生成相应的class -->
        <maven.test.skip>true</maven.test.skip>
    </properties>

    <!-- 依赖声明 & 版本 -->
    <dependencyManagement>
        <dependencies>
            <!-- SpringBoot 依赖 -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot-dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- 单元测试 -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.verson}</version>
                <scope>test</scope>
            </dependency>

            <!-- lombok -->
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
                <scope>provided</scope>
            </dependency>

            <!-- validation 参数校验 -->
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>${validation-api.version}</version>
            </dependency>

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

            <!-- 通用的工具类集 -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons-lang3.version}</version>
            </dependency>
            <!-- ppExt: 23.10.26 钉钉新方式以Steam接入, HTTP形式commonsc-codec在升级之后，其内部做了一个validateCharacter校验. 使用 guava 替代-->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <!-- 国产工具集 -->
            <dependency>
                <groupId>cn.hutool</groupId>
                <artifactId>hutool-all</artifactId>
                <version>${hutool-all.version}</version>
            </dependency>

            <!-- data-jpa 数据库操作 -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-data-jpa</artifactId>
                <version>${spring-boot-starter-data-jpa.version}</version>
            </dependency>

            <!-- QueryDSL 4.x 支持-->
            <dependency>
                <groupId>com.querydsl</groupId>
                <artifactId>querydsl-apt</artifactId>
                <scope>provided</scope>
                <version>${querydsl-apt.version}</version>
            </dependency>
            <dependency>
                <groupId>com.querydsl</groupId>
                <artifactId>querydsl-jpa</artifactId>
                <version>${querydsl-jpa.version}</version>
            </dependency>

            <!-- AOP多数据源切换 -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-jdbc</artifactId>
                <version>${spring-boot-starter-jdbc.version}</version>
            </dependency>

            <!-- easyExcel 优化 poi [不影响单独引入poi, 会冲突] -->
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>easyexcel</artifactId>
                <version>${easyexcel.version}</version>
            </dependency>

            <!-- mySql 驱动 -->
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>${mysql-connector-java.version}</version>
            </dependency>

            <!-- sqlserver依赖 -->
            <dependency>
                <groupId>com.microsoft.sqlserver</groupId>
                <artifactId>mssql-jdbc</artifactId>
                <scope>runtime</scope>
                <version>${mssql-jdbc.version}</version>
            </dependency>

            <!-- Oracle 依赖 -->
            <dependency>
                <groupId>com.oracle.database.jdbc</groupId>
                <artifactId>ojdbc6</artifactId>
                <version>${ojdbc6.version}</version>
            </dependency>

            <!-- MongoDB 驱动 -->
            <dependency>
                <groupId>org.mongodb</groupId>
                <artifactId>mongo-java-driver</artifactId>
                <version>${mongo-java-driver.version}</version>
            </dependency>
            <!-- MongoDB jpa 操作 -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-data-mongodb</artifactId>
                <version>${spring-boot-starter-data-mongodb.version}</version>
            </dependency>

            <!-- url转pdf -->
            <dependency>
                <groupId>org.xhtmlrenderer</groupId>
                <artifactId>flying-saucer-pdf-itext5</artifactId>
                <version>${flying-saucer-pdf-itext5.version}</version>
            </dependency>

            <!-- jsp: tomcat-embed-jasper 需要添加到子项目内 -->
            <dependency>
                <groupId>org.apache.tomcat.embed</groupId>
                <artifactId>tomcat-embed-jasper</artifactId>
                <version>${tomcat-embed-jasper.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>jstl</artifactId>
                <version>${jstl.version}</version>
            </dependency>
            <!-- servlet -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>${javax.servlet-api.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet.jsp</groupId>
                <artifactId>javax.servlet.jsp-api</artifactId>
                <version>${javax.servlet.jsp-api.version}</version>
            </dependency>

            <!-- jwt -->
            <dependency>
                <groupId>com.auth0</groupId>
                <artifactId>java-jwt</artifactId>
                <version>${java-jwt.version}</version>
            </dependency>

            <!-- 腾讯云 -->
            <dependency>
                <groupId>com.tencentcloudapi</groupId>
                <artifactId>tencentcloud-sdk-java</artifactId>
                <version>${tencentcloud-sdk-java.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- 子项目需要与 mjava 相同的依赖, 否则调试可运行, 打包后会运行报错. 为了避免重复引入 pom, 将 mjava 依赖直接在全局 pom 引入 -->
    <dependencies>
        <!-- spring boot -->
        <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-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <!-- spring-boot-devtools [热部署] -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional> <!-- 表示依赖不会传递 -->
        </dependency>
        <!-- 单元测试 -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- lombok -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- validation 参数校验 -->
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
        </dependency>

        <!-- 阿里巴巴 json -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
        </dependency>

        <!-- 通用的工具类集 -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <!-- 国产工具集 -->
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
        </dependency>

        <!-- data-jpa 数据库操作 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

        <!-- QueryDSL 4.x 支持-->
        <dependency>
            <groupId>com.querydsl</groupId>
            <artifactId>querydsl-apt</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.querydsl</groupId>
            <artifactId>querydsl-jpa</artifactId>
        </dependency>

        <!-- AOP多数据源切换 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>

        <!-- easyExcel 优化 poi [不影响单独引入poi, 会冲突] -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>easyexcel</artifactId>
        </dependency>

        <!-- mySql 驱动 -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>

        <!-- Oracle 依赖 -->
        <!--        <dependency>-->
        <!--            <groupId>com.oracle.database.jdbc</groupId>-->
        <!--            <artifactId>ojdbc6</artifactId>-->
        <!--        </dependency>-->

        <!-- sqlserver 依赖 -->
        <!--        <dependency>-->
        <!--            <groupId>com.microsoft.sqlserver</groupId>-->
        <!--            <artifactId>mssql-jdbc</artifactId>-->
        <!--            <scope>runtime</scope>-->
        <!--        </dependency>-->


        <!-- MongoDB 驱动 -->
        <!--        <dependency>-->
        <!--            <groupId>org.mongodb</groupId>-->
        <!--            <artifactId>mongo-java-driver</artifactId>-->
        <!--        </dependency>-->
        <!-- MongoDB jpa 操作 -->
        <!--        <dependency>-->
        <!--            <groupId>org.springframework.boot</groupId>-->
        <!--            <artifactId>spring-boot-starter-data-mongodb</artifactId>-->
        <!--            <version>${spring-boot-starter-data-mongodb.version}</version>-->
        <!--        </dependency>-->

        <!-- url转pdf -->
        <!--        <dependency>-->
        <!--            <groupId>org.xhtmlrenderer</groupId>-->
        <!--            <artifactId>flying-saucer-pdf-itext5</artifactId>-->
        <!--        </dependency>-->

        <!-- jsp: tomcat-embed-jasper 需要在子项目内引用才有效 -->
        <!--        <dependency>-->
        <!--            <groupId>javax.servlet</groupId>-->
        <!--            <artifactId>jstl</artifactId>-->
        <!--        </dependency>-->
        <!-- servlet -->
        <!--        <dependency>-->
        <!--            <groupId>javax.servlet</groupId>-->
        <!--            <artifactId>javax.servlet-api</artifactId>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>javax.servlet.jsp</groupId>-->
        <!--            <artifactId>javax.servlet.jsp-api</artifactId>-->
        <!--        </dependency>-->

        <!-- jwt -->
        <!--        <dependency>-->
        <!--            <groupId>com.auth0</groupId>-->
        <!--            <artifactId>java-jwt</artifactId>-->
        <!--        </dependency>-->

        <!-- 腾讯云 [go to https://search.maven.org/search?q=tencentcloud-sdk-java and get the latest version.] -->
        <!--        <dependency>-->
        <!--            <groupId>com.tencentcloudapi</groupId>-->
        <!--            <artifactId>tencentcloud-sdk-java</artifactId>-->
        <!--        </dependency>-->
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <!-- jva使用了未经检查或不安全的操作，编译会有打印，通过插件显示具体报错警告位置, 如 T, Map, List 也会报警告 -->
                    <compilerArgument>-Xlint:unchecked</compilerArgument>
                </configuration>
            </plugin>
            <!-- QueryDSL 插件: 因为QueryDsl是类型安全的，所以还需要加上Maven APT plugin，使用 APT 自动生成Q类 -->
            <plugin>
                <groupId>com.mysema.maven</groupId>
                <artifactId>apt-maven-plugin</artifactId>
                <version>1.1.3</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>target/generated-sources/java</outputDirectory>
                            <processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>