<?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>

    <artifactId>{{projectName}}-dependencies</artifactId>
    <groupId>{{packageName}}</groupId>
    <version>1.0.0.0</version>
    <packaging>pom</packaging>

    <!--  Spring Boot -->
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.1.RELEASE</version>
    </parent>

    <properties>
        <!--  Spring Cloud Alibaba(2.2.x.RELEASE) & Spring Cloud(Spring Cloud Greenwich) & Spring Boot(2.2.x.RELEASE) compatibility -->
        <spring-cloud-alibaba.version>2.2.1.RELEASE</spring-cloud-alibaba.version>

        <spring-cloud-openfeign.version>2.2.1.RELEASE</spring-cloud-openfeign.version>

        <!--  Alibaba Druid  -->
        <!--  <alibaba-druid.version>1.1.21</alibaba-druid.version>  -->

        <!--  Mybatis Plus -->
        <mybatis-plus.version>3.4.1</mybatis-plus.version>
        <mybatis-plus-dynamic-datasource.version>3.2.1</mybatis-plus-dynamic-datasource.version>

        <!--  Swagger2 -->
        <springfox-swagger.version>2.9.2</springfox-swagger.version>

        <!--  JBPM+Drools -->
        <drools-version>7.23.0.Final</drools-version>

        <!--  Error -->
        <zalando-problem-spring-web.version>0.23.0</zalando-problem-spring-web.version>

        <!--  Security  -->
        <spring-cloud-security.version>2.1.1.RELEASE</spring-cloud-security.version>

        <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
        <!--logstash-logback-encoder-->
        <logstash.version>5.2</logstash.version>

        <!--Zuul网关-->
        <spring-cloud-starter-netflix-zuul.version>2.2.1.RELEASE</spring-cloud-starter-netflix-zuul.version>

        <!--MapStruct高性能属性映射工具-->
        <mapstruct.version>1.3.0.Final</mapstruct.version>

        <!--Java Web Token-->
        <jsonwebtoken-jjwt.version>0.9.1</jsonwebtoken-jjwt.version>

        <!--Liquibase数据库版本更新工具-->
        <liquibase.version>3.9.0</liquibase.version>

        <!--H2内存数据库-->
        <h2.version>1.4.200</h2.version>

        <!--caffeine缓存-->
        <caffeine-cache.version>2.6.0</caffeine-cache.version>

        <!--反序列化工具-->
        <kryo.version>4.0.2</kryo.version>

        <!--httpClient -->
        <openfeign-httpclient.version>11.0</openfeign-httpclient.version>

        <!--baomidou-jobs定时服务 -->
        <baomidou-jobs.version>1.0.3</baomidou-jobs.version>

        <!-- eureka微服务注册中心 -->
        <eureka-client.version>2.2.1.RELEASE</eureka-client.version>

        <!-- 阿里sentinel熔断器 -->
        <alibaba-sentinel.version>2.1.1.RELEASE</alibaba-sentinel.version>

        <!-- 阿里seata分布式事务 -->
        <alibaba-seata.version>1.3.0</alibaba-seata.version>

        {{#each system.allPSSystemDBConfigs as |dbConfig|}}
            {{#if (eq dbConfig.dBType 'MYSQL5')}}
            {{else if (eq dbConfig.dBType 'ORACLE')}}
        <!-- Oracle 驱动 -->
        <oracle.version>19.8.0.0</oracle.version>
            {{else if (eq dbConfig.dBType 'POSTGRESQL')}}
        <!-- PostgreSql 驱动 -->
        <postgresql.version>42.2.6</postgresql.version>

            {{/if}}
        {{/each}}
{{#if system.enableMQ}}
        <rocketmq.version>4.7.0</rocketmq.version>
{{/if}}
        <flowable-modeler.version>6.4.2</flowable-modeler.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!--  Alibaba Cloud -->
            <dependency>
                <groupId>com.alibaba.cloud</groupId>
                <artifactId>spring-cloud-alibaba-dependencies</artifactId>
                <version>${spring-cloud-alibaba.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

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

            <!--  Alibaba Sentinel -->
            <dependency>
                <groupId>com.alibaba.cloud</groupId>
                <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
                <version>${alibaba-sentinel.version}</version>
            </dependency>

            <!--  eureka服务注册中心 -->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
                <version>${eureka-client.version}</version>
            </dependency>

            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>druid-spring-boot-starter</artifactId>
                <version>${alibaba-druid.version}</version>
            </dependency>

            <!--  Mybatis Plus 
            <dependency>
                <groupId>com.baomidou</groupId>
                <artifactId>mybatis-plus-boot-starter</artifactId>
                <version>${mybatis-plus.version}</version>
            </dependency>
            <dependency>
                <groupId>com.baomidou</groupId>
                <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
                <version>${mybatis-plus-dynamic-datasource.version}</version>
            </dependency> -->

            <!--  Liquibase  -->
            <dependency>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-core</artifactId>
                <version>${liquibase.version}</version>
            </dependency>

            <!--  H2  -->
            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>${h2.version}</version>
            </dependency>

            <!--  Swagger2  -->
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger2</artifactId>
                <version>${springfox-swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger-ui</artifactId>
                <version>${springfox-swagger.version}</version>
            </dependency>

            <!--  JBPM  -->
            <dependency>
                <groupId>org.jbpm</groupId>
                <artifactId>jbpm-flow-builder</artifactId>
                <version>${drools-version}</version>
            </dependency>
            <dependency>
                <groupId>org.jbpm</groupId>
                <artifactId>jbpm-bpmn2</artifactId>
                <version>${drools-version}</version>
            </dependency>

            <!--  Drools  -->
            <dependency>
                <groupId>org.drools</groupId>
                <artifactId>drools-compiler</artifactId>
                <version>${drools-version}</version>
            </dependency>
            <dependency>
                <groupId>org.drools</groupId>
                <artifactId>drools-core</artifactId>
                <version>${drools-version}</version>
            </dependency>
            <dependency>
                <groupId>org.kie</groupId>
                <artifactId>kie-spring</artifactId>
                <version>${drools-version}</version>
            </dependency>
            <dependency>
                <groupId>org.kie</groupId>
                <artifactId>kie-api</artifactId>
                <version>${drools-version}</version>
            </dependency>

            <dependency>
                <groupId>net.logstash.logback</groupId>
                <artifactId>logstash-logback-encoder</artifactId>
                <version>${logstash.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
                <version>${spring-cloud-starter-netflix-zuul.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct-jdk8</artifactId>
                <version>${mapstruct.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct-processor</artifactId>
                <version>${mapstruct.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-security</artifactId>
                <version>${spring-cloud-security.version}</version>
            </dependency>

            <dependency>
                <groupId>io.jsonwebtoken</groupId>
                <artifactId>jjwt</artifactId>
                <version>${jsonwebtoken-jjwt.version}</version>
            </dependency>

             <dependency>
                <groupId>org.zalando</groupId>
                <artifactId>problem-spring-web</artifactId>
                <version>${zalando-problem-spring-web.version}</version>
            </dependency>


            <dependency>
                <groupId>com.github.ben-manes.caffeine</groupId>
                <artifactId>caffeine</artifactId>
                <version>${caffeine-cache.version}</version>
            </dependency>

            <dependency>
                <groupId>com.esotericsoftware</groupId>
                <artifactId>kryo-shaded</artifactId>
                <version>${kryo.version}</version>
            </dependency>

            <dependency>
                <groupId>io.github.openfeign</groupId>
                <artifactId>feign-httpclient</artifactId>
                <version>${openfeign-httpclient.version}</version>
            </dependency>

            <dependency>
                <groupId>com.baomidou</groupId>
                <artifactId>jobs-spring-boot-starter</artifactId>
                <version>${baomidou-jobs.version}</version>
            </dependency>

{{#if system.enableGlobalTransaction}}
            <!--  阿里seata分布式事务 -->
            <dependency>
                <groupId>io.seata</groupId>
                <artifactId>seata-spring-boot-starter</artifactId>
                <version>${alibaba-seata.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.alibaba</groupId>
                        <artifactId>druid</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.alibaba.cloud</groupId>
                <artifactId>spring-cloud-starter-alibaba-seata</artifactId>
                <version>${spring-cloud-alibaba.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>io.seata</groupId>
                        <artifactId>seata-spring-boot-starter</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
{{/if}}

            <dependency>
                <groupId>org.flowable</groupId>
                <artifactId>flowable-json-converter</artifactId>
                <version>${flowable-modeler.version}</version>
            </dependency>
            <dependency>
                <groupId>org.flowable</groupId>
                <artifactId>flowable-ui-modeler-conf</artifactId>
                <version>${flowable-modeler.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>


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

        <!--  Spring Cloud -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
        </dependency>
        
        <!--  Alibaba Sentinel -->
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
        </dependency>

        <!--  Lombok -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>

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

        <!--  Liquibase -->
        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
        </dependency>
        
        <!--  H2内存库 -->
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>

{{#each system.allPSSystemDBConfigs as |dbConfig|}}
    {{#if (eq dbConfig.dBType 'MYSQL5')}}
        <!--  MySQL驱动包 -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.49</version>
        </dependency>

    {{else if (eq dbConfig.dBType 'ORACLE')}}
        <!--  Oracle驱动包 -->
        <dependency>
            <groupId>com.oracle.database.jdbc</groupId>
            <artifactId>ojdbc8</artifactId>
            <version>${oracle.version}</version>
        </dependency>

        <dependency>
            <groupId>com.oracle.database.nls</groupId>
            <artifactId>orai18n</artifactId>
            <version>${oracle.version}</version>
        </dependency>

    {{else if (eq dbConfig.dBType 'POSTGRESQL')}}
        <!--  PostgreSQL驱动包 -->
         <dependency>
             <groupId>org.postgresql</groupId>
             <artifactId>postgresql</artifactId>
             <version>${postgresql.version}</version>
         </dependency>

    {{/if}}
{{/each}}
{{#if system.enableES}}
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
        </dependency>

{{/if}}
{{#if system.enableMQ}}
        <dependency>
            <groupId>org.apache.rocketmq</groupId>
            <artifactId>rocketmq-client</artifactId>
            <version>${rocketmq.version}</version>
        </dependency>

{{/if}}
{{#each system.allPSSysSFPubs as |pub|}}
    {{#eq pub.contentType "CODE"}}
        {{#each pub.getPSSysSFPubPkgs as |package|}}
            {{#if package.pkgParam}}
        {{package.pkgParam}}

            {{/if}}
        {{/each}}
    {{/eq}}
{{/each}}
    </dependencies>
</project>
