This is an automated email from the ASF dual-hosted git repository.

diwu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-kafka-connector.git


The following commit(s) were added to refs/heads/master by this push:
     new b8d1157  [package] add confluent build scripts (#86)
b8d1157 is described below

commit b8d115761771998de4aa90cc000a1dece88ebe13
Author: wudi <[email protected]>
AuthorDate: Wed Aug 13 17:56:56 2025 +0800

    [package] add confluent build scripts (#86)
---
 .licenserc.yaml                 |  1 +
 README.md                       |  8 +++-
 build.sh                        | 44 +++++++++++++++++++-
 config/archive/assets/doris.svg | 21 ++++++++++
 config/archive/manifest.json    | 38 +++++++++++++++++
 pom.xml                         | 90 ++++++++++++++++++++++++++++++++++++++++-
 src/assembly/confluent.xml      | 59 +++++++++++++++++++++++++++
 7 files changed, 256 insertions(+), 5 deletions(-)

diff --git a/.licenserc.yaml b/.licenserc.yaml
index 07a811b..c7634b3 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -24,6 +24,7 @@ header:
   paths-ignore:
     - 'LICENSE'
     - '.gitignore'
+    - 'config/archive/**'
     - 'src/test/resources/decode/avro/**'
     - 'src/test/resources/e2e/**'
 
diff --git a/README.md b/README.md
index 6a6ba67..0cd232b 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ under the License.
 
 [Kafka Connect](https://docs.confluent.io/platform/current/connect/index.html) 
is a scalable and reliable tool for data transmission between Apache Kafka and 
other systems. Connectors can be defined Move large amounts of data in and out 
of Kafka.
 
-Doris provides the Sink Connector plug-in, which can write data from Kafka 
topics to Doris.
+Doris provides the Sink Connector plugin, which can write data from Kafka 
topics to Doris.
 More information about usage, please visit [Doris Kafka 
Connector](https://doris.apache.org/docs/ecosystem/doris-kafka-connector)
 
 ## License
@@ -34,6 +34,7 @@ After running the following command, the jar package of 
Doris-Kafka-Connector wi
 ```
 sh build.sh
 ```
+Note: Confluent archive zip file can be packaged through `sh build.sh 
--confluent`
 
 ## Code formatting
 Doris-Kafka-Connector uses the AOSP style in google-java-format version 1.7 as 
the formatting style of the project code.
@@ -43,4 +44,7 @@ When you need to format your code, you have two formatting 
options:
 - Execute `sh format.sh` under the project
 - Execute `mvn spotless:apply` under the project
 
-After executing the above formatting command, you can use `mvn spotless:check` 
to check whether the code format meets the requirements.
\ No newline at end of file
+After executing the above formatting command, you can use `mvn spotless:check` 
to check whether the code format meets the requirements.
+
+## Help
+For additional help, please [file an issue in the 
repository](https://github.com/apache/doris-kafka-connector/issues) or raise a 
question in [Apache Doris Public 
Slack](https://apachedoriscommunity.slack.com/).
\ No newline at end of file
diff --git a/build.sh b/build.sh
index af4a4dd..7676255 100644
--- a/build.sh
+++ b/build.sh
@@ -17,10 +17,50 @@
 # under the License.
 #
 
-mvn clean package -Dmaven.test.skip=true
+# Usage:
+#   ./build.sh                              # Default: mvn clean package 
-DskipTests (JAR only)
+#   ./build.sh --confluent                  # Enable -Pconfluent-archive to 
also produce ZIP
+#   ./build.sh --confluent -DskipTests=false  # Pass through additional Maven 
args
+#   ./build.sh -DskipTests                  # Directly pass Maven args
+
+set -e
+
+MVN_ARGS="-DskipTests"
+PROFILE=""
+EXTRA_ARGS=""
+
+# Parse script arguments
+while [ "$#" -gt 0 ]; do
+  case "$1" in
+    --confluent)
+      PROFILE="-Pconfluent-archive"
+      ;;
+    -h|--help)
+      echo "Usage: $0 [--confluent] [<maven args>]"
+      echo "  --confluent           Enable -Pconfluent-archive to build ZIP"
+      echo "  <maven args>          Other Maven args are passed through 
(defaults to -DskipTests)"
+      exit 0
+      ;;
+    *)
+      EXTRA_ARGS="$EXTRA_ARGS $1"
+      ;;
+  esac
+  shift
+done
+
+# Build
+mvn clean package ${MVN_ARGS} ${PROFILE} ${EXTRA_ARGS}
 
 # Copy target files into `dist` directory
 rm -rf dist
 mkdir -p dist
 
-cp -r target/doris-kafka-connector-25.0.0-SNAPSHOT.jar dist
+# Copy main executable JAR(s) if present
+if ls target/doris-kafka-connector-*.jar >/dev/null 2>&1; then
+  cp -r target/doris-kafka-connector-*.jar dist
+fi
+
+# Copy Confluent ZIP if present
+if ls target/doris-kafka-connector-*.zip >/dev/null 2>&1; then
+  cp -r target/doris-kafka-connector-*.zip dist
+fi
diff --git a/config/archive/assets/doris.svg b/config/archive/assets/doris.svg
new file mode 100644
index 0000000..fd4a68c
--- /dev/null
+++ b/config/archive/assets/doris.svg
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 
6.00 Build 0)  -->
+<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px"
+        viewBox="0 0 178 215" style="enable-background:new 0 0 178 215;" 
xml:space="preserve">
+<style type="text/css">
+       .st0{fill:#15A9CA;}
+       .st1{fill:#52CAA3;}
+       .st2{fill:#5268AD;}
+</style>
+<g>
+       <g>
+               <path class="st0" 
d="M104.4,40.9L83.5,20.1c-5.5-5.5-13-8.5-20.3-8.5c-6.8,0-13.5,2.5-18.8,7.5c-5.3,5.3-8.3,12-8.3,19.6
+                       
s2.8,14.3,8,19.6L82,96.1c1.5,1.5,4.3,1.5,6,0l16.3-16.3C105.4,78.5,122.7,58.9,104.4,40.9z"/>
+               <path class="st1" 
d="M138.7,74.2c-4-3.8-8-7.8-11.8-12.3c0,0,0,0-0.3-0.3c0,0.3-0.3,0.8-0.3,1.3c-1.5,9-5.8,17.1-12.8,24.1
+                       
c-22.1,21.8-44.4,44.4-66,66l-2.8,2.8c-5,5-7.8,10.3-8.5,15.6c-1,8,1.8,17.1,7.8,23.6c5.3,5.8,12.3,8.8,19.8,8.5l0,0
+                       
c8.5,0.3,12.8-1,19.1-7c25.1-24.6,50.2-49.4,69.2-68.2c9-9,11-23.6,4.8-33.6C151.8,86.8,145.3,80.5,138.7,74.2z"/>
+               <path class="st2" 
d="M17.3,61.2v92.6c0,2.5,1.8,4,3.3,4.8c1.5,0.8,3.8,0.8,5.5-1l46.7-46.7c1.8-1.8,1.8-4.8,0-6.8L26.1,57.4
+                       
c-1-1-2.5-1.5-3.5-1.5c-0.8,0-1.5,0.3-2,0.5C19.1,57.2,17.3,58.7,17.3,61.2z"/>
+       </g>
+</g>
+</svg>
diff --git a/config/archive/manifest.json b/config/archive/manifest.json
new file mode 100644
index 0000000..5b224f3
--- /dev/null
+++ b/config/archive/manifest.json
@@ -0,0 +1,38 @@
+{
+  "name" : "doris-kafka-connector",
+  "version" : "${project.version}",
+  "title" : "Doris Sink Connector",
+  "description" : "the official Kafka Connect Sink connector for Apache 
Doris.",
+  "owner" : {
+    "username" : "doris",
+    "type" : "organization",
+    "name" : "Apache Doris",
+    "url" : "https://doris.apache.org/";,
+    "logo" : "assets/doris.svg"
+  },
+  "support" : {
+    "logo" : "assets/doris.svg",
+    "summary" : "Officially supported by Apache Doris.",
+    "url" : "https://github.com/apache/doris-kafka-connector/issues";,
+    "provider_name" : "Apache Doris"
+  },
+  "tags" : [ "data warehouse", "olap", "analytics", "doris", "jdbc", "sql" ],
+  "features" : {
+    "supported_encodings" : [ "any" ],
+    "confluent_control_center_integration" : true,
+    "delivery_guarantee": ["exactly_once"],
+    "single_message_transforms" : true,
+    "kafka_connect_api" : true
+  },
+  "logo" : "assets/doris.svg",
+  "documentation_url" : 
"https://doris.apache.org/docs/dev/ecosystem/doris-kafka-connector";,
+  "source_url" : "https://github.com/apache/doris-kafka-connector";,
+  "docker_image" : { },
+  "license" : [ {
+    "name" : "Apache License, Version 2.0",
+    "url" : "http://www.apache.org/licenses/LICENSE-2.0.txt";
+  } ],
+  "component_types" : [ "sink" ],
+  "requirements": ["Doris 2.0 or later."],
+  "release_date" : "${releaseDate}"
+}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index cb1fcc8..87e6496 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,7 @@
 
     <!-- Set our Language Level to Java 8 -->
     <properties>
-        <revision>25.0.0-SNAPSHOT</revision>
+        <revision>25.1.0-SNAPSHOT</revision>
         <maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
         <maven-javadoc-plugin.version>3.3.0</maven-javadoc-plugin.version>
         <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
@@ -397,6 +397,75 @@
                     <artifactId>maven-deploy-plugin</artifactId>
                     <version>3.0.0-M1</version>
                 </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-assembly-plugin</artifactId>
+                    <version>3.3.0</version>
+                    <configuration>
+                        
<finalName>${project.artifactId}-${project.version}</finalName>
+                        <appendAssemblyId>false</appendAssemblyId>
+                        <descriptors>
+                            <descriptor>src/assembly/confluent.xml</descriptor>
+                        </descriptors>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>make-zip</id>
+                            <phase>package</phase>
+                            <goals><goal>single</goal></goals>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>3.3.1</version>
+                    <executions>
+                        <execution>
+                            <id>filter-manifest</id>
+                            <phase>prepare-package</phase>
+                            <goals>
+                                <goal>copy-resources</goal>
+                            </goals>
+                            <configuration>
+                                
<outputDirectory>${project.build.directory}/filtered-resources</outputDirectory>
+                                <resources>
+                                    <resource>
+                                        
<directory>${basedir}/config/archive</directory>
+                                        <includes>
+                                            <include>manifest.json</include>
+                                        </includes>
+                                        <filtering>true</filtering>
+                                    </resource>
+                                </resources>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>build-helper-maven-plugin</artifactId>
+                    <version>3.5.0</version>
+                    <executions>
+                        <execution>
+                            <id>set-release-date</id>
+                            <phase>initialize</phase>
+                            <goals>
+                                <goal>regex-property</goal>
+                            </goals>
+                            <configuration>
+                                <name>releaseDate</name>
+                                <value>${maven.build.timestamp}</value>
+                                <regex>(\d{4}-\d{2}-\d{2}).*</regex>
+                                <replacement>$1</replacement>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+
             </plugins>
         </pluginManagement>
 
@@ -484,5 +553,24 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>confluent-archive</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>build-helper-maven-plugin</artifactId>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-resources-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>
diff --git a/src/assembly/confluent.xml b/src/assembly/confluent.xml
new file mode 100644
index 0000000..dfadf89
--- /dev/null
+++ b/src/assembly/confluent.xml
@@ -0,0 +1,59 @@
+<!--
+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.
+-->
+<assembly>
+    <id>confluent</id>
+    <formats>
+        <format>zip</format>
+    </formats>
+    <includeBaseDirectory>true</includeBaseDirectory>
+
+    <fileSets>
+        <!-- manifest.json -->
+        <fileSet>
+            
<directory>${project.build.directory}/filtered-resources</directory>
+            <includes>
+                <include>manifest.json</include>
+            </includes>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+
+        <!-- assets -->
+        <fileSet>
+            <directory>${basedir}/config/archive/assets</directory>
+            <outputDirectory>assets</outputDirectory>
+        </fileSet>
+
+        <!-- doc -->
+        <fileSet>
+            <directory>${basedir}</directory>
+            <includes>
+                <include>README.md</include>
+                <include>LICENSE</include>
+            </includes>
+            <outputDirectory>doc</outputDirectory>
+        </fileSet>
+
+        <!-- lib -->
+        <fileSet>
+            <directory>${project.build.directory}</directory>
+            <includes>
+                <include>doris-kafka-connector-${revision}.jar</include>
+            </includes>
+            <outputDirectory>lib</outputDirectory>
+        </fileSet>
+    </fileSets>
+</assembly>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to