<?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.fntop</groupId>
    <artifactId>llsms-spring-boot-starter</artifactId>
    <version>2.2.0</version>
    <name>llsms-spring-boot-starter</name>
    <description>来了短信 SpringBoot Starter</description>
    <!--项目URL-->
    <url>https://gitee.com/FnTop/fn-sms.git</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>we</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>fn</id>
            <name>java4n</name>
            <email>442232278@qq.com</email>
            <roles>
                <role>
                    项目拥有者
                </role>
            </roles>
            <url>https://www.fntop.cn</url>
            <organization>cn.fntop</organization>
            <organizationUrl>https://blog.fntop.cn</organizationUrl>
        </developer>
    </developers>
    <scm>
        <!--源码URL-->
        <url>https://gitee.com/FnTop/fn-sms.git</url>
    </scm>
    <properties>
        <!--项目编译JDK版本-->
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <java.version>1.8</java.version>
        <!--项目编码-->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!--插件版本-->
        <maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
        <maven-release-plugin.version>3.0.0-M1</maven-release-plugin.version>
        <maven-source-plugin.version>2.1.2</maven-source-plugin.version>
        <maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>cn.fntop</groupId>
            <artifactId>open-api-spring-boot-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
    </dependencies>
    <profiles>
        <!--release-->
        <profile>
            <id>release</id>
            <build>
                <finalName>${project.artifactId}-${project.version}</finalName>
                <plugins>
                    <!--打包去掉jar包内的配置文件-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <!-- 不需要进包里的配置文件的名字 默认位置是resource 下的-->
                                <exclude>**/application.yml</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>${maven-compiler-plugin.version}</version>
                        <configuration>
                            <target>${maven.compiler.target}</target>
                            <source>${maven.compiler.source}</source>
                            <encoding>${project.build.sourceEncoding}</encoding>
                            <!-- 解决打包生成BOOT-INF问题 -->
                            <skip>true</skip>
                            <compilerArgs>
                                <arg>-parameters</arg>
                            </compilerArgs>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>${maven-deploy-plugin.version}</version>
                    </plugin>
                    <!-- Source -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                            <encoding>${project.build.sourceEncoding}</encoding>
                            <failOnError>false</failOnError>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</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>ossrh</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-release</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <snapshotRepository>
                    <id>sonatype-snapshots</id>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>sonatype-release</id>
                    <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>
</project>