<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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.dlink</groupId>
    <artifactId>dlink</artifactId>
    <packaging>pom</packaging>
    <version>0.6.7</version>

    <modules>
        <module>dlink-flink</module>
        <module>dlink-common</module>
        <module>dlink-client</module>
        <module>dlink-catalog</module>
        <module>dlink-gateway</module>
        <module>dlink-function</module>
        <module>dlink-metadata</module>
        <module>dlink-connectors</module>
        <module>dlink-executor</module>
        <module>dlink-extends</module>
        <module>dlink-alert</module>
        <module>dlink-daemon</module>
        <module>dlink-core</module>
        <module>dlink-app</module>
        <module>dlink-web</module>
        <module>dlink-admin</module>
        <module>dlink-assembly</module>
    </modules>

    <properties>
        <java.version>1.8</java.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
        <maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>

        <spring-boot-dependencies.version>2.6.3</spring-boot-dependencies.version>
        <hutool.version>5.8.4</hutool.version>
        <druid-starter>1.2.8</druid-starter>
        <mybatis-plus-boot-starter.version>3.5.1</mybatis-plus-boot-starter.version>
        <lombok.version>1.18.16</lombok.version>
        <jackjson.version>2.12.1</jackjson.version>
        <guava.version>21.0</guava.version>
        <mysql-connector-java.version>8.0.22</mysql-connector-java.version>
        <ojdbc8.version>12.2.0.1</ojdbc8.version>
        <clickhouse.version>0.2.6</clickhouse.version>
        <postgresql.version>42.2.14</postgresql.version>
        <hibernate-validator.version>6.2.0.Final</hibernate-validator.version>
        <!--<flyway.version>6.4.4</flyway.version>-->
        <sa-token.version>1.28.0</sa-token.version>
        <commons-lang3.version>3.3.2</commons-lang3.version>
        <httpclient.version>4.4.1</httpclient.version>
        <maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
        <maven-assembly-plugin.version>3.2.0</maven-assembly-plugin.version>
        <maven.resource.version>3.2.0</maven.resource.version>
        <junit.version>4.12</junit.version>
        <!--  `provided` for product environment ,`compile` for dev environment  -->
        <scope.runtime>provided</scope.runtime>
        <!--  modify flink version  -->
        <dlink.flink.version>1.14</dlink.flink.version>
        <scala.binary.version>2.11</scala.binary.version>
        <protobuf-java.version>2.5.0</protobuf-java.version>
        <jedis.version>2.9.0</jedis.version>
        <javax.mail>1.6.2</javax.mail>
        <poi.version>4.1.2</poi.version>
        <commons-email>1.5</commons-email>
        <knife4j.version>3.0.3</knife4j.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!--解决mysql与phoenix依赖冲突-->
            <dependency>
                <groupId>com.google.protobuf</groupId>
                <artifactId>protobuf-java</artifactId>
                <version>${protobuf-java.version}</version>
            </dependency>
            <!-- hutool java工具类库  -->
            <dependency>
                <groupId>cn.hutool</groupId>
                <artifactId>hutool-all</artifactId>
                <version>${hutool.version}</version>
            </dependency>
            <!-- druid 官方 starter -->
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>druid-spring-boot-starter</artifactId>
                <version>${druid-starter}</version>
            </dependency>
            <!-- mybatis-plus start -->
            <dependency>
                <groupId>com.baomidou</groupId>
                <artifactId>mybatis-plus-boot-starter</artifactId>
                <version>${mybatis-plus-boot-starter.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot-dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.github.xiaoymin</groupId>
                <artifactId>knife4j-spring-boot-starter</artifactId>
                <version>${knife4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${jackjson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackjson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons-lang3.version}</version>
            </dependency>
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>${mysql-connector-java.version}</version>
            </dependency>
            <dependency>
                <groupId>com.oracle.database.jdbc</groupId>
                <artifactId>ojdbc8</artifactId>
                <version>${ojdbc8.version}</version>
            </dependency>
            <dependency>
                <groupId>ru.yandex.clickhouse</groupId>
                <artifactId>clickhouse-jdbc</artifactId>
                <version>${clickhouse.version}</version>
            </dependency>
            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>${postgresql.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>${hibernate-validator.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>provided</scope>
            </dependency>
            <!-- flyway -->
            <!--<dependency>
                <groupId>org.flywaydb</groupId>
                <artifactId>flyway-core</artifactId>
                <version>${flyway.version}</version>
            </dependency>-->
            <dependency>
                <groupId>cn.dev33</groupId>
                <artifactId>sa-token-spring-boot-starter</artifactId>
                <version>${sa-token.version}</version>
            </dependency>
            <!--sa-token redis持久化 start-->
            <dependency>
                <groupId>cn.dev33</groupId>
                <artifactId>sa-token-dao-redis-jackson</artifactId>
                <version>${sa-token.version}</version>
            </dependency>
            <dependency>
                <groupId>redis.clients</groupId>
                <artifactId>jedis</artifactId>
                <version>${jedis.version}</version>
            </dependency>
            <!--sa-token redis持久化 end-->
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-client-base</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-client-1.12</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-client-1.13</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-client-1.14</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-client-1.11</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-client-1.15</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-catalog-mysql-1.13</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-catalog-mysql-1.14</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-catalog-mysql-1.15</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-connector-jdbc-1.11</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-connector-jdbc-1.12</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-connector-jdbc-1.13</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-connector-jdbc-1.14</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-connector-phoenix-1.13</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-function</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-common</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-metadata-base</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-metadata-mysql</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-metadata-oracle</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-metadata-sqlserver</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-metadata-postgresql</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-metadata-clickhouse</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-metadata-doris</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-metadata-hive</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-metadata-phoenix</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-metadata-starrocks</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-gateway</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-executor</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-client-hadoop</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-alert-base</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-alert-dingtalk</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-alert-wechat</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-alert-feishu</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-alert-email</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-daemon</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-app-base</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-flink-1.11</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-flink-1.12</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-flink-1.13</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-flink-1.14</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.dlink</groupId>
                <artifactId>dlink-flink-1.15</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${httpclient.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi</artifactId>
                <version>${poi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-ooxml</artifactId>
                <version>${poi.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.poi</groupId>
                        <artifactId>poi-ooxml-schemas</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-email</artifactId>
                <version>${commons-email}</version>
            </dependency>
            <dependency>
                <groupId>com.sun.mail</groupId>
                <artifactId>javax.mail</artifactId>
                <version>${javax.mail}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <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>
                        <testSource>${java.version}</testSource>
                        <testTarget>${java.version}</testTarget>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${maven-checkstyle-plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>8.45</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <consoleOutput>true</consoleOutput>
                        <encoding>UTF-8</encoding>
                        <configLocation>style/checkstyle.xml</configLocation>
                        <failOnViolation>true</failOnViolation>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        <sourceDirectories>
                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
                        </sourceDirectories>
                        <excludes>**\/generated-sources\/</excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
