<?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>top.todev.ding</groupId>
    <artifactId>ding-talk-4j</artifactId>
    <packaging>pom</packaging>
    <version>0.0.3</version>
    <name>Ding Talk Open Platform For Java</name>
    <description>钉钉开放平台 Java SDK</description>
    <url>https://github.com/crystalxmumu/ding-talk-4j</url>

    <modules>
        <module>ding-talk-common</module>
        <module>ding-talk-org</module>
        <module>ding-talk-workflow</module>
        <module>ding-talk-callback</module>
        <module>ding-talk-boot-starters</module>
    </modules>


    <properties>
        <fly.pig.version>0.0.2</fly.pig.version>
        <spring.boot.version>2.4.1</spring.boot.version>
        <fastjson.version>1.2.73</fastjson.version>
        <hutool.version>5.5.8</hutool.version>
        <commons-codec.version>1.15</commons-codec.version>
        <lombok.version>1.18.16</lombok.version>
        <slf4j.version>1.7.30</slf4j.version>
        <junit.platform.version>1.6.2</junit.platform.version>
        <junit.jupiter.version>5.6.2</junit.jupiter.version>
        <junit.vintage.version>5.6.2</junit.vintage.version>

        <java.version>1.8</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
        <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
        <maven-release-plugin.version>3.0.0-M4</maven-release-plugin.version>
        <versions-maven-plugin.version>2.8.1</versions-maven-plugin.version>
        <maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>

        <nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>

        <surefire-plugin.version>2.22.2</surefire-plugin.version>

        <!-- 跳过单元测试 -->
        <maven.test.skip>true</maven.test.skip>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>

        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <!-- 一方库 -->
            <dependency>
                <groupId>top.todev.ding</groupId>
                <artifactId>ding-talk-common</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>top.todev.ding</groupId>
                <artifactId>ding-talk-org</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>top.todev.ding</groupId>
                <artifactId>ding-talk-workflow</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>top.todev.ding</groupId>
                <artifactId>ding-talk-callback</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- 三方库 -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring.boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>top.todev.tool</groupId>
                <artifactId>fly-pig-util</artifactId>
                <version>${fly.pig.version}</version>
            </dependency>
            <dependency>
                <groupId>top.todev.tool</groupId>
                <artifactId>fly-pig-model</artifactId>
                <version>${fly.pig.version}</version>
            </dependency>

            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>${fastjson.version}</version>
            </dependency>

            <dependency>
                <groupId>cn.hutool</groupId>
                <artifactId>hutool-crypto</artifactId>
                <version>${hutool.version}</version>
            </dependency>
            <dependency>
                <groupId>cn.hutool</groupId>
                <artifactId>hutool-http</artifactId>
                <version>${hutool.version}</version>
            </dependency>

            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>${commons-codec.version}</version>
            </dependency>


            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${slf4j.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-launcher</artifactId>
                <version>${junit.platform.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.jupiter.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
                <version>${junit.vintage.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <issueManagement>
        <system>Github Issue</system>
        <url>https://github.com/crystalxmumu/ding-talk-4j/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>Mulan Permissive Software License，Version 1</name>
            <url>http://license.coscl.org.cn/MulanPSL</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>小飞猪</name>
            <email>crystalxmumu@163.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/crystalxmumu/ding-talk-4j.git</connection>
        <developerConnection>scm:git:https://github.com/crystalxmumu/ding-talk-4j.git</developerConnection>
        <url>https://github.com/crystalxmumu/ding-talk-4j</url>
        <tag>v0.0.3</tag>
    </scm>

    <build>
        <plugins>
            <plugin>
                <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>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>${versions-maven-plugin.version}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire-plugin.version}</version>
            </plugin>
        </plugins>
    </build>


    <profiles>
        <profile>
            <id>release</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
            <properties>
                <gpg.executable>D:\Program Files\GnuPG\bin\gpg.exe</gpg.executable>
            </properties>
            <build>
                <plugins>
                    <!-- source plugin，源码生成插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- doc plugin，Maven API文档生成插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <tags>
                                <tag>
                                    <name>date</name>
                                </tag>
                            </tags>
                        </configuration>
                    </plugin>
                    <!-- release plugin，用于发布到release仓库部署插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>${maven-release-plugin.version}</version>
                        <configuration>
                            <tagNameFormat>v@{project.version}</tagNameFormat>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                        </configuration>
                    </plugin>

                    <!-- 执行测试用例的插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${maven-surefire-plugin.version}</version>
                    </plugin>

                    <!--staging puglin，用于自动执行发布阶段(免手动)-->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus-staging-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>

                    <!-- gpg plugin，用于签名认证 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>