<?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>io.github.lunasaw</groupId>
    <artifactId>luna-fans-api</artifactId>
    <packaging>pom</packaging>
    <version>3.1.2</version>
    <name>luna-fans-api</name>
    <description>fans API Toolkit</description>
    <url>https://lunasaw.github.io/luna-fans-api</url>
    <modules>
        <module>api-spring-boot-starter</module>
        <module>baidu-spring-boot-starter</module>
        <module>tencent-spring-boot-starter</module>
        <module>ali-spring-boot-starter</module>
        <module>test-luna-fans-api</module>
        <module>tencent-pay-spring-boot-starter</module>
        <module>ali-pay-spring-boot-starter</module>
    </modules>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <maven.test.skip>true</maven.test.skip>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <spring-boot.version>2.7.10</spring-boot.version>
        <luna-common.veriosn>2.3.9</luna-common.veriosn>
        <luna-fans-api.version>3.1.2</luna-fans-api.version>
        <github.username>lunasaw</github.username>
    </properties>

    <developers>
        <developer>
            <name>lunasaw</name>
            <id>lunasaw</id>
            <email>iszychen@gmail.com</email>
        </developer>
    </developers>
    <licenses>
        <license>
            <name>Apache 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>
    <scm>
        <url>https://github.com/${github.username}/${project.name}</url>
        <connection>scm:git:https://github.com/${github.username}/${project.name}.git</connection>
        <developerConnection>scm:git:https://github.com/${github.username}/${project.name}</developerConnection>
    </scm>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.github.lunasaw</groupId>
                <artifactId>luna-common</artifactId>
                <version>${luna-common.veriosn}</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>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>io.github.lunasaw</groupId>
            <artifactId>luna-common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
    </dependencies>

    <distributionManagement>

    </distributionManagement>

    <profiles>
        <profile>
            <id>github_auth</id>
            <distributionManagement>
                <repository>
                    <id>github_auth</id>
                    <name>GitHub OWNER Apache Maven Packages</name>
                    <url>https://maven.pkg.github.com/${github.username}/${project.name}</url>
                </repository>
                <snapshotRepository>
                    <id>github_auth</id>
                    <name>GitHub OWNER Apache Maven Packages</name>
                    <url>https://maven.pkg.github.com/${github.username}/${project.name}</url>
                </snapshotRepository>
            </distributionManagement>
            <repositories>
                <repository>
                    <!-- id需要与上面的server对应的id匹配 -->
                    <id>github_auth</id>
                    <name>GitHub OWNER Apache Maven Packages</name>
                    <url>https://maven.pkg.github.com/${github.username}/${project.name}</url>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile>
            <id>ossrh</id>
            <distributionManagement>
                <repository>
                    <id>ossrh</id>
                    <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!--这是自动发布的插件-->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <!--自动释放，deploy就不需要在仓库中在操作部署了-->
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.3.2</version>
                        <configuration>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <useReleaseProfile>false</useReleaseProfile>
                            <!--正式包release 快照包snapshots-->
                            <releaseProfiles>snapshots</releaseProfiles>
                            <goals>deploy</goals>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.0</version>
                        <configuration>
                            <source>1.8</source>
                            <target>1.8</target>
                            <encoding>utf-8</encoding>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                    </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.1</version>
                        <configuration>
                            <!--<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>-->
                            <additionalparam>-Xdoclint:none</additionalparam>
                            <aggregate>true</aggregate>
                            <charset>UTF-8</charset><!-- utf-8读取文件 -->
                            <encoding>UTF-8</encoding><!-- utf-8进行编码代码 -->
                            <docencoding>UTF-8</docencoding><!-- utf-8进行编码文档 -->
                            <tags>
                                <tag>
                                    <name>date</name>
                                    <name>description</name>
                                    <name>package</name>
                                </tag>
                            </tags>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>