<?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>club.easy-utils</groupId>
    <artifactId>easy-weprogram</artifactId>
    <packaging>jar</packaging>
    <version>1.0</version>

    <!-- 描述信息 -->
    <name>easy weprogram</name>
    <url>https://easy-utils.club</url>
    <description>
        A easy way to connect with Wechat Mini-Program Background Interface for developer.
    </description>
    <!-- 项目成立年份，非必须 -->
    <inceptionYear>2020</inceptionYear>

    <!-- 许可证 -->
    <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>https://github.com/easy-utils/easy-weprogram</url>
        <connection>https://github.com/easy-utils/easy-weprogram.git</connection>
        <developerConnection>https://github.com/easy-utils/easy-weprogram.git</developerConnection>
    </scm>

    <!-- 问题管理系统 -->
    <issueManagement>
        <system>GitHub Issue Management</system>
        <url>https://github.com/easy-utils/easy-weprogram/issues</url>
    </issueManagement>

    <!-- 发布管理，要想发布到中央库就必须要配置的一个节点，以下两个链接可以从issue审核结果中找到 -->
    <!-- 其中id为自定义，后面会在maven/config/settings.xml中配置对应的服务器信息 -->
    <distributionManagement>
        <snapshotRepository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
    </distributionManagement>

    <!-- 开发者列表，个人的话就写自己，团队就罗列所有成员 -->
    <developers>
        <developer>
            <name>rainyblossom</name>
            <email>rainyblossom@163.com</email>
            <timezone>GMT+8</timezone>
            <url>https://github.com/rainyblossom</url>
        </developer>
    </developers>

    <properties>
        <java.version>1.8</java.version>
        <java.home>/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home</java.home>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <license.licenseName>apache_v2</license.licenseName>
        <license.verbose>false</license.verbose>
        <license.failOnMissing>true</license.failOnMissing>
        <license.failOnUnknown>true</license.failOnUnknown>
        <license.failIfWarning>true</license.failIfWarning>
        <license.failOnForbidden>true</license.failOnForbidden>
        <license.organizationName>${project.name}</license.organizationName>
        <license.sectionDelimiter>#</license.sectionDelimiter>
        <license.processStartTag>Start tag</license.processStartTag>
        <license.processEndTag>End tag</license.processEndTag>
    </properties>


    <dependencies>
        <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.8</version>
            <scope>provided</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>3.2.17.RELEASE</version>
            <scope>provided</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/junit/junit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.58</version>
            <scope>provided</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>16.0.1</version>
            <scope>provided</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/junit/junit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
            <version>5.2.5</version>
        </dependency>


    </dependencies>

    <build>
        <plugins>
            <!-- 打包时跳过测试 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <!-- 以下都为上传jar默认配置不做修改 -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <!-- autoReleaseAfterClose的值为true，则脚本会自动完成在平台上close、release的操作，至此你将成功发布了 -->
                <extensions>true</extensions>
                <configuration>
                    <serverId>sonatype</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.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</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <!-- JDK8必须使用下面的配置 -->
                        <configuration>
                            <encoding>UTF-8</encoding>
                            <charset>UTF-8</charset>
                            <additionalparam>-Xdoclint:none</additionalparam>
                            <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>