<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>


    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <!--        <version>2.1.1.RELEASE</version>-->
        <version>2.2.6.RELEASE</version>
        <relativePath/>
    </parent>

    <groupId>cn.superdesk.uniorder</groupId>
    <artifactId>superdesk-operation-center</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>pom</packaging>


    <modules>
        <module>superdesk-uniorder-common</module>
        <module>superdesk-uniorder-common-mq-kafka</module>
        <module>superdesk-uniorder-common-mq-redis</module>
        <module>superdesk-uniorder-common-json</module>
        <module>superdesk-uniorder-common-xml</module>
        <module>superdesk-uniorder-common-queue</module>

        <module>superdesk-uniorder-dto</module>
        <module>superdesk-uniorder-dao</module>
        <module>superdesk-uniorder-service</module>

        <module>superdesk-uniorder-dubbo-facade</module>
        <module>superdesk-uniorder-dubbo-provider</module>
        <module>superdesk-uniorder-dubbo-consumer</module>

        <module>superdesk-uniorder-web</module>
        <module>superdesk-uniorder-openapi</module>
        <module>superdesk-uniorder-openapicall</module>
        <module>superdesk-uniorder-openapicall-thirdpart-szhtxx-electronicInvoice-dto</module>
        <module>superdesk-uniorder-openapicall-thirdpart-szhtxx-paperInvoice-dto</module>

        <module>superdesk-uniorder-xxl-job-admin</module>

        <module>superdesk-uniorder-executor</module>
    </modules>


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <compiler.jdk.version>1.8</compiler.jdk.version>

        <!-- 2.2.6.RELEASE 2.1.1.RELEASE -->
        <spring-boot.version>2.2.6.RELEASE</spring-boot.version>

        <!--		<dubbo-spring-boot>1.0.1</dubbo-spring-boot>-->
        <lombok.version>1.18.12</lombok.version>

        <hutool.version>5.4.3</hutool.version>

        <!--		太新 升级有问题 start -->
        <!--		<dubbo.version>2.6.2</dubbo.version>-->
        <!--		<spring-boot.version>2.0.5.RELEASE</spring-boot.version>-->
        <!--		<spring-boot.version>2.2.6.RELEASE</spring-boot.version>-->
        <!--		<dubbo.version>2.7.6</dubbo.version>-->
        <!--		太新 升级有问题 end -->


        <!-- 2.3.3.RELEASE new
        2.0.9.RELEASE springboot 2.1.1.RELEASE
        2.0.16.Final  springboot 2.2.5.RELEASE
        -->
        <!--        <undertow.version>2.1.1.RELEASE</undertow.version>-->
        <!--		<undertow-final.version>2.1.1.Final</undertow-core.version>-->
        <!--        <tomcat.version>9.0.13</tomcat.version>-->

        <dubbo.version>2.6.5</dubbo.version>


        <!-- spring版本号 -->
        <!--		<spring.version>5.0.7.RELEASE</spring.version>-->
        <!--		<spring-data-redis.version>2.0.8.RELEASE</spring-data-redis.version>-->

        <!-- 数据库 -->
        <!--<mysql.version>8.0.19</mysql.version>-->
        <sharding-jdbc.version>1.4.1</sharding-jdbc.version>

        <!-- mybatis版本号 -->
        <mybatis.version>3.4.6</mybatis.version>
        <mybatis-spring.version>1.3.1</mybatis-spring.version>
        <mybatis-plus.version>2.3</mybatis-plus.version>

        <pagehelper.version>5.1.10</pagehelper.version>

        <!-- log4j日志文件管理包版本 -->
        <slf4j.version>1.7.25</slf4j.version>
        <!--<log4j.version>2.11.0</log4j.version>-->


        <!-- 1.1.10 -->
        <druid.version>1.1.21</druid.version>

        <!-- 2.9.5 2.13.0 -->
        <jackson.version>2.13.0</jackson.version>
        <!-- 1.2.47 up 1.2.68-->
        <fastjson.version>2.0.29</fastjson.version>


        <motan.version>1.1.1</motan.version>

        <!-- -->
        <netty-version>4.1.25.Final</netty-version>
        <lettuce.version>5.0.4.RELEASE</lettuce.version>
        <okhttp.version>3.10.0</okhttp.version>
        <mail.version>1.6.1</mail.version>
        <redisson.version>3.7.1</redisson.version>
        <poi.version>3.17</poi.version>
        <jxl.version>2.6.12</jxl.version>
        <xfire.version>1.2.6</xfire.version>
        <jsch.version>0.1.54</jsch.version>
        <zxing.version>3.3.2</zxing.version>
        <ip2region.version>1.7.2</ip2region.version>

        <zookeeper.version>3.4.12</zookeeper.version>
        <shiro.version>1.4.0</shiro.version>
        <quartz.version>2.3.0</quartz.version>
        <aspectj.version>1.9.1</aspectj.version>
        <pinyin4j.version>2.5.1</pinyin4j.version>
        <activemq.version>5.13.3</activemq.version>
        <jsqlparser.version>0.9.5</jsqlparser.version>

        <!-- TODO swagger 3.0.0 2.9.2  2.8.0 -->
        <swagger.version>3.0.0</swagger.version>
        <springfox.version>2.6.1</springfox.version>

        <thumbnailator.version>0.4.8</thumbnailator.version>
        <javassist.version>3.22.0-GA</javassist.version>

        <superdesk.libs.version>1.3.1-SNAPSHOT</superdesk.libs.version>

        <docker.image.prefix>superdesk-uniorder</docker.image.prefix>

        <xxl-job.version>2.3.0</xxl-job.version>

        <!-- 2.0.1 -->
        <!-- 3.0.2 -->
        <knife4j.version>3.0.3</knife4j.version>
    </properties>


    <!--	<dependencyManagement>-->
    <!--		<dependencies>-->
    <!--			&lt;!&ndash; Spring Boot &ndash;&gt;-->
    <!--			&lt;!&ndash;			<dependency>&ndash;&gt;-->
    <!--			&lt;!&ndash;				<groupId>org.springframework.boot</groupId>&ndash;&gt;-->
    <!--			&lt;!&ndash;				<artifactId>spring-boot-dependencies</artifactId>&ndash;&gt;-->
    <!--			&lt;!&ndash;				<version>${spring-boot.version}</version>&ndash;&gt;-->
    <!--			&lt;!&ndash;				<type>pom</type>&ndash;&gt;-->
    <!--			&lt;!&ndash;				<scope>import</scope>&ndash;&gt;-->
    <!--			&lt;!&ndash;			</dependency>&ndash;&gt;-->

    <!--			&lt;!&ndash; Dubbo dependencies &ndash;&gt;-->
    <!--			<dependency>-->
    <!--				<groupId>com.alibaba</groupId>-->
    <!--				<artifactId>dubbo-dependencies-bom</artifactId>-->
    <!--				<version>${dubbo.version}</version>-->
    <!--				<type>pom</type>-->
    <!--				<scope>import</scope>-->
    <!--			</dependency>-->
    <!--		</dependencies>-->
    <!--	</dependencyManagement>-->


    <dependencies>

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

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
        </dependency>

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>${swagger.version}</version>
        </dependency>

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>${swagger.version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

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

        <dependency>
            <groupId>com.github.pagehelper</groupId>
            <artifactId>pagehelper</artifactId>
            <version>${pagehelper.version}</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

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

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
        </dependency>

        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
            <!--            <version>2.0.2</version>-->
            <version>1.4.01</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/apache-xerces/xml-apis -->
        <!--        <dependency>-->
        <!--            <groupId>apache-xerces</groupId>-->
        <!--            <artifactId>xml-apis</artifactId>-->
        <!--            <version>2.9.1</version>-->
        <!--        </dependency>-->


        <!-- JWT -->
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt</artifactId>
            <version>0.9.0</version>
        </dependency>
        <dependency>
            <groupId>axis</groupId>
            <artifactId>axis</artifactId>
            <version>1.4</version>
        </dependency>


        <!-- alibaba工具包 -->
        <dependency>
            <groupId>com.alibaba.fastjson2</groupId>
            <artifactId>fastjson2</artifactId>
            <version>${fastjson.version}</version>
        </dependency>
        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.4</version>
            <classifier>jdk15</classifier>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
        <!--        <dependency>-->
        <!--            <groupId>org.json</groupId>-->
        <!--            <artifactId>json</artifactId>-->
        <!--        </dependency>-->

        <dependency>
            <groupId>net.iharder</groupId>
            <artifactId>base64</artifactId>
            <version>2.3.8</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpmime -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mybatis.generator</groupId>
            <artifactId>mybatis-generator-core</artifactId>
            <!-- <version>1.3.6</version>-->
            <version>1.4.0</version>
            <scope>test</scope>
        </dependency>


        <!-- https://mvnrepository.com/artifact/cn.hutool/hutool-all -->
        <!--		<dependency>-->
        <!--			<groupId>cn.hutool</groupId>-->
        <!--			<artifactId>hutool-all</artifactId>-->
        <!--			<version>5.3.9</version>-->
        <!--		</dependency>-->

        <!-- https://mvnrepository.com/artifact/cn.hutool/hutool-core -->
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-core</artifactId>
            <version>${hutool.version}</version>
        </dependency>
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-json</artifactId>
            <version>${hutool.version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/cn.hutool/hutool-poi -->
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-poi</artifactId>
            <version>${hutool.version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>4.1.2</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/cn.hutool/hutool-extra -->
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-extra</artifactId>
            <version>${hutool.version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.github.houbb/iexcel -->
        <dependency>
            <groupId>com.github.houbb</groupId>
            <artifactId>iexcel</artifactId>
            <version>0.0.9</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax.mail/mail -->
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4.7</version>
        </dependency>


    </dependencies>

    <profiles>
        <profile>
            <id>docker</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.spotify</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>application.properties</include>
                    <include>application-*.properties</include>
                    <include>wechat.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>*.xml</include>
                    <include>**/*.xml</include>
                    <include>*.jks</include>
                    <include>templates/**</include>
                    <include>metadata.json</include>
                    <include>static/**</include>
                </includes>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <configuration>
                        <encoding>utf-8</encoding>
                        <useDefaultDelimiters>true</useDefaultDelimiters>
                        <nonFilteredFileExtensions>
                            <nonFilteredFileExtension>jks</nonFilteredFileExtension>
                        </nonFilteredFileExtensions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.spotify</groupId>
                    <artifactId>docker-maven-plugin</artifactId>
                    <version>1.1.1</version>
                    <executions>
                        <execution>
                            <id>build-image</id>
                            <phase>package</phase>
                            <goals>
                                <goal>build</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>tag-image</id>
                            <phase>package</phase>
                            <goals>
                                <goal>tag</goal>
                            </goals>
                            <configuration>
                                <image>${docker.image.prefix}/${project.artifactId}</image>
                                <newName>${docker.image.prefix}/${project.artifactId}</newName>
                                <forceTags>true</forceTags>
                            </configuration>
                        </execution>
                        <execution>
                            <id>push-image</id>
                            <phase>install</phase>
                            <goals>
                                <goal>push</goal>
                            </goals>
                            <configuration>
                                <imageName>${docker.image.prefix}/${project.artifactId}</imageName>
                            </configuration>
                        </execution>
                    </executions>
                    <configuration>
                        <imageName>${docker.image.prefix}/${project.artifactId}</imageName>
                        <imageTags>
                            <imageTag>${project.version}</imageTag>
                            <imageTag>latest</imageTag>
                        </imageTags>
                        <forceTags>true</forceTags>
                        <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
                        <resources>
                            <resource>
                                <targetPath>/</targetPath>
                                <directory>${project.build.directory}</directory>
                                <include>${project.build.finalName}.jar</include>
                                <filtering>true</filtering>
                            </resource>
                        </resources>
                        <pushImage>false</pushImage>
                        <pushImageTag>false</pushImageTag>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${compiler.jdk.version}</source>
                    <target>${compiler.jdk.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <!--                    <compilerArguments>-->
                    <!--                        <bootclasspath>-->
                    <!--                            ${java.home}/lib/rt.jar;${java.home}/jre/lib/jce.jar;${java.home}/jre/lib/jsse.jar-->
                    <!--                        </bootclasspath>-->
                    <!--                    </compilerArguments>-->
                </configuration>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <repository>
            <id>nexus-releases</id>
            <!--<name>Project RELEASE</name>-->
            <url>https://nexus.superdesk.cn/repository/maven-releases</url>
        </repository>
        <snapshotRepository>
            <id>nexus-snapshots</id>
            <!--<name>Porject SNAPSHOTS</name>-->
            <url>https://nexus.superdesk.cn/repository/maven-snapshots</url>
        </snapshotRepository>
    </distributionManagement>


</project>
