<?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-dependencies</artifactId>
        <version>3.3.4</version>
        <relativePath/>
    </parent>


    <groupId>com.github.microservice</groupId>
    <artifactId>MSConfigure</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>pom</packaging>

    <properties>

        <!-- 项目编码 -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!--JDK版本-->
        <java.version>17</java.version>

        <!-- spring boot  -->
        <spring-boot.version>3.3.4</spring-boot.version>
        <!-- spring mvc -->
        <spring-mvc.version>6.1.13</spring-mvc.version>
<!--        <spring-integration-core.version>6.3.4</spring-integration-core.version>-->

        <!-- spring cloud -->
        <spring-cloud-dependencies.version>2023.0.3</spring-cloud-dependencies.version>
        <spring-cloud.version>4.1.4</spring-cloud.version>
        <spring-cloud-starter-stream.version>4.1.3</spring-cloud-starter-stream.version>
        <spring-cloud-bus.version>4.1.2</spring-cloud-bus.version>
        <spring-cloud-starter-config.version>4.1.3</spring-cloud-starter-config.version>
        <spring-cloud-starter-consul-discovery.version>4.1.2</spring-cloud-starter-consul-discovery.version>
        <spring-cloud-gateway.version>4.1.5</spring-cloud-gateway.version>

        <netflix-hystrix.version>2.2.10.RELEASE</netflix-hystrix.version>
        <netflix-ribbon.version>2.2.10.RELEASE</netflix-ribbon.version>

        <!-- jpa -->
        <spring-boot-starter-data-jpa.version>3.3.4</spring-boot-starter-data-jpa.version>
        <spring-data-jpa.version>3.3.4</spring-data-jpa.version>

        <!-- 其他库 -->
        <javax.servlet.jsp-api.version>2.3.3</javax.servlet.jsp-api.version>
        <servlets-ssi.version>5.0.16</servlets-ssi.version>

        <!--
        springboot3 弃用
        <javax.servlet-api.version>4.0.1</javax.servlet-api.version>
        -->

        <commons-fileupload.version>1.5</commons-fileupload.version>
        <jstl.version>1.2</jstl.version>
        <gson.version>2.11.0</gson.version>
        <jackson.version>2.17.1</jackson.version>
        <commons-beanutils.version>1.9.4</commons-beanutils.version>
        <hibernate.version>6.5.2.Final</hibernate.version>
        <jaxb-api.version>2.3.1</jaxb-api.version>
        <javax.annotation-api.version>1.3.2</javax.annotation-api.version>
        <javassist.version>3.30.2-GA</javassist.version>


        <!--链路追踪-->
        <zipkin.version>2.2.8.RELEASE</zipkin.version>
        <!-- 插件 -->
        <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
        <maven-war-plugin.version>3.4.0</maven-war-plugin.version>
        <maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>

        <!--项目版本-->
        <Project.version>1.0.0-SNAPSHOT</Project.version>
        <Project.groupId>com.github.microservice</Project.groupId>


        <!-- 注册发现服务端口 -->
        <ApplicationCenter.port>8500</ApplicationCenter.port>
        <!-- 网关端口-->
        <GetWayCenter.port>80</GetWayCenter.port>
        <!--开放平台-->
        <OpenApi.port>7900</OpenApi.port>
        <!-- 配置中心 -->
        <ConfigCenter.port>8000</ConfigCenter.port>
        <!--用户中心-->
        <UserCenter.port>8100</UserCenter.port>
        <!--推送中心-->
        <PushCenter.port>8300</PushCenter.port>
        <!--文件中心-->
        <FileCenter.port>8400</FileCenter.port>
        <!--机器人验证码端口-->
        <RobotFirewall.port>8600</RobotFirewall.port>
        <!--权限中心-->
        <AuthCenter.port>8700</AuthCenter.port>
        <!--MQ中心-->
        <MQCenter.port>8800</MQCenter.port>
        <!--支付中心-->
        <PayCenter.port>8900</PayCenter.port>


    </properties>


    <profiles>
        <!--开发环境-->
        <profile>
            <id>dev</id>

            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>

            <properties>
                <spring.profiles.active>dev</spring.profiles.active>

                <ApplicationCenter.url>172.24.50.53:8500</ApplicationCenter.url>
                <ConfigCenter.url>http://172.24.50.53:${ConfigCenter.port}</ConfigCenter.url>
                <Kafka.brokers>172.24.50.53:9092</Kafka.brokers>
                <Zipkin.baseUrl>http://172.24.50.53:9411</Zipkin.baseUrl>
                <Zipkin.sampler.probability>0.01</Zipkin.sampler.probability>
            </properties>
        </profile>

        <!--本地环境-->
        <profile>
            <id>local</id>
            <properties>
                <spring.profiles.active>local</spring.profiles.active>

                <ApplicationCenter.url>192.168.31.98:8500</ApplicationCenter.url>
                <ConfigCenter.url>http://192.168.31.98:${ConfigCenter.port}</ConfigCenter.url>
                <Kafka.brokers>192.168.31.98:9092</Kafka.brokers>
                <Zipkin.baseUrl>http://192.168.31.98:9411</Zipkin.baseUrl>
                <Zipkin.sampler.probability>0.01</Zipkin.sampler.probability>
            </properties>
        </profile>

        <!--生产环境-->
        <profile>
            <id>prod</id>
            <properties>
                <spring.profiles.active>prod</spring.profiles.active>

                <ApplicationCenter.url>172.24.50.47:8500,172.24.50.47:8501,172.24.50.47:8502</ApplicationCenter.url>
                <ConfigCenter.url>http://172.24.50.47:${ConfigCenter.port}</ConfigCenter.url>
                <Kafka.brokers>172.24.50.52:9092</Kafka.brokers>
                <Zipkin.baseUrl>http://172.24.50.52:9411</Zipkin.baseUrl>
                <Zipkin.sampler.probability>0.01</Zipkin.sampler.probability>
            </properties>
        </profile>
    </profiles>


    <!--依赖-->
    <dependencies>
        <!-- spring boot -->
        <!--tomcat运行环境-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <version>${spring-boot.version}</version>
        </dependency>
        <!--自带web容器-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>${spring-boot.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <version>${spring-boot.version}</version>
            <optional>true</optional>
        </dependency>
        <!--测试-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>${spring-boot.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- gson -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>${gson.version}</version>
        </dependency>

        <!--Spring mvc-->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${spring-mvc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring-mvc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>${spring-mvc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>${spring-mvc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring-mvc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>${spring-mvc.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring-mvc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <version>${spring-mvc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>${spring-mvc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-expression</artifactId>
            <version>${spring-mvc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-oxm</artifactId>
            <version>${spring-mvc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-messaging</artifactId>
            <version>${spring-mvc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring-mvc.version}</version>
        </dependency>


        <!-- 依赖包 -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>${jstl.version}</version>
        </dependency>

        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>${commons-fileupload.version}</version>
        </dependency>
        <!--        <dependency>-->
        <!--            <groupId>javax.servlet</groupId>-->
        <!--            <artifactId>javax.servlet-api</artifactId>-->
        <!--            <version>${javax.servlet-api.version}</version>-->
        <!--        </dependency>-->

        <dependency>
            <groupId>tomcat</groupId>
            <artifactId>servlets-ssi</artifactId>
            <version>${servlets-ssi.version}</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>javax.servlet.jsp-api</artifactId>
            <version>${javax.servlet.jsp-api.version}</version>
        </dependency>


        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>


        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents.client5</groupId>
            <artifactId>httpclient5</artifactId>
        </dependency>



        <dependency>
            <groupId>org.apache.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>${groovy.version}</version>
            <type>pom</type>
        </dependency>


        <!-- Get Set 需要IDE 安装 lombok plugin -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
        </dependency>


        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <version>${javax.annotation-api.version}</version>
        </dependency>


        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>${javassist.version}</version>
        </dependency>

    </dependencies>


    <!--Spring Cloud-->
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud-dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <repositories>
        <!-- 阿里-->
        <repository>
            <id>nexus</id>
            <name>nexus</name>
            <url>https://maven.aliyun.com/nexus/content/groups/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>
        <repository>
            <id>spring-snapshots</id>
            <name>Spring Snapshots</name>
            <url>https://repo.spring.io/snapshot</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>


    <pluginRepositories>
        <pluginRepository>
            <id>groovy-plugins-release</id>
            <url>https://groovy.jfrog.io/artifactory/plugins-release</url>
        </pluginRepository>
    </pluginRepositories>


    <!--构建-->
    <build>
        <plugins>
            <!--支持yaml读取pom的参数-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.3.1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <delimiters>
                        <delimiter>@</delimiter>
                    </delimiters>
                    <useDefaultDelimiters>true</useDefaultDelimiters>

                    <nonFilteredFileExtensions>
                        <nonFilteredFileExtension>jar</nonFilteredFileExtension>
                        <nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
                        <nonFilteredFileExtension>xls</nonFilteredFileExtension>
                        <nonFilteredFileExtension>zip</nonFilteredFileExtension>
                        <nonFilteredFileExtension>cer</nonFilteredFileExtension>
                        <nonFilteredFileExtension>pfx</nonFilteredFileExtension>
                        <nonFilteredFileExtension>py</nonFilteredFileExtension>
                        <nonFilteredFileExtension>keystore</nonFilteredFileExtension>
                    </nonFilteredFileExtensions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${spring-boot.version}</version>
                <configuration>
                    <includeSystemScope>true</includeSystemScope>
                </configuration>
            </plugin>

            <!-- groovy -->
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>2.1.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>addSources</goal>
                            <goal>addTestSources</goal>
                            <goal>generateStubs</goal>
                            <goal>compile</goal>
                            <goal>generateTestStubs</goal>
                            <goal>compileTests</goal>
                            <goal>removeStubs</goal>
                            <goal>removeTestStubs</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sources>
                        <source>
                            <directory>${project.basedir}/src/main/java</directory>
                            <includes>
                                <include>**/*.groovy</include>
                            </includes>
                        </source>
                    </sources>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>

                    <useIncrementalCompilation>false</useIncrementalCompilation>
                    <showDeprecation>true</showDeprecation>
                    <showWarnings>true</showWarnings>

                </configuration>
            </plugin>


            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>${maven-war-plugin.version}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>

        </plugins>

        <!-- properties 取 pom 配置 -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

    </build>

</project>