<?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>cn.sinlmao</groupId>
    <artifactId>spring-boot-starter-imhttp</artifactId>
    <version>1.0.2</version>
    <name>Sinlmao ImHTTP Spring Boot Starter</name>
    <description>
        Sinlmao ImHTTP is an interface-oriented HTTP remote call library. It hopes that accessing the HTTP interface can
        become as simple as using DAO.
    </description>
    <url>https://imhttp.sinlmao.cn</url>

    <!-- 配置属性 -->
    <properties>
        <!-- 项目配置 -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>8</java.version>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.compiler.compilerVersion>${java.version}</maven.compiler.compilerVersion>
        <!-- 依赖包版本配置 -->
        <spring-boot.version>2.2.13.RELEASE</spring-boot.version>
        <imhttp.version>1.0.2</imhttp.version>
        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
        <maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
    </properties>

    <!-- 依赖配置 -->
    <dependencies>
        <!-- 添加SpringBoot依赖包 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
            <version>${spring-boot.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- 添加SpringBoot Configuration Processor依赖包 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <version>${spring-boot.version}</version>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>

        <!-- 添加Sinlmao ImHTTP依赖包 -->
        <dependency>
            <groupId>cn.sinlmao</groupId>
            <artifactId>imhttp</artifactId>
            <version>${imhttp.version}</version>
        </dependency>
    </dependencies>

    <!-- 编译配置 -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <!-- JavadDoc 插件 -->
            <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>
                        <!-- -Xdoclint:none 是为了避免生成apidoc的时候检查过于严格而报错-->
                        <!--                        <configuration>-->
                        <!--                            <additionalparam>-Xdoclint:none</additionalparam>-->
                        <!--                        </configuration>-->
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <!-- 许可证信息 -->
    <licenses>
        <license>
            <name>APACHE LICENSE, VERSION 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <!-- 版本控制（软件配置管理）信息 -->
    <scm>
        <tag>master</tag>
        <url>https://github.com</url>
        <connection>scm:git:https://github.com</connection>
        <developerConnection>scm:git:https://github.com</developerConnection>
    </scm>

    <!-- ISUSE链接 -->
    <issueManagement>
        <url>https://github.com/sinlmao/NetworkUtils/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <!-- 开发者信息 -->
    <developers>
        <developer>
            <name>Sinlmao</name>
            <email>888@1st.ren</email>
            <organization>Sinlmao</organization>
        </developer>
    </developers>

    <!-- 多环境配置 -->
    <profiles>
        <profile>
            <!-- 这个id就是打包时的 -P 参数 -->
            <id>release_mingbo</id>
            <build>
                <plugins>
                    <!-- Source 插件-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- JavadDoc 插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <!-- -Xdoclint:none 是为了避免生成apidoc的时候检查过于严格而报错-->
                                <!--                                <configuration>-->
                                <!--                                    <additionalparam>-Xdoclint:none</additionalparam>-->
                                <!--                                </configuration>-->
                            </execution>
                        </executions>
                    </plugin>
                    <!-- GPG 加密插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>

            <!-- snapshotRepository与repository的id应与setting.xml中添加的server的id一致 -->
            <distributionManagement>
                <snapshotRepository>
                    <id>mingbo</id>
                    <url>https://maven.mingbo.work/repository/maven-snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>mingbo</id>
                    <url>https://maven.mingbo.work/repository/maven-releases/</url>
                </repository>
            </distributionManagement>
        </profile>

        <profile>
            <!-- 这个id就是打包时的 -P 参数 -->
            <id>release_osren</id>
            <build>
                <plugins>
                    <!-- Source 插件-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- JavadDoc 插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <!-- -Xdoclint:none 是为了避免生成apidoc的时候检查过于严格而报错-->
                                <!--                                <configuration>-->
                                <!--                                    <additionalparam>-Xdoclint:none</additionalparam>-->
                                <!--                                </configuration>-->
                            </execution>
                        </executions>
                    </plugin>
                    <!-- GPG 加密插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>

            <!-- snapshotRepository与repository的id应与setting.xml中添加的server的id一致 -->
            <distributionManagement>
                <snapshotRepository>
                    <id>osren</id>
                    <url>https://maven.osren.net/repository/maven-snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>osren</id>
                    <url>https://maven.osren.net/repository/maven-releases/</url>
                </repository>
            </distributionManagement>
        </profile>

        <profile>
            <!-- 这个id就是打包时的 -P 参数 -->
            <id>release_ossrh</id>
            <build>
                <plugins>
                    <!-- Source 插件-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- JavadDoc 插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <!-- -Xdoclint:none 是为了避免生成apidoc的时候检查过于严格而报错-->
                                <configuration>
                                    <additionalparam>-Xdoclint:none</additionalparam>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- GPG 加密插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!--Nexus Staging Maven插件是将组件部署到OSSRH并将其发布到Central Repository的推荐方法 -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>

            <!-- snapshotRepository与repository的id应与setting.xml中添加的server的id一致 -->
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>

    <!-- 指定仓库 -->
    <repositories>
        <!-- Aliyun Public -->
        <repository>
            <id>aliyun-public</id>
            <name>Aliyun Public</name>
            <url>https://maven.aliyun.com/repository/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
        <!-- MingBo Maven -->
        <repository>
            <id>mingbo-releases</id>
            <name>MingBo Maven</name>
            <url>https://maven.mingbo.work/repository/maven-releases</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>
</project>