<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.cf.imes</groupId>
        <artifactId>cf-module-prod-executor</artifactId>
        <version>${revision}</version>
    </parent>
    <packaging>jar</packaging>
    <artifactId>cf-module-prod-executor-biz</artifactId>
    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <!--  依赖服务  -->
        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-module-prod-executor-api</artifactId>
            <version>${revision}</version>
        </dependency>
        <!--  业务组件  -->
        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-spring-boot-starter-biz-operatelog</artifactId>
        </dependency>
        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-spring-boot-starter-biz-organ</artifactId>
        </dependency>
        <!--  Web 相关  -->
        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-spring-boot-starter-security</artifactId>
        </dependency>
        <!--  DB 相关  -->
        <!--   <dependency>
                      <groupId>org.apache.shardingsphere</groupId>
                      <artifactId>sharding-jdbc-spring-boot-starter</artifactId>
                      <version>4.1.0</version>
                  </dependency>
           -->
        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-spring-boot-starter-mybatis</artifactId>
        </dependency>
        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-spring-boot-starter-redis</artifactId>
        </dependency>
        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-spring-boot-starter-elasticsearch</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>jakarta.json</groupId>
                    <artifactId>jakarta.json-api</artifactId>
                </exclusion>
            </exclusions>
            <version>${revision}</version>
        </dependency>

        <dependency>
            <groupId>jakarta.json</groupId>
            <artifactId>jakarta.json-api</artifactId>
            <version>2.1.1</version>
        </dependency>

        <!--  RPC 远程调用相关  -->
        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-spring-boot-starter-rpc</artifactId>
        </dependency>
        <!--  Registry 注册中心相关  -->
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
        </dependency>
        <!--  Config 配置中心相关  -->
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
        </dependency>
        <!--  Test 测试相关  -->
        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!--  工具类相关  -->
        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-spring-boot-starter-excel</artifactId>
        </dependency>
        <dependency>
            <groupId>cn.smallbun.screw</groupId>
            <artifactId>screw-core</artifactId>
            <!--  实现数据库文档  -->
        </dependency>
        <!--  监控相关  -->
        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-spring-boot-starter-monitor</artifactId>
        </dependency>
        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-server</artifactId>
            <!--  实现 Spring Boot Admin Server 服务端  -->
        </dependency>
        <!--  三方云服务相关  -->
        <dependency>
            <groupId>io.vavr</groupId>
            <artifactId>vavr</artifactId>
            <version>0.10.2</version>
            <scope>compile</scope>
        </dependency>
<!--        <dependency>-->
<!--            <groupId>org.codehaus.groovy</groupId>-->
<!--            <artifactId>groovy</artifactId>-->
<!--        </dependency>-->
        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-spring-boot-starter-biz-data-permission</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>uk.co.jemos.podam</groupId>
            <artifactId>podam</artifactId>
        </dependency>


        <!-- https://mvnrepository.com/artifact/com.monitorjbl/xlsx-streamer -->
        <dependency>
            <groupId>com.monitorjbl</groupId>
            <artifactId>xlsx-streamer</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.xml.stream</groupId>
            <artifactId>stax-api</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.jacob/jacob -->
        <dependency>
            <groupId>com.hynnet</groupId>
            <artifactId>jacob</artifactId>
        </dependency>


        <!-- JSON -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
        </dependency>
        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-spring-boot-starter-mq</artifactId>
        </dependency>

        <dependency>
            <groupId>com.cf.imes</groupId>
            <artifactId>cf-spring-boot-starter-biz-id</artifactId>
        </dependency>

    </dependencies>
    <build>
        <!--  设置构建的 jar 包名  -->
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <!--  打包  -->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${spring.boot.version}</version>
                <configuration>
                    <layout>ZIP</layout>
                    <includes>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-common</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-module-infra-api</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-module-prod-executor-api</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-module-system-api</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-spring-boot-starter-biz-data-permission</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-spring-boot-starter-biz-operatelog</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-spring-boot-starter-biz-organ</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-spring-boot-starter-elasticsearch</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-spring-boot-starter-excel</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-spring-boot-starter-monitor</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-spring-boot-starter-mybatis</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-spring-boot-starter-redis</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-spring-boot-starter-rpc</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-spring-boot-starter-security</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-spring-boot-starter-web</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-spring-boot-starter-mq</artifactId>
                        </include>
                        <include>
                            <groupId>com.cf.imes</groupId>
                            <artifactId>cf-spring-boot-starter-biz-id</artifactId>
                        </include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                            <!--  将引入的 jar 打入其中  -->
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven.dependency.plugin.version}</version>
                <executions>
                    <execution>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <!-- 将依赖放到target/lib目录下 -->
                            <outputDirectory>target/lib</outputDirectory>
                            <!-- 排除自身的代码包-->
                            <excludeGroupIds>com.cf.imes</excludeGroupIds>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>${maven.assembly.plugin.version}</version>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <descriptors>
                        <!--指定assembly配置文件位置-->
                        <descriptor>src/main/build/assembly.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>bundle</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>