<?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>
    <packaging>pom</packaging>
    <groupId>cn.jiangzeyin.fast-boot</groupId>
    <artifactId>common-parent</artifactId>
    <version>2.0.21</version>
    <name>Fast-boot</name>
    <url>https://gitee.com/keepbx/Fast-boot</url>
    <description>Spring Boot fast-boot</description>
    <inceptionYear>2017</inceptionYear>
    <properties>
        <!-- 声明版本号 -->
        <fast-boot.version>${pom.version}</fast-boot.version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <fastjson.version>1.2.68</fastjson.version>
        <!-- 项目中使用SpringBoot 版本号 -->
        <spring-boot.version>2.1.6.RELEASE</spring-boot.version>
        <hutool-all.version>[5.3.0,5.3.99]</hutool-all.version>
    </properties>
    <modules>
        <module>common-boot</module>
        <module>common-redis</module>
    </modules>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>${fastjson.version}</version>
            </dependency>
            <dependency>
                <groupId>cn.jiangzeyin.fast-boot</groupId>
                <artifactId>common-boot</artifactId>
                <version>${fast-boot.version}</version>
            </dependency>
            <dependency>
                <groupId>cn.jiangzeyin.fast-boot</groupId>
                <artifactId>common-redis</artifactId>
                <version>${fast-boot.version}</version>
            </dependency>

            <dependency>
                <groupId>cn.hutool</groupId>
                <artifactId>hutool-all</artifactId>
                <version>${hutool-all.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <!-- 编译插件, 设定JDK版本 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <!-- source插件,打包源码 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <tags>
                        <tag>
                            <name>date</name>
                            <placement>a</placement>
                            <head>创建时间</head>
                        </tag>
                    </tags>
                </configuration>
            </plugin>

            <!--surefire插件，避免mvn test console乱码-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.0</version>
                <configuration>
                    <forkMode>once</forkMode>
                    <argLine>-Dfile.encoding=UTF-8</argLine>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>maven-repo</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>maven-repo</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <!-- GPG -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>verify-gpg</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <tag>master</tag>
        <url>git@gitee.com:jiangzeyin/common-boot.git</url>
        <connection>scm:git:git@gitee.com:jiangzeyin/common-boot.git</connection>
        <developerConnection>scm:git:git@gitee.com:jiangzeyin/common-boot.git</developerConnection>
    </scm>
    <developers>
        <developer>
            <name>jiangzeyin</name>
            <email>bwcx_jzy@163.com</email>
            <organization>bwcx_jzy</organization>
        </developer>
    </developers>
</project>
