<?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.uniapis</groupId>
    <artifactId>foundation-parent</artifactId>
    <version>2.0.0-TEST-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>foundation-parent</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>21</java.version>
        <springboot.version>3.5.13</springboot.version>
        <springdatacommons.version>3.5.10</springdatacommons.version>
        <log4j2.version>2.23.1</log4j2.version>
        <junit.platform.version>1.9.2</junit.platform.version>
        <junit.jupiter.version>5.9.2</junit.jupiter.version>
        <foundation.parent.version>2.0.0-TEST-SNAPSHOT</foundation.parent.version>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${springboot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter</artifactId>
                <version>${springboot.version}</version>
                <exclusions>
                    <exclusion>
                        <!--排除spring自带日志，使用log4j2-->
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-logging</artifactId>
                    </exclusion>
<!--                    <exclusion>-->
<!--                        <groupId>org.yaml</groupId>-->
<!--                        <artifactId>snakeyaml</artifactId>-->
<!--                    </exclusion>-->
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
                <version>${springboot.version}</version>
                <exclusions>
                    <exclusion>
                        <!--排除spring自带日志，使用log4j2-->
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-logging</artifactId>
                    </exclusion>
<!--                    <exclusion>-->
<!--                        <groupId>com.fasterxml.jackson.core</groupId>-->
<!--                        <artifactId>jackson-databind</artifactId>-->
<!--                    </exclusion>-->
<!--                    <exclusion>-->
<!--                        <groupId>com.fasterxml.jackson.datatype</groupId>-->
<!--                        <artifactId>jackson-datatype-jdk8</artifactId>-->
<!--                    </exclusion>-->
<!--                    <exclusion>-->
<!--                        <groupId>com.fasterxml.jackson.datatype</groupId>-->
<!--                        <artifactId>jackson-datatype-jsr310</artifactId>-->
<!--                    </exclusion>-->
<!--                    <exclusion>-->
<!--                        <groupId>com.fasterxml.jackson.module</groupId>-->
<!--                        <artifactId>jackson-module-parameter-names</artifactId>-->
<!--                    </exclusion>-->
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-log4j2</artifactId>
                <version>${springboot.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.logging.log4j</groupId>
                        <artifactId>log4j-core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.logging.log4j</groupId>
                        <artifactId>log4j-jul</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.logging.log4j</groupId>
                        <artifactId>log4j-slf4j2-impl</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.logging.log4j</groupId>
                        <artifactId>log4j-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework.data</groupId>
                <artifactId>spring-data-commons</artifactId>
                <version>${springdatacommons.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!-- ↓↓ log4j 2 依赖 ↓↓ -->
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log4j2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log4j2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j2-impl</artifactId>
                <version>${log4j2.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-jul</artifactId>
                <version>${log4j2.version}</version>
            </dependency>
            <dependency>
                <groupId>com.lmax</groupId>
                <artifactId>disruptor</artifactId>
                <version>4.0.0</version>
            </dependency>
            <!-- ↑↑ log4j 2 依赖 ↑↑ -->
            <!-- ↓↓ 读取yaml配置依赖 ↓↓ -->
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>2.5</version>
            </dependency>
            <!-- ↑↑ 读取yaml配置依赖 ↑↑ -->
            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-runner</artifactId>
                <version>${junit.platform.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>${junit.jupiter.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.jupiter.version}</version>
            </dependency>
<!--            <dependency>-->
<!--                <groupId>org.apache.httpcomponents.client5</groupId>-->
<!--                <artifactId>httpclient5</artifactId>-->
<!--                <version>5.3.1</version> &lt;!&ndash; 使用最新版本 &ndash;&gt;-->
<!--                <exclusions>-->
<!--                    <exclusion>-->
<!--                        <groupId>org.slf4j</groupId>-->
<!--                        <artifactId>slf4j-api</artifactId>-->
<!--                    </exclusion>-->
<!--                </exclusions>-->
<!--            </dependency>-->
<!--            <dependency>-->
<!--                <groupId>org.apache.httpcomponents.core5</groupId>-->
<!--                <artifactId>httpcore5</artifactId>-->
<!--                <version>5.2.4</version>-->
<!--            </dependency>-->
            <dependency>
                <groupId>org.apache.httpcomponents.client5</groupId>
                <artifactId>httpclient5-fluent</artifactId>
                <version>5.5.1</version> <!-- 使用最新的版本号 -->
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <finalName>${project.artifactId}</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <excludes>
                    <!--<exclude>**/jdbc.properties</exclude>-->
                    <exclude>log4j2_bak.xml</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <testFailureIgnore>true</testFailureIgnore>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <!--<plugin>-->
            <!--<artifactId>maven-source-plugin</artifactId>-->
            <!--<version>3.3.0</version>-->
            <!--<configuration>-->
            <!--<attach>true</attach>-->
            <!--</configuration>-->
            <!--<executions>-->
            <!--<execution>-->
            <!--<phase>compile</phase>-->
            <!--<goals>-->
            <!--<goal>jar</goal>-->
            <!--</goals>-->
            <!--</execution>-->
            <!--</executions>-->
            <!--</plugin>-->
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>n</id>
            <distributionManagement>
                <repository>
                    <id>newtouch-nexus2</id>
                    <name>>newtouch-nexus2-repository</name>
                    <url>https://www.bjnfbk.com/nexus2/repository/framework-snapshots/</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>picc-pscp</id>
            <properties>
                <project.env>-TEST-SNAPSHOT</project.env>
                <war.packagingExcludes>*.md,**/RunWithLoader.*,**/LicenseGenerator.*</war.packagingExcludes>
                <war.warSourceExcludes></war.warSourceExcludes>
            </properties>
            <distributionManagement>
                <repository>
                    <id>picc-pscp-nexus</id>
                    <name>nexus-repository</name>
                    <url>http://10.137.195.185:8081/nexus/repository/maven-pscp/</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>picc-new</id>
            <properties>
                <project.env>-TEST-SNAPSHOT</project.env>
                <war.packagingExcludes>*.md,**/RunWithLoader.*,**/LicenseGenerator.*</war.packagingExcludes>
                <war.warSourceExcludes></war.warSourceExcludes>
            </properties>
            <distributionManagement>
                <repository>
                    <id>picc-new-nexus</id>
                    <name>nexus-repository</name>
                    <url>http://10.135.100.243:8081/nexus/repository/maven-snapshots/</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>picc-pass</id>
            <properties>
                <project.env>-TEST-SNAPSHOT</project.env>
                <war.packagingExcludes>*.md,**/RunWithLoader.*,**/LicenseGenerator.*</war.packagingExcludes>
                <war.warSourceExcludes></war.warSourceExcludes>
            </properties>
            <distributionManagement>
                <repository>
                    <id>d59839-maven-cppz</id>
                    <name>maven-dop</name>
                    <url>http://bkrepo.itservice.piccnet/maven/d59839/maven-cppz/</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>picc-185</id>
            <distributionManagement>
                <repository>
                    <id>picc-185</id>
                    <name>picc-185</name>
                    <url>http://10.137.195.185:8081/nexus/repository/maven-snapshots/</url>

                </repository>
            </distributionManagement>
        </profile>
    </profiles>
    <!--    <distributionManagement>-->
    <!--        <snapshotRepository>-->
    <!--            <id>nexus-snapshots</id>-->
    <!--            <url>http://10.1.139.147/nexus/repository/xzxtb-snapshots/</url>-->
    <!--        </snapshotRepository>-->
    <!--    </distributionManagement>-->

    <distributionManagement>
        <snapshotRepository>
            <id>nexus-snapshots</id>
            <url>https://www.bjnfbk.com/nexus2/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
</project>