<?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.github.zuihou</groupId>
    <artifactId>zuihou-admin-cloud</artifactId>
    <version>2.7.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <url>https://gitee.com/zuihou111/zuihou-cloud</url>
    <name>${project.artifactId}</name>
    <description>zuihou-admin-cloud</description>
    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>zuihou</name>
            <email>244387066@qq.com</email>
        </developer>
    </developers>

    <modules>
        <module>zuihou-public/zuihou-common</module>
        <module>zuihou-oauth</module>
        <module>zuihou-authority</module>
        <module>zuihou-tenant</module>
        <module>zuihou-msgs</module>
        <module>zuihou-file</module>
        <module>zuihou-gateway</module>
        <module>zuihou-jobs</module>
        <module>zuihou-support</module>
        <!-- 以下两个模块为测试模块 -->
        <module>zuihou-demo</module>
        <module>zuihou-order</module>
    </modules>

    <properties>
        <zuihou-commons.version>2.7.0</zuihou-commons.version>
        <zuihou-project.version>2.7.0-SNAPSHOT</zuihou-project.version>
        <seata.version>1.2.0</seata.version>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <docker.image.prefix>zuihou</docker.image.prefix>
        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
        <maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
        <maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
        <dockerfile-maven-plugin.version>1.4.12</dockerfile-maven-plugin.version>
        <spring-boot-maven-plugin.version>2.2.9.RELEASE</spring-boot-maven-plugin.version>
    </properties>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-dependencies</artifactId>
                <version>${zuihou-commons.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-boot</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-cache-starter</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-security-starter</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-core</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-databases</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-dozer-starter</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>

            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-injection-starter</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-j2cache-starter</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-jwt-starter</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-log-starter</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-mq-starter</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>

            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-swagger2-starter</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>

            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-validator-starter</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-xss-starter</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>

            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-cloud-starter</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.zuihou</groupId>
                <artifactId>zuihou-zipkin-client-starter</artifactId>
                <version>${zuihou-commons.version}</version>
            </dependency>

            <dependency>
                <groupId>io.seata</groupId>
                <artifactId>seata-spring-boot-starter</artifactId>
                <version>${seata.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!--Lombok-->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
    </dependencies>

    <profiles>
        <!-- 开发环境 -->
        <profile>
            <id>dev</id>
            <properties>
                <profile.active>dev</profile.active>
            </properties>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <!-- 生产环境-->
        <profile>
            <id>prod</id>
            <properties>
                <profile.active>prod</profile.active>
            </properties>
        </profile>
    </profiles>

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

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                </plugin>
                <!-- resources资源插件 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources-plugin.version}</version>
                    <configuration>
                        <delimiters>
                            <delimiter>@</delimiter>
                        </delimiters>
                        <useDefaultDelimiters>false</useDefaultDelimiters>
                        <encoding>UTF-8</encoding>
                        <!-- 后缀为pem、pfx的证书文件 -->
                        <nonFilteredFileExtensions>
                            <nonFilteredFileExtension>pem</nonFilteredFileExtension>
                            <nonFilteredFileExtension>pfx</nonFilteredFileExtension>
                            <nonFilteredFileExtension>p12</nonFilteredFileExtension>
                            <nonFilteredFileExtension>key</nonFilteredFileExtension>
                            <nonFilteredFileExtension>db</nonFilteredFileExtension>
                            <nonFilteredFileExtension>eot</nonFilteredFileExtension>
                            <nonFilteredFileExtension>otf</nonFilteredFileExtension>
                            <nonFilteredFileExtension>svg</nonFilteredFileExtension>
                            <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
                            <nonFilteredFileExtension>woff</nonFilteredFileExtension>
                            <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
                        </nonFilteredFileExtensions>
                    </configuration>
                </plugin>
                <!-- java文档插件 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>${spring-boot-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>repackage</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
