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

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

    <packaging>pom</packaging>

    <groupId>io.github.tf2jaguar.micro</groupId>
    <artifactId>microcosm</artifactId>
    <version>${revision}</version>
    <name>${project.artifactId}</name>
    <description>Springboot项目的工具包。尝试减少函数和功能之间的相互依赖性，每个功能都用作服务依赖性的最小单位。</description>
    <url>https://github.com/tf2jaguar/microcosm</url>

    <modules>
        <module>micro-logging</module>
        <module>micro-apollo</module>
        <module>micro-qconf</module>
        <module>micro-distribute</module>
    </modules>

    <properties>
        <revision>1.0.0.RELEASE</revision>
        <compile.version>8</compile.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>

        <apollo-client.version>1.5.0</apollo-client.version>
        <fastjson.version>1.2.67</fastjson.version>
        <jacoco-maven-plugin.version>0.8.3</jacoco-maven-plugin.version>
        <maven-archetype-plugin.version>3.0.1</maven-archetype-plugin.version>
        <qconf.version>1.0.0</qconf.version>
        <guava.version>20.0</guava.version>
        <springfox-swagger2.version>2.9.2</springfox-swagger2.version>
        <springfox-swagger-ui.version>2.9.2</springfox-swagger-ui.version>
        <spring-boot.version>2.2.6.RELEASE</spring-boot.version>
        <spring-cloud.version>Hoxton.SR8</spring-cloud.version>
        <hutool.version>5.7.7</hutool.version>
        <mybatis-plus.version>3.4.3.1</mybatis-plus.version>
        <mybatis-plus-generator.version>3.5.0</mybatis-plus-generator.version>
        <velocity.version>2.3</velocity.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- spring cloud -->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- microcosm start -->
            <dependency>
                <groupId>io.github.tf2jaguar.micro</groupId>
                <artifactId>micro-logging</artifactId>
                <version>${revision}</version>
            </dependency>

            <dependency>
                <groupId>io.github.tf2jaguar.micro</groupId>
                <artifactId>micro-apollo</artifactId>
                <version>${revision}</version>
            </dependency>

            <dependency>
                <groupId>io.github.tf2jaguar.micro</groupId>
                <artifactId>micro-qconf</artifactId>
                <version>${revision}</version>
            </dependency>
            <!-- microcosm end -->

            <!-- apollo -->
            <dependency>
                <groupId>com.ctrip.framework.apollo</groupId>
                <artifactId>apollo-client</artifactId>
                <version>${apollo-client.version}</version>
            </dependency>

            <!-- qconf -->
            <dependency>
                <groupId>qconf</groupId>
                <artifactId>qconf</artifactId>
                <version>${qconf.version}</version>
                <optional>true</optional>
            </dependency>

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

            <!--引入Swagger2的依赖-->
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger2</artifactId>
                <version>${springfox-swagger2.version}</version>
            </dependency>

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

            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>${fastjson.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>cn.hutool</groupId>
                <artifactId>hutool-all</artifactId>
                <version>${hutool.version}</version>
            </dependency>

            <dependency>
                <groupId>com.baomidou</groupId>
                <artifactId>mybatis-plus-boot-starter</artifactId>
                <version>${mybatis-plus.version}</version>
            </dependency>
            <dependency>
                <groupId>com.baomidou</groupId>
                <artifactId>mybatis-plus-generator</artifactId>
                <version>${mybatis-plus-generator.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.velocity</groupId>
                <artifactId>velocity-engine-core</artifactId>
                <version>${velocity.version}</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/tf2jaguar/microcosm</url>
        <connection>scm:git:git@github.com:tf2jaguar/microcosm.git</connection>
        <developerConnection>scm:git:git@github.com:tf2jaguar/microcosm.git</developerConnection>
    </scm>

    <issueManagement>
        <system>Github Issue</system>
        <url>https://github.com/tf2jaguar/microcosm/issues</url>
    </issueManagement>

    <developers>
        <developer>
            <name>zhangguodong</name>
            <email>jelly_54@163.com</email>
        </developer>
    </developers>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${compile.version}</source>
                    <target>${compile.version}</target>
                    <compilerArgument>-Xlint:unchecked</compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>deploy</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>sonatype-nexus</id>
                    <name>Sonatype Nexus Snapshot Repository</name>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>sonatype-nexus</id>
                    <name>Sonatype Nexus Release Repository</name>
                    <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sonatype-nexus</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sonatype-nexus</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus-staging-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>sonatype-nexus</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>