<?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.yizhishang</groupId>
    <artifactId>yizhishang-parent</artifactId>
    <packaging>pom</packaging>
    <version>1.0.0-RELEASE</version>
    <modules>
        <module>yizhishang-core</module>
        <module>yizhishang-common</module>
        <module>yizhishang-extensions</module>
    </modules>

    <name>yizhishang-parent</name>
    <url>https://gitee.com/yizhishang/yizhishang-project</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <poi.version>3.17</poi.version>
        <swagger.version>2.9.2</swagger.version>
        <swagger-bootstrap-ui.version>1.9.6</swagger-bootstrap-ui.version>

        <hutool.version>4.6.1</hutool.version>
        <spring.version>5.2.6.RELEASE</spring.version>
        <guava.version>30.1-jre</guava.version>

        <security-jwt.version>1.1.1.RELEASE</security-jwt.version>
        <oauth2.version>2.5.1.RELEASE</oauth2.version>
        <jjwt.version>0.9.1</jjwt.version>

        <sonar.scm.disabled>true</sonar.scm.disabled>
        <fastjson.version>1.2.74</fastjson.version>
        <jackson.version>2.12.3</jackson.version>
    </properties>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-parent</artifactId>
        <version>2.3.0.RELEASE</version>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <!-- 自动生成API文档 -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>${swagger.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>guava</artifactId>
                    <groupId>com.google.guava</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>swagger-models</artifactId>
                    <groupId>io.swagger</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>swagger-annotations</artifactId>
                    <groupId>io.swagger</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>${swagger.version}</version>
        </dependency>
        <dependency>
            <artifactId>swagger-models</artifactId>
            <groupId>io.swagger</groupId>
            <version>1.5.21</version>
        </dependency>
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>swagger-bootstrap-ui</artifactId>
            <version>${swagger-bootstrap-ui.version}</version>
        </dependency>

        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-extension</artifactId>
            <version>3.1.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>${fastjson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>
    </dependencies>

    <!-- 许可证信息 -->
    <licenses>
        <!-- Apache许可证 -->
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
        <!-- MIT许可证 -->
        <!--	<license>
                <name>MIT License</name>
                <url>http://www.opensource.org/licenses/mit-license.php</url>
            </license>-->
    </licenses>
    <!-- SCM信息 -> git在github上托管 -->
    <scm>
        <connection>scm:git:git://github.com/yizhishang/yizhishang-parent.git</connection>
        <developerConnection>scm:git:ssh://github.com/yizhishang/yizhishang-parent.git</developerConnection>
        <url>https://github.com/yizhishang/yizhishang-parent/tree/master</url>
        <tag>yizhishang-parent</tag>
    </scm>
    <!-- 开发者信息 -->
    <developers>
        <developer>
            <name>yizhishang</name>
            <email>285206405@qq.com</email>
            <url>https://github.com/yizhishang</url>
        </developer>
    </developers>

    <!--    <repositories>-->
    <!--        <repository>-->
    <!--            <id>maven-public</id>-->
    <!--            <url>http://nexus.yizhishang.com/repository/maven-public/</url>-->
    <!--        </repository>-->
    <!--    </repositories>-->

    <!--    <distributionManagement>-->
    <!--        <repository>-->
    <!--            <id>maven-releases</id>-->
    <!--            <url>http://nexus.yizhishang.com/repository/maven-releases/</url>-->
    <!--        </repository>-->
    <!--        <snapshotRepository>-->
    <!--            <id>maven-snapshots</id>-->
    <!--            <url>http://nexus.yizhishang.com/repository/maven-snapshots/</url>-->
    <!--        </snapshotRepository>-->
    <!--    </distributionManagement>-->

    <!-- 使用个人资料：由于生成javadoc和源jar以及使用GPG签署组件是一个相当耗时的过程，因此这些执行通常与正常的构建配置隔离并移动到配置文件中。然后，在通过激活配置文件执行部署时，将使用此配置文件。 -->
    <profiles>
        <profile>
            <id>oss</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <!-- 要生成Javadoc和Source jar文件，您必须配置javadoc和源Maven插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <configuration>
                            <aggregate>true</aggregate>
                            <charset>UTF-8</charset>
                            <encoding>UTF-8</encoding>
                            <docencoding>UTF-8</docencoding>
                            <!-- 让maven忽视javadoc过程中警告和错误 -->
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!--  必须配置GPG插件用于使用以下配置对组件进行签名 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</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>1.6.3</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>oss</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <!-- 【注】snapshotRepository 与 repository 中的 id 一定要与 setting.xml 中 server 的 id 保持一致！ -->
            <distributionManagement>
                <snapshotRepository>
                    <id>oss</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>oss</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <!-- 绑定source插件到Maven的生命周期,并在生命周期后执行绑定的source的goal -->
                <executions>
                    <execution>
                        <!-- 绑定source插件到Maven的生命周期 -->
                        <phase>install</phase>
                        <!--在生命周期后执行绑定的source插件的goals -->
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <generateBackupPoms>false</generateBackupPoms>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
