<assembly>
    <id>${project.version}</id>

    <formats>
        <format>tar.gz</format>
    </formats>

    <includeBaseDirectory>true</includeBaseDirectory>

    <fileSets>
        <!-- 打包dlink-doc中的bin目录到 打包目录下 -->
        <fileSet>
            <directory>${project.parent.basedir}/dlink-doc/bin</directory>
            <outputDirectory>./</outputDirectory>
            <fileMode>0755</fileMode>
        </fileSet>

        <!-- 打包dlink-doc中的配置文件到打包目录/sql下 -->
        <fileSet>
            <directory>${project.parent.basedir}/dlink-doc/sql</directory>
            <outputDirectory>sql</outputDirectory>
            <includes>
                <include>*.sql</include>
            </includes>
        </fileSet>

        <!-- 打包dlink-admin中的配置文件到打包目录/config下 -->
        <fileSet>
            <directory>${project.parent.basedir}/dlink-admin/src/main/resources/
            </directory>
            <outputDirectory>config</outputDirectory>
            <includes>
                <include>application.yml</include>
            </includes>
        </fileSet>

        <!-- 将模块dlink-admin的jar文件放到打包目录下 -->
        <fileSet>
            <directory>${project.parent.basedir}/dlink-admin/target
            </directory>
            <outputDirectory>./</outputDirectory>
            <includes>
                <include>dlink-admin-${project.version}.jar</include>
            </includes>
        </fileSet>

        <!-- 将模块dlink-client的jar文件放到打包目录/lib下 -->
        <fileSet>
            <directory>${project.parent.basedir}/dlink-client/dlink-client-1.13/target</directory>
            <outputDirectory>lib</outputDirectory>
            <includes>
                <include>dlink-client-1.13-${project.version}.jar</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${project.parent.basedir}/dlink-client/dlink-client-1.11/target</directory>
            <outputDirectory>extends</outputDirectory>
            <includes>
                <include>dlink-client-1.11-${project.version}.jar</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${project.parent.basedir}/dlink-client/dlink-client-1.12/target</directory>
            <outputDirectory>extends</outputDirectory>
            <includes>
                <include>dlink-client-1.12-${project.version}.jar</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${project.parent.basedir}/dlink-client/dlink-client-1.14/target</directory>
            <outputDirectory>extends</outputDirectory>
            <includes>
                <include>dlink-client-1.14-${project.version}.jar</include>
            </includes>
        </fileSet>

        <!-- 将模块dlink-connectors的jar文件放到打包目录/lib下 -->
        <fileSet>
            <directory>${project.parent.basedir}/dlink-connectors/dlink-connector-jdbc-1.13/target</directory>
            <outputDirectory>lib</outputDirectory>
            <includes>
                <include>dlink-connector-jdbc-1.13-${project.version}.jar</include>
            </includes>
        </fileSet>

        <!-- 将模块dlink-function的jar文件放到打包目录/lib下 -->
        <fileSet>
            <directory>${project.parent.basedir}/dlink-function/target
            </directory>
            <outputDirectory>lib</outputDirectory>
            <includes>
                <include>dlink-function-${project.version}.jar</include>
            </includes>
        </fileSet>

        <!-- 将模块dlink-metadata的jar文件放到打包目录/lib下 -->
        <fileSet>
            <directory>${project.parent.basedir}/dlink-metadata/dlink-metadata-clickhouse/target
            </directory>
            <outputDirectory>lib</outputDirectory>
            <includes>
                <include>dlink-metadata-clickhouse-${project.version}.jar</include>
            </includes>
        </fileSet>

        <!-- 将模块dlink-metadata的jar文件放到打包目录/lib下 -->
        <fileSet>
            <directory>${project.parent.basedir}/dlink-metadata/dlink-metadata-mysql/target
            </directory>
            <outputDirectory>lib</outputDirectory>
            <includes>
                <include>dlink-metadata-mysql-${project.version}.jar</include>
            </includes>
        </fileSet>

        <!-- 将模块dlink-metadata的jar文件放到打包目录/lib下 -->
        <fileSet>
            <directory>${project.parent.basedir}/dlink-metadata/dlink-metadata-oracle/target
            </directory>
            <outputDirectory>lib</outputDirectory>
            <includes>
                <include>dlink-metadata-oracle-${project.version}.jar</include>
            </includes>
        </fileSet>

        <!-- 将模块dlink-metadata的jar文件放到打包目录/lib下 -->
        <fileSet>
            <directory>${project.parent.basedir}/dlink-metadata/dlink-metadata-postgresql/target
            </directory>
            <outputDirectory>lib</outputDirectory>
            <includes>
                <include>dlink-metadata-postgresql-${project.version}.jar</include>
            </includes>
        </fileSet>

        <!-- 将模块dlink-extends的常用jar文件放到打包目录/plugins下 -->
        <!--<fileSet>
            <directory>${project.parent.basedir}/dlink-extends/target
            </directory>
            <outputDirectory>plugins</outputDirectory>
            <includes>
            </includes>
        </fileSet>-->

        <!-- 将模块dlink-extends的jar文件放到打包目录/extends下 -->
        <!--<fileSet>
            <directory>${project.parent.basedir}/dlink-extends/target
            </directory>
            <outputDirectory>extends</outputDirectory>
            <includes>
                <include>flink-sql-connector-*.jar</include>
                <include>ojdbc8-*.jar</include>
                <include>clickhouse-jdbc-*.jar</include>
            </includes>
        </fileSet>-->
        <fileSet>
            <directory>${project.parent.basedir}/dlink-app/target</directory>
            <outputDirectory>jar</outputDirectory>
            <includes>
                <include>dlink-app-${project.version}-jar-with-dependencies.jar</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${project.parent.basedir}/dlink-doc/extends</directory>
            <outputDirectory>jar</outputDirectory>
            <includes>
                <include>Dockerfile</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${project.parent.basedir}/dlink-web/dist</directory>
            <outputDirectory>html</outputDirectory>
            <includes>
                <include>*</include>
                <include>*/*</include>
            </includes>
        </fileSet>
    </fileSets>
</assembly>