<?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.yanzuoguang</groupId>
    <artifactId>yzg-util</artifactId>
    <packaging>pom</packaging>
    <version>1.3-SNAPSHOT</version>

    <modules>
        <module>yzg-util-base</module>
        <module>yzg-util-db</module>
        <module>yzg-util-cloud</module>
        <module>yzg-util-mq</module>
        <module>yzg-util-image</module>
        <!--        <module>yzg-util-image-extend</module>-->
        <module>yzg-util-print</module>
        <module>yzg-util-chinese</module>
        <module>yzg-util-file</module>
        <module>yzg-util-redis</module>
        <module>yzg-util-wxxcx</module>
    </modules>

    <properties>

        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <junit.version>4.12</junit.version>
        <spring.cloud.version>Finchley.SR2</spring.cloud.version>
        <spring.boot.version>2.0.2.RELEASE</spring.boot.version>
        <fastjson.version>2.0.34</fastjson.version>
        <mysql.version>6.0.6</mysql.version>
        <poi.version>3.9</poi.version>
        <yzg.version>1.3-SNAPSHOT</yzg.version>
        <swagger.version>2.9.2</swagger.version>
        <guava.version>20.0</guava.version>
        <!--<jetcache.version>2.6.1</jetcache.version>-->
        <jetcache.version>2.6.0.M1</jetcache.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring.cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring.boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>${fastjson.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>
                <exclusions>
                    <exclusion>
                        <groupId>io.swagger</groupId>
                        <artifactId>swagger-models</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-models</artifactId>
                <version>1.5.21</version>
            </dependency>

            <dependency>
                <groupId>com.alicp.jetcache</groupId>
                <artifactId>jetcache-starter-redis</artifactId>
                <version>${jetcache.version}</version>
            </dependency>


            <dependency>
                <groupId>com.alicp.jetcache</groupId>
                <artifactId>jetcache-starter-redis-lettuce</artifactId>
                <version>${jetcache.version}</version>
            </dependency>

            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>${mysql.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-ooxml</artifactId>
                <version>${poi.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>

            <dependency>
                <groupId>com.yanzuoguang</groupId>
                <artifactId>yzg-util-base</artifactId>
                <version>${yzg.version}</version>
            </dependency>

            <dependency>
                <groupId>com.yanzuoguang</groupId>
                <artifactId>yzg-util-db</artifactId>
                <version>${yzg.version}</version>
            </dependency>

            <dependency>
                <groupId>com.yanzuoguang</groupId>
                <artifactId>yzg-util-cloud</artifactId>
                <version>${yzg.version}</version>
            </dependency>

            <dependency>
                <groupId>com.yanzuoguang</groupId>
                <artifactId>yzg-util-mq</artifactId>
                <version>${yzg.version}</version>
            </dependency>

            <dependency>
                <groupId>com.yanzuoguang</groupId>
                <artifactId>yzg-util-image</artifactId>
                <version>${yzg.version}</version>
            </dependency>

            <dependency>
                <groupId>com.yanzuoguang</groupId>
                <artifactId>yzg-util-image-extend</artifactId>
                <version>${yzg.version}</version>
            </dependency>

            <dependency>
                <groupId>com.yanzuoguang</groupId>
                <artifactId>yzg-util-print</artifactId>
                <version>${yzg.version}</version>
            </dependency>

            <dependency>
                <groupId>com.yanzuoguang</groupId>
                <artifactId>yzg-util-chinese</artifactId>
                <version>${yzg.version}</version>
            </dependency>

            <dependency>
                <groupId>com.yanzuoguang</groupId>
                <artifactId>yzg-util-file</artifactId>
                <version>${yzg.version}</version>
            </dependency>

            <dependency>
                <groupId>com.yanzuoguang</groupId>
                <artifactId>yzg-util-redis</artifactId>
                <version>${yzg.version}</version>
            </dependency>

            <dependency>
                <groupId>com.yanzuoguang</groupId>
                <artifactId>yzg-util-wxxcx</artifactId>
                <version>${yzg.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <distributionManagement>
        <repository>
            <id>public</id>
            <name>Nexus release Repository</name>
            <url>http://maven.tbd.yanzuoguang.com/repository/maven-releases/</url>
        </repository>
        <snapshotRepository>
            <id>public</id>
            <name>Nexus snapshots Repository</name>
            <url>http://maven.tbd.yanzuoguang.com/repository/maven-snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </testResource>
            <testResource>
                <directory>src/main/resources</directory>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
        </plugins>

        <finalName>${project.artifactId}</finalName>

        <pluginManagement>
            <plugins>
                <!-- springboot打包忽略Test单元测试 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.20.1</version>
                    <configuration>
                        <skipTests>true</skipTests>
                    </configuration>
                </plugin>

                <!-- ===========只打源码包,应用于公共组件打包=========== -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <configuration>
                        <overwrite>true</overwrite>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <compilerArgument>-parameters</compilerArgument>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                    <configuration>
                        <attach>true</attach>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- ===========可运行Jar包=========== -->
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>1.5.10.RELEASE</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>repackage</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>