[3.0] [flink-cdc-dist] Collect all distro resources into a TAR (#2636)

This closes #2621 #2622 

Co-authored-by: Qingsheng Ren <renqschn@gmail.com>
pull/2791/head
gongzhongqiang 1 year ago committed by GitHub
parent f57d6f6e67
commit 1a5065e774
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,42 +24,88 @@ under the License.
<modelVersion>4.0.0</modelVersion>
<artifactId>flink-cdc-dist</artifactId>
<packaging>jar</packaging>
<properties>
<japicmp.skip>true</japicmp.skip>
</properties>
<dependencies>
<!-- Project binaries -->
<dependency>
<artifactId>flink-cdc-cli</artifactId>
<groupId>com.ververica</groupId>
<version>${project.version}</version>
<optional>${markBundledAsOptional}</optional>
<artifactId>flink-cdc-common</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<artifactId>flink-cdc-common</artifactId>
<groupId>com.ververica</groupId>
<version>${project.version}</version>
<optional>${markBundledAsOptional}</optional>
<artifactId>flink-cdc-runtime</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<artifactId>flink-cdc-composer</artifactId>
<groupId>com.ververica</groupId>
<version>${project.version}</version>
<optional>${markBundledAsOptional}</optional>
<artifactId>flink-cdc-cli</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<artifactId>flink-cdc-runtime</artifactId>
<groupId>com.ververica</groupId>
<version>${project.version}</version>
<optional>${markBundledAsOptional}</optional>
<artifactId>flink-cdc-composer</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
</project>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade-dist</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadeTestJar>false</shadeTestJar>
<createDependencyReducedPom>false</createDependencyReducedPom>
<shadedArtifactAttached>false</shadedArtifactAttached>
<finalName>${project.artifactId}-${revision}</finalName>
<artifactSet>
<includes>
<include>*</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.apache.commons.cli</pattern>
<shadedPattern>com.ververica.cdc.shaded.com.apache.commons.cli</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>dist</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<tarLongFileMode>gnu</tarLongFileMode>
<appendAssemblyId>false</appendAssemblyId>
<attach>false</attach>
<finalName>flink-cdc-${project.version}-bin</finalName>
<descriptors>
<descriptor>${basedir}/src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,67 @@
<!--
Copyright 2023 Ververica Inc.
Licensed 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.
-->
<assembly>
<id>dist</id>
<formats>
<format>dir</format>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<baseDirectory>flink-cdc-${revision}</baseDirectory>
<files>
<!-- copy flink-cdc-dist uber jar -->
<file>
<source>target/flink-cdc-dist-${revision}.jar</source>
<outputDirectory>lib</outputDirectory>
<destName>flink-cdc-dist-${revision}.jar</destName>
<fileMode>0644</fileMode>
</file>
</files>
<fileSets>
<!-- copy start scripts -->
<fileSet>
<directory>src/main/flink-cdc-bin/bin</directory>
<outputDirectory>bin</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<!-- copy conf directory -->
<fileSet>
<directory>src/main/flink-cdc-bin/conf</directory>
<outputDirectory>conf</outputDirectory>
<fileMode>0644</fileMode>
</fileSet>
<!-- copy flink-cdc fat jar -->
<fileSet>
<directory>src/main/flink-cdc-bin/lib</directory>
<outputDirectory>lib</outputDirectory>
<fileMode>0644</fileMode>
</fileSet>
<!-- create an empty log directory -->
<fileSet>
<directory>src/main/flink-cdc-bin/</directory>
<outputDirectory>log</outputDirectory>
<fileMode>0644</fileMode>
<excludes>
<exclude>**/*</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>

@ -0,0 +1,18 @@
#!/usr/bin/env bash
################################################################################
# Copyright 2023 Ververica Inc.
#
# Licensed 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.
################################################################################

@ -0,0 +1,14 @@
<!--
Copyright 2023 Ververica Inc.
Licensed 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.
-->

@ -0,0 +1,34 @@
#
# Copyright 2023 Ververica Inc.
#
# Licensed 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.
#
# Allows this configuration to be modified at runtime. The file will be checked every 30 seconds.
monitorInterval=30
rootLogger.level = ${env:ROOT_LOG_LEVEL:-INFO}
rootLogger.appenderRef.file.ref = FileAppender
# Log all infos in the given file
appender.file.name = FileAppender
appender.file.type = FILE
appender.file.append = false
appender.file.fileName = ${sys:log.file}
appender.file.layout.type = PatternLayout
appender.file.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n
appender.console.name = ConsoleAppender
appender.console.type = CONSOLE
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n

@ -194,8 +194,8 @@ under the License.
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<type>jar</type>
<version>${version.awaitility}</version>
<scope>test</scope>
</dependency>
<dependency>

Loading…
Cancel
Save