<?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.7.18</version>
        <relativePath/>
    </parent>

    <groupId>top.yumbo.ai</groupId>
    <artifactId>ai-reviewer-base-file-rag</artifactId>
    <version>1.0</version>
    <packaging>jar</packaging>

    <name>AI Reviewer Base File RAG</name>
    <description>本地文件存储RAG替代框架 - 基于Lucene的高性能文档检索系统</description>

    <!--填入开发者信息，姓名、邮箱、项目地址-->
    <developers>
        <developer>
            <name>Jinhua Yu</name>
            <email>1015770492@qq.com</email>
            <url>https://github.com/jinhua10/ai-reviewer-base-file-rag</url>
        </developer>
    </developers>
    <url>https://github.com/jinhua10/ai-reviewer-base-file-rag</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo,manual</distribution>
        </license>
    </licenses>
    <scm>
        <!-- 采用projectUrl变量代替这个值，方便给重复利用这个配置，也就是上面的标签替换一下值就行 -->
        <connection>https://github.com/jinhua10/ai-reviewer-base-file-rag</connection>
        <developerConnection>https://github.com/jinhua10/ai-reviewer-base-file-rag</developerConnection>
        <url>https://github.com/jinhua10/ai-reviewer-base-file-rag</url>
    </scm>
    <distributionManagement>
        <!-- Central Publisher (Maven Central) via Sonatype Central Publisher -->
        <repository>
            <id>${serverId}</id>
            <name>Central Repository</name>
            <url>https://central.sonatype.com/api/v1/publisher/upload</url>
        </repository>
        <!-- Central Publisher currently does not accept SNAPSHOT artifacts. If you publish snapshots,
             configure a separate snapshot repository and matching server credentials in settings.xml. -->
    </distributionManagement>

    <!-- 编码配置 - 解决中文乱码 -->
    <properties>
        <projectUrl>https://github.com/jinhua10/ai-reviewer-base-file-rag.git</projectUrl>
        <serverId>central</serverId><!-- Central Portal 服务 ID -->

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
        <lucene.version>9.9.1</lucene.version>
        <console.encoding>UTF-8</console.encoding>
    </properties>


    <dependencies>

        <!-- Apache Lucene - 搜索引擎核心 -->
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <version>${lucene.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-queryparser</artifactId>
            <version>${lucene.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-analysis-common</artifactId>
            <version>${lucene.version}</version>
        </dependency>

        <!-- Apache Tika - 文档解析 -->
        <dependency>
            <groupId>org.apache.tika</groupId>
            <artifactId>tika-core</artifactId>
            <version>2.9.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tika</groupId>
            <artifactId>tika-parsers-standard-package</artifactId>
            <version>2.9.1</version>
            <exclusions>
                <!-- 排除 PDFBox 3.x，使用兼容的 2.x 版本 -->
                <exclusion>
                    <groupId>org.apache.pdfbox</groupId>
                    <artifactId>pdfbox</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.pdfbox</groupId>
                    <artifactId>pdfbox-tools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.pdfbox</groupId>
                    <artifactId>pdfbox-io</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.pdfbox</groupId>
                    <artifactId>pdfbox-debugger</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- 显式添加兼容的 PDFBox 2.x 版本 -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox</artifactId>
            <version>2.0.30</version>
        </dependency>
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox-tools</artifactId>
            <version>2.0.30</version>
        </dependency>

        <!-- Apache POI - Excel 文件解析支持 (.xls 和 .xlsx) -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>5.2.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>5.2.5</version>
        </dependency>
        <!-- POI 依赖的额外库 -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-scratchpad</artifactId>
            <version>5.2.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.24.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>4.4</version>
        </dependency>

        <!-- 不要删除onnxruntime此依赖！它是整个知识库问答系统的基础，
            负责将文本转换为向量，是 RAG（检索增强生成）系统的核心组件。-->

        <!-- ONNX Runtime - 本地模型推理（支持 Sentence-BERT） -->
        <dependency>
            <groupId>com.microsoft.onnxruntime</groupId>
            <artifactId>onnxruntime</artifactId>
            <version>1.16.3</version>
        </dependency>

        <!--
        注意：我们使用简化的向量索引实现（SimpleVectorIndexEngine），
        不依赖外部向量库，适合中小规模数据（<10万条）。
        使用线性扫描进行向量检索，性能足够且实现简单。
        -->

        <!-- Caffeine - 缓存 -->
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
            <version>3.1.8</version>
        </dependency>

        <!-- SQLite - 元数据存储 -->
        <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
            <version>3.44.1.0</version>
        </dependency>

        <!-- Netty - HTTP服务器 (Optional) -->
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>4.1.104.Final</version>
            <optional>true</optional>
        </dependency>

        <!-- Fastjson2 - JSON处理 -->
        <dependency>
            <groupId>com.alibaba.fastjson2</groupId>
            <artifactId>fastjson2</artifactId>
            <version>2.0.43</version>
        </dependency>

        <!-- Guava - 工具类 -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>32.1.3-jre</version>
        </dependency>

        <!-- Tesseract OCR - 图片文字识别 -->
        <dependency>
            <groupId>net.sourceforge.tess4j</groupId>
            <artifactId>tess4j</artifactId>
            <version>5.9.0</version>
        </dependency>

        <!-- Apache Commons -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.14.0</version>
        </dependency>

        <!-- OkHttp - HTTP 客户端 (用于 OpenAI API 调用) -->
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>4.12.0</version>
        </dependency>

        <!-- Jackson - JSON 处理 (用于 OpenAI API) -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>

        <!-- Lombok -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Spring Boot Starter - 包含日志依赖 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>

        <!--
            注意：不需要手动添加 slf4j-api、logback-classic 等日志依赖
            spring-boot-starter 已经包含了完整的日志配置：
            - slf4j-api
            - logback-classic
            - logback-core
            - log4j-to-slf4j
            - jul-to-slf4j
        -->

        <!-- Spring Boot Web - REST API 支持 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <!-- Spring Boot Configuration Processor - 配置提示支持 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

        <!-- JSR-330: @PostConstruct, @PreDestroy 支持 -->
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <version>1.3.2</version>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!--
                Assembly 插件 - 打包 FAT JAR（包含所有依赖）

                配置说明：
                1. 在 package 阶段生成 *-jar-with-dependencies.jar
                2. attach=false: 不将 FAT JAR attach 到项目
                   → mvn install: 只安装 thin JAR 到本地仓库
                   → mvn deploy: 只部署 thin JAR 到远程仓库
                3. FAT JAR 仅用于本地运行：java -jar xxx-jar-with-dependencies.jar

                生成的文件：
                - target/ai-reviewer-base-file-rag-1.0.jar (thin JAR，会被 install/deploy)
                - target/ai-reviewer-base-file-rag-1.0-jar-with-dependencies.jar (FAT JAR，不会被 install/deploy)
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.7.1</version>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass>
                                        top.yumbo.ai.rag.Application
                                    </mainClass>
                                </manifest>
                            </archive>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                            <!--
                                关键配置：不将 assembly 生成的 JAR attach 到项目
                                这样 install/deploy 时就不会处理 FAT JAR
                            -->
                            <attach>false</attach>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!--打包源码的插件-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.1</version>
                <configuration>
                    <!-- 排除模型文件，避免 sources JAR 过大 -->
                    <excludeResources>true</excludeResources>
                    <excludes>
                        <exclude>models/**/*.onnx</exclude>
                        <exclude>models/**/*.bin</exclude>
                        <exclude>models/**/*.safetensors</exclude>
                        <exclude>models/**/*.pt</exclude>
                        <exclude>models/**/*.pth</exclude>
                        <exclude>simpleExcel</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Javadoc 文档生成插件-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.6.3</version>
                <configuration>
                    <!-- 忽略生成文档中的错误 -->
                    <doclint>none</doclint>
                    <!-- Java 版本配置 - 支持 Java 17 语法特性 -->
                    <source>17</source>
                    <!-- 字符编码配置 -->
                    <charset>UTF-8</charset><!-- utf-8读取文件 -->
                    <encoding>UTF-8</encoding><!-- utf-8进行编码代码 -->
                    <docencoding>UTF-8</docencoding><!-- utf-8进行编码文档 -->
                    <!-- 添加 JVM 参数确保运行时编码 -->
                    <additionalJOptions>
                        <additionalJOption>-J-Dfile.encoding=UTF-8</additionalJOption>
                        <additionalJOption>-J-Duser.language=zh</additionalJOption>
                        <additionalJOption>-J-Duser.country=CN</additionalJOption>
                    </additionalJOptions>
                    <!-- 静默模式，减少输出 -->
                    <quiet>true</quiet>
                    <!-- 显示详细的警告信息 -->
                    <show>protected</show>
                    <!-- 生成的文档标题 -->
                    <doctitle>AI Reviewer Base File RAG API Documentation</doctitle>
                    <windowtitle>AI Reviewer Base File RAG API</windowtitle>
                    <!-- 排除资源文件，避免 javadoc JAR 包含模型文件 -->
                    <excludePackageNames>*.resources.*</excludePackageNames>
                    <sourceFileExcludes>
                        <sourceFileExclude>**/resources/**</sourceFileExclude>
                    </sourceFileExcludes>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- GPG 签名插件 - deploy 时自动签名 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- 使用 Sonatype Central Publisher 插件替代 maven-deploy-plugin，针对 central.sonatype.com 的新 API -->
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.9.0</version>
                <extensions>true</extensions>
                <configuration>
                    <!-- 与 settings.xml 中的 <server><id>...</id></server> 对应 -->
                    <publishingServerId>${serverId}</publishingServerId>
                </configuration>
            </plugin>


            <!-- Maven 编译插件 - UTF-8 编码 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <source>17</source>
                    <target>17</target>
                    <encoding>UTF-8</encoding>
                    <compilerArgs>
                        <arg>-J-Dfile.encoding=UTF-8</arg>
                    </compilerArgs>
                    <fork>true</fork>
                    <!-- 注意：-Dfile.encoding 是 JVM 参数，不是编译器参数 -->
                    <!-- Lombok 注解处理器配置 -->
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>1.18.34</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>

            <!-- Maven 资源插件 - UTF-8 编码 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.3.1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
                <executions>
                    <!-- 编译时：包含所有资源（包括 simpleExcel），用于开发测试 -->
                    <execution>
                        <id>default-resources</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>resources</goal>
                        </goals>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                    <filtering>false</filtering>
                                    <!-- 编译时不排除任何文件，保留 simpleExcel 用于开发 -->
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Maven 测试插件 - 使用可配置的控制台编码 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.2.5</version>
                <configuration>
                    <!-- 增加堆内存大小，解决测试时的 OutOfMemoryError -->
                    <argLine>
                        -Xms2048m
                        -Xmx8192m
                        -XX:MaxMetaspaceSize=1024m
                        -XX:+UseG1GC
                        -XX:G1HeapRegionSize=16m
                        -XX:MaxGCPauseMillis=200
                        -XX:+DisableExplicitGC
                        -XX:+HeapDumpOnOutOfMemoryError
                        -XX:HeapDumpPath=target/heap-dump.hprof
                        -Dfile.encoding=${console.encoding}
                        -Dconsole.encoding=${console.encoding}
                        -Dsun.stdout.encoding=${console.encoding}
                        -Dsun.stderr.encoding=${console.encoding}
                    </argLine>
                    <!-- 防止内存泄漏 - 每个测试类使用新的 JVM -->
                    <reuseForks>false</reuseForks>
                    <forkCount>1</forkCount>
                    <!-- 超时设置（秒） -->
                    <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
                    <!-- 失败后继续运行 -->
                    <testFailureIgnore>false</testFailureIgnore>
                    <!-- 打印详细的堆栈信息 -->
                    <trimStackTrace>false</trimStackTrace>
                </configuration>
            </plugin>
            <!-- Exec Maven 插件 - 使用可配置的控制台编码 -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>3.4.1</version>
                <configuration>
                    <!-- 确保运行时使用项目控制台编码（可在 Windows 下为 GBK） -->
                    <systemProperties>
                        <systemProperty>
                            <key>file.encoding</key>
                            <value>${console.encoding}</value>
                        </systemProperty>
                        <systemProperty>
                            <key>sun.stdout.encoding</key>
                            <value>${console.encoding}</value>
                        </systemProperty>
                        <systemProperty>
                            <key>sun.stderr.encoding</key>
                            <value>${console.encoding}</value>
                        </systemProperty>
                        <systemProperty>
                            <key>console.encoding</key>
                            <value>${console.encoding}</value>
                        </systemProperty>
                    </systemProperties>
                </configuration>
            </plugin>

            <!-- Spring Boot Maven 插件 -->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>top.yumbo.ai.rag.Application</mainClass>
                    <jvmArguments>
                        -Dfile.encoding=${console.encoding}
                        -Dsun.stdout.encoding=${console.encoding}
                        -Dsun.stderr.encoding=${console.encoding}
                        -Dconsole.encoding=${console.encoding}
                    </jvmArguments>
                    <!--
                        跳过 repackage，避免覆盖 thin JAR
                        Spring Boot 的 repackage 会生成 fat JAR，这与我们的目标冲突
                        我们使用 maven-assembly-plugin 生成 fat JAR
                    -->
                    <skip>true</skip>
                </configuration>
            </plugin>

            <!-- Ant 插件 - 用于在打包时删除不需要的资源 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <!-- 步骤1: 打包前清理不需要的资源 -->
                    <execution>
                        <id>remove-resources-before-package</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <echo message="[INFO] 删除 target/classes/simpleExcel 目录（打包时不包含）"/>
                                <delete dir="${project.build.outputDirectory}/simpleExcel" quiet="true"/>

                                <echo message="[INFO] 删除 target/classes/models 目录下的模型文件（保留脚本文件）"/>
                                <delete quiet="true">
                                    <fileset dir="${project.build.outputDirectory}/models" erroronmissingdir="false">
                                        <include name="**/*.onnx"/>
                                        <include name="**/*.bin"/>
                                        <include name="**/*.safetensors"/>
                                        <include name="**/*.pt"/>
                                        <include name="**/*.pth"/>
                                    </fileset>
                                </delete>
                            </target>
                        </configuration>
                    </execution>

                    <!-- 步骤2: 打包后复制模型到 release 目录 -->
                    <execution>
                        <id>copy-models-to-release</id>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <echo message="[INFO] 检查并复制模型文件到 release 目录"/>

                                <!-- 检查模型文件是否已存在 -->
                                <available
                                    file="${project.basedir}/release/models/paraphrase-multilingual/model.onnx"
                                    property="model.exists"/>

                                <!-- 如果模型不存在，则需要复制 -->
                                <condition property="should.copy.model">
                                    <not>
                                        <isset property="model.exists"/>
                                    </not>
                                </condition>

                                <!-- 显示模型已存在或将要复制的消息 -->
                                <echo message="[INFO] Model file check completed"/>

                                <!-- 创建目录（如果需要） -->
                                <mkdir dir="${project.basedir}/release/models"/>

                                <!-- 复制模型文件（failonerror=false 允许源文件不存在） -->
                                <copy
                                    todir="${project.basedir}/release/models"
                                    failonerror="false"
                                    preservelastmodified="true"
                                    verbose="false"
                                    overwrite="false">
                                    <fileset dir="${project.basedir}/src/main/resources/models" erroronmissingdir="false">
                                        <include name="**/*.onnx"/>
                                        <include name="**/*.txt"/>
                                        <include name="**/*.json"/>
                                    </fileset>
                                </copy>

                                <!-- 验证最终结果 -->
                                <available
                                    file="${project.basedir}/release/models/paraphrase-multilingual/model.onnx"
                                    property="model.final.exists"/>

                                <echo message="[INFO] ✅ Model files are ready in release/models/"/>
                                <echo message="[INFO] 💡 If models are missing, run: cd release/models/paraphrase-multilingual &amp;&amp; download-model.bat"/>
                            </target>
                        </configuration>
                    </execution>

                    <!-- 步骤3: 打包后立即复制 JAR 到 release 目录 -->
                    <execution>
                        <id>copy-jar-to-release</id>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <echo message="[INFO] 📦 复制 JAR 包到 release 目录..."/>
                                <mkdir dir="${project.basedir}/release"/>
                                <copy
                                    file="${project.build.directory}/${project.artifactId}-${project.version}-jar-with-dependencies.jar"
                                    todir="${project.basedir}/release"
                                    overwrite="true"
                                    failonerror="true"/>
                                <echo message="[INFO] ✅ JAR 包已复制到 release 目录"/>
                                <echo message="[INFO] 📁 文件: release/${project.artifactId}-${project.version}.jar"/>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <!-- 在 Windows 平台上将控制台编码切换为 GBK，避免默认 cmd 下中文乱码 -->
    <profiles>
        <profile>
            <id>windows-console-gbk</id>
            <activation>
                <os>
                    <family>Windows</family>
                </os>
            </activation>
            <properties>
                <console.encoding>GBK</console.encoding>
            </properties>
        </profile>

        <!--
            快速开发 profile: 用于跳过签名和部署，加快构建速度
            使用方式: mvn install -P quick 或 mvn package -P quick
        -->
        <profile>
            <id>quick</id>
            <properties>
                <!-- 跳过 GPG 签名 -->
                <gpg.skip>true</gpg.skip>
            </properties>
        </profile>


    </profiles>

</project>
