<?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>com.github.hughwick</groupId>
    <artifactId>toolbox-parent</artifactId>
    <version>3.0.26</version>
    <packaging>pom</packaging>
    <name>Toolbox parent</name>
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <modules>
        <module>toolbox-all</module>
        <module>toolbox-aop</module>
        <module>toolbox-db</module>
        <module>toolbox-core</module>
        <module>toolbox-crypto</module>
        <module>toolbox-cache</module>
        <module>toolbox-bean</module>
        <module>toolbox-json</module>
        <module>toolbox-http</module>
        <module>toolbox-mongodb</module>
    </modules>

    <properties>
        <!--============================== MAIN ==============================-->
        <java.version>17</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <junit-jupiter.version>5.9.2</junit-jupiter.version>
        <!--========================== All Plugins START =====================-->
        <plugin.compiler.version>3.8.1</plugin.compiler.version>
        <plugin.sonar.version>3.1.1</plugin.sonar.version>
        <plugin.surefire.version>3.5.2</plugin.surefire.version>
        <plugin.jacoco.version>0.8.12</plugin.jacoco.version>
        <plugin.surefire.skip-it>false</plugin.surefire.skip-it>
        <plugin.surefire.ignore-failure>false</plugin.surefire.ignore-failure>
        <plugin.maven-source-plugin.version>2.2.1</plugin.maven-source-plugin.version>
        <plugin.maven-javadoc-plugin.version>3.3.1</plugin.maven-javadoc-plugin.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <!--============================== other ==============================-->
        <lombok.version>1.18.24</lombok.version>
        <!--    与spring 对其    -->
        <spring.version>6.1.17</spring.version>
        <spring-data-mongodb.version>4.3.9</spring-data-mongodb.version>
        <!--============================== 第三方工具类 ==============================-->
        <google-gson.version>2.11.0</google-gson.version>
        <google-guava.version>33.1.0-jre</google-guava.version>
        <org-json.version>20250517</org-json.version>
        <fastjson.version>2.0.61</fastjson.version>
        <okhttp.version>4.9.3</okhttp.version>
        <kryo.version>4.0.2</kryo.version>
        <objenesis.version>3.3</objenesis.version>
        <slf4j-simple.version>2.0.16</slf4j-simple.version>
        <ip2region.version>3.3.4</ip2region.version>
        <yauaa.version>8.2.0</yauaa.version>
        <mybatis-plus.version>3.5.8</mybatis-plus.version>
        <thumbnailator.version>0.4.20</thumbnailator.version>
        <redis.version>3.7.1</redis.version>
        <caffeine.version>3.1.8</caffeine.version>
        <jakarta.servlet-api.version>6.0.0</jakarta.servlet-api.version>
        <jakarta.validation-api.version>3.0.2</jakarta.validation-api.version>
        <swagger-core-jakarta.version>2.2.34</swagger-core-jakarta.version>
        <pdfbox.version>2.0.29</pdfbox.version>
        <metadata-extractor.version>2.19.0</metadata-extractor.version>
        <bcprov-jdk18on.version>1.84</bcprov-jdk18on.version>
        <mongodb-driver-sync.version>5.0.1</mongodb-driver-sync.version>
        <lz4-java.version>1.10.2</lz4-java.version>
        <!--    test powermock 版本号与mockito版本号对等  -->
        <powermock.version>2.0.2</powermock.version>
        <mockito.version>2.23.4</mockito.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>mockwebserver</artifactId>
            <version>${okhttp.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.powermock/powermock-api-mockito2 -->
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito2</artifactId>
            <version>${powermock.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.powermock/powermock-core -->
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-core</artifactId>
            <version>${powermock.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.powermock/powermock-module-junit4 -->
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <version>${powermock.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.mockito/mockito-core -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <!--     阿里json解析   -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <scope>test</scope>
        </dependency>
        <!--    html 转pdf工具    -->
        <dependency>
            <groupId>io.woo</groupId>
            <artifactId>htmltopdf</artifactId>
            <version>1.0.8</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${google-gson.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/com.alibaba.fastjson2/fastjson2 -->
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>${fastjson.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.json/json -->
            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>${org-json.version}</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>okhttp</artifactId>
                <version>${okhttp.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->
            <dependency>
                <groupId>jakarta.servlet</groupId>
                <artifactId>jakarta.servlet-api</artifactId>
                <version>${jakarta.servlet-api.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/jakarta.validation/jakarta.validation-api -->
            <dependency>
                <groupId>jakarta.validation</groupId>
                <artifactId>jakarta.validation-api</artifactId>
                <version>${jakarta.validation-api.version}</version>
            </dependency>
            <!-- Kryo是一个快速高效的Java序列化框架 https://mvnrepository.com/artifact/com.esotericsoftware/kryo -->
            <dependency>
                <groupId>com.esotericsoftware</groupId>
                <artifactId>kryo</artifactId>
                <version>${kryo.version}</version>
            </dependency>
            <!-- Source: https://mvnrepository.com/artifact/org.objenesis/objenesis -->
            <dependency>
                <groupId>org.objenesis</groupId>
                <artifactId>objenesis</artifactId>
                <version>${objenesis.version}</version>
            </dependency>
            <!-- 谷歌套件 https://mvnrepository.com/artifact/com.google.guava/guava -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${google-guava.version}</version>
            </dependency>
            <!--  IP解析  https://mvnrepository.com/artifact/org.lionsoul/ip2region  -->
            <dependency>
                <groupId>org.lionsoul</groupId>
                <artifactId>ip2region</artifactId>
                <version>${ip2region.version}</version>
            </dependency>
            <!-- Source: https://mvnrepository.com/artifact/nl.basjes.parse.useragent/yauaa -->
            <dependency>
                <groupId>nl.basjes.parse.useragent</groupId>
                <artifactId>yauaa</artifactId>
                <version>${yauaa.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${slf4j-simple.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/com.baomidou/mybatis-plus -->
            <dependency>
                <groupId>com.baomidou</groupId>
                <artifactId>mybatis-plus</artifactId>
                <version>${mybatis-plus.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/redis.clients/jedis -->
            <dependency>
                <groupId>redis.clients</groupId>
                <artifactId>jedis</artifactId>
                <version>${redis.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.ben-manes.caffeine</groupId>
                <artifactId>caffeine</artifactId>
                <version>${caffeine.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-core-jakarta -->
            <dependency>
                <groupId>io.swagger.core.v3</groupId>
                <artifactId>swagger-core-jakarta</artifactId>
                <version>${swagger-core-jakarta.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk18on -->
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk18on</artifactId>
                <version>${bcprov-jdk18on.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox -->
            <dependency>
                <groupId>org.apache.pdfbox</groupId>
                <artifactId>pdfbox</artifactId>
                <version>${pdfbox.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.data</groupId>
                <artifactId>spring-data-mongodb</artifactId>
                <version>${spring-data-mongodb.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.mongodb/mongodb-driver-sync -->
            <dependency>
                <groupId>org.mongodb</groupId>
                <artifactId>mongodb-driver-sync</artifactId>
                <version>${mongodb-driver-sync.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/net.coobird/thumbnailator -->
            <dependency>
                <groupId>net.coobird</groupId>
                <artifactId>thumbnailator</artifactId>
                <version>${thumbnailator.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/com.drewnoakes/metadata-extractor -->
            <dependency>
                <groupId>com.drewnoakes</groupId>
                <artifactId>metadata-extractor</artifactId>
                <version>${metadata-extractor.version}</version>
            </dependency>

            <!-- Source: https://mvnrepository.com/artifact/at.yawk.lz4/lz4-java -->
            <dependency>
                <groupId>at.yawk.lz4</groupId>
                <artifactId>lz4-java</artifactId>
                <version>${lz4-java.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.hughwick</groupId>
                <artifactId>toolbox-json</artifactId>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <pluginManagement>
            <plugins>
                <!-- jacoco plugin -->
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${plugin.jacoco.version}</version>
                    <executions>
                        <execution>
                            <!-- 在maven的initialize阶段，将Jacoco的runtime agent作为VM的一个参数 传给被测程序，用于监控JVM中的调用。 -->
                            <id>prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <!-- 在程序的verify阶段，执行report测试的程序。 文件的输入为perpare-agent阶段中设置或者默认的jacoco.exec.
						参数 includes和excludes可用来选定report中过滤的类。 -->
                        <execution>
                            <id>report</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!--compiler plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${plugin.compiler.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <!--=================================== coveralls START ===================================-->
            <!--命令：mvn test 生成xml txt测试报告 （maven-surefire-plugin mvn默认使用插件,可以不用配置） -->
            <!--命令：mvn surefire-report:report 生成测试报告html -->
            <!--junit5 下方插件的version要大于2.22.0，否则无法执行test-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${plugin.surefire.version}</version>
                <!--                <configuration>-->
                <!--                    <argLine>-Xmx1024m -Dfile.encoding=UTF-8</argLine>&lt;!&ndash; 解决从mvn test中读取测试数据时的中文乱码问题 &ndash;&gt;-->
                <!--                </configuration>-->
            </plugin>
            <!--=================================== coveralls END ===================================-->
            <!--sonar-->
            <plugin>
                <groupId>org.sonarsource.scanner.maven</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>${plugin.sonar.version}</version>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <!--============================== ADD For sonatype START ==============================-->
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo,manual</distribution>
        </license>
    </licenses>
    <!-- SCM信息 -->
    <scm>
        <connection>scm:git:https://github.com/HughWick/toolbox.git</connection>
        <developerConnection>scm:git:https://github.com/HughWick/toolbox.git</developerConnection>
        <url>https://github.com/HughWick/toolbox</url>
    </scm>
    <!-- 开发者信息 -->
    <developers>
        <developer>
            <name>Hugh Wick</name>
            <email>dang_star@live.com</email>
            <organization>personal</organization>
            <url>https://github.com/HughWick</url>
        </developer>
    </developers>
    <!--============================== ADD For sonatype END ==============================-->

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!--   central发布插件    -->
                    <!--新账号的配置：将组件部署到OSSRH并将其发布到Central Repository-->
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.11.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <tokenAuth>true</tokenAuth>
                        </configuration>
                    </plugin>
                    <!-- Source -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${plugin.maven-source-plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Javadoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${plugin.maven-javadoc-plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- GPG -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <!--      新中央平台      -->
                <snapshotRepository>
                    <id>central</id>
                    <url>https://central.sonatype.com/</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>
    </profiles>
</project>