<?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>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.6.13</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <!-- 🧩 项目信息 -->
    <groupId>io.github.bailiun</groupId> <!-- ${value}: 建议使用已验证的命名空间 -->
    <artifactId>multiple-versions-coexist</artifactId> <!-- ${value}: 项目唯一ID -->
    <version>1.2.6</version> <!-- ${value}: 你的版本号 -->
    <packaging>jar</packaging>
    <name>Multiple Versions Coexist</name>
    <description>A Spring Boot component for managing multiple API versions and dynamic interface injection.</description>
    <url>https://github.com/bailiun/multiple-versions-coexist</url> <!-- ${value}: 项目主页 -->

    <!-- 🧑‍💻 开发者信息 -->
    <developers>
        <developer>
            <id>bailiun</id>
            <name>bailiun</name>
            <email>bailiunalax@gmail.com</email> <!-- 例如：bailiun@qq.com -->
            <url>https://github.com/bailiun</url>
            <roles>
                <role>Developer</role>
                <role>Project Owner</role>
            </roles>
        </developer>
    </developers>

    <!-- 🪪 许可证 -->
    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <!-- 🧭 版本控制仓库信息 -->
    <scm>
        <connection>scm:git:https://github.com/bailiun/multiple-versions-coexist.git</connection>
        <developerConnection>scm:git:ssh://github.com/bailiun/multiple-versions-coexist.git</developerConnection>
        <url>https://github.com/bailiun/multiple-versions-coexist</url>
        <tag>HEAD</tag>
    </scm>

    <!-- 📦 Issue 管理 -->
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/bailiun/multiple-versions-coexist/issues</url>
    </issueManagement>

    <!-- ⚙️ 编译配置 -->
    <properties>
        <java.version>17</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <!-- 📚 依赖 -->
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>1.9.7</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!-- 🏗️ 构建与发布 -->
    <build>
        <plugins>
            <!-- ✏️ 编译插件 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>

            <!-- 📦 源码打包 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- 📘 Javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- 🔑 GPG 签名 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <configuration>
                    <executable>D:\tool\GnuPG\bin\gpg.exe</executable> <!-- 例如：E:\Gpg4win\GnuPG\bin\gpg.exe -->
                </configuration>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- 🚀 Sonatype 发布插件 -->
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.4.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>bailiunMult</publishingServerId> <!-- 与 settings.xml 对应 -->
                    <tokenAuth>true</tokenAuth>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

