<?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>com.storlead.boot</groupId>
        <artifactId>storlead-centre-platform</artifactId>
        <version>${revision}</version>
    </parent>

    <artifactId>storlead-centre-api</artifactId>
    <packaging>jar</packaging>
    <!--    <properties>-->
    <!--        <maven.compiler.source>11</maven.compiler.source>-->
    <!--        <maven.compiler.target>11</maven.compiler.target>-->
    <!--        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>-->
    <!--    </properties>-->

    <dependencies>

        <dependency>
            <groupId>com.storlead.boot</groupId>
            <artifactId>storlead-web</artifactId>
        </dependency>

        <dependency>
            <groupId>com.storlead.boot</groupId>
            <artifactId>storlead-user</artifactId>
        </dependency>

        <dependency>
            <groupId>com.storlead.boot</groupId>
            <artifactId>storlead-sms</artifactId>
        </dependency>

        <dependency>
            <groupId>com.storlead.boot</groupId>
            <artifactId>storlead-wx</artifactId>
        </dependency>

        <dependency>
            <groupId>com.storlead.boot</groupId>
            <artifactId>storlead-mybatis</artifactId>
        </dependency>

        <dependency>
            <groupId>com.storlead.boot</groupId>
            <artifactId>storlead-common</artifactId>
        </dependency>

        <dependency>
            <groupId>com.storlead.boot</groupId>
            <artifactId>storlead-centre-service</artifactId>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
        </dependency>


        <!-- 参数校验 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-ui</artifactId>
        </dependency>

        <!--        &lt;!&ndash; Apache HttpClient (用于HTTP客户端连接池) &ndash;&gt;-->
        <!--        <dependency>-->
        <!--            <groupId>org.apache.httpcomponents.client5</groupId>-->
        <!--            <artifactId>httpclient5</artifactId>-->
        <!--        </dependency>-->

        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-test</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Spring Boot WebSocket -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-websocket</artifactId>
        </dependency>

        <!-- Spring Boot WebFlux (响应式编程) -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-webflux</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>

        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-generator</artifactId>
            <version>3.1.2</version>
        </dependency>
        <!--        <dependency>-->
        <!--            <groupId>org.java-websocket</groupId>-->
        <!--            <artifactId>Java-WebSocket</artifactId>-->
        <!--        </dependency>-->
        <!--        -->
        <!--        <dependency>-->
        <!--            <groupId>com.squareup.okhttp3</groupId>-->
        <!--            <artifactId>okhttp-sse</artifactId>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>org.apache.httpcomponents.client5</groupId>-->
        <!--            <artifactId>httpclient5</artifactId>-->
        <!--        </dependency>-->

        <!--        &lt;!&ndash; https://mvnrepository.com/artifact/org.apache.httpcomponents.core5/httpcore5 &ndash;&gt;-->
        <!--        <dependency>-->
        <!--            <groupId>org.apache.httpcomponents.core5</groupId>-->
        <!--            <artifactId>httpcore5</artifactId>-->
        <!--        </dependency>-->

        <!--        <dependency>-->
        <!--            <groupId>org.apache.httpcomponents</groupId>-->
        <!--            <artifactId>httpasyncclient</artifactId>-->
        <!--        </dependency>-->


        <!--        &lt;!&ndash; https://mvnrepository.com/artifact/org.apache.httpcomponents.core5/httpcore5-h2 &ndash;&gt;-->
        <!--        <dependency>-->
        <!--            <groupId>org.apache.httpcomponents.core5</groupId>-->
        <!--            <artifactId>httpcore5-h2</artifactId>-->
        <!--        </dependency>-->

        <!--        <dependency>-->
        <!--            <groupId>org.springframework.boot</groupId>-->
        <!--            <artifactId>spring-boot-starter-websocket</artifactId>-->
        <!--            <version>2.7.2</version>-->
        <!--        </dependency>-->

        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>dev</id>
            <properties>
                <environment>dev</environment>
            </properties>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile>
            <id>test</id>
            <properties>
                <environment>test</environment>
            </properties>
        </profile>
        <profile>
            <id>prod</id>
            <properties>
                <environment>prod</environment>
            </properties>
        </profile>
        <profile>
            <id>local</id>
            <properties>
                <environment>local</environment>
            </properties>
        </profile>
    </profiles>


    <build>
        <finalName>storlead-ai-api</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                    <include>**/*.json</include>
                    <include>**/*.ftl</include>
                    <include>**/*.xlsx</include>
                    <include>templates/**</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*.xlsx</include>
                    <include>**/*.xls</include>
                </includes>
            </resource>
        </resources>

        <plugins>

            <!-- spring-boot-maven-plugin必须在proguard混淆后运行，这样它就会获取已经混淆的文件-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>com.storlead.ai.AiPlatformApplication</mainClass>
                    <layout>ZIP</layout>
                    <!--<includes>
                        &lt;!&ndash; 项目启动jar包中排除依赖包 &ndash;&gt;
                        <include>
                            <groupId>non-exists</groupId>
                            <artifactId>non-exists</artifactId>
                        </include>
                    </includes>-->
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- 指定JDK编译版本 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>17</source>
                    <target>17</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <!-- 打包时不压缩xlsx、xls文件避免打包后xlsx、xls文件被损坏 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <nonFilteredFileExtensions>
                        <nonFilteredFileExtension>doc</nonFilteredFileExtension>
                        <nonFilteredFileExtension>docx</nonFilteredFileExtension>
                        <nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
                        <nonFilteredFileExtension>xls</nonFilteredFileExtension>
                    </nonFilteredFileExtensions>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
