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

aloyszhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new a05c6a4391 [INLONG-11444][Distribution] Fix the merging modules jars 
failure (#11445)
a05c6a4391 is described below

commit a05c6a43915c7ca807e659ef9cc6a3be92d63ded
Author: AloysZhang <[email protected]>
AuthorDate: Thu Oct 31 20:24:11 2024 +0800

    [INLONG-11444][Distribution] Fix the merging modules jars failure (#11445)
---
 inlong-distribution/pom.xml                        | 110 ++++++++++++++++-----
 .../script/backup_module_dependencies.sh           |  10 +-
 2 files changed, 90 insertions(+), 30 deletions(-)

diff --git a/inlong-distribution/pom.xml b/inlong-distribution/pom.xml
index 95c54adf74..473080c323 100644
--- a/inlong-distribution/pom.xml
+++ b/inlong-distribution/pom.xml
@@ -33,32 +33,6 @@
         <inlong.root.dir>${project.parent.basedir}</inlong.root.dir>
     </properties>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>exec-maven-plugin</artifactId>
-                <version>${exec.maven.version}</version>
-                <configuration>
-                    <executable>bash</executable>
-                    <arguments>
-                        <argument>+x</argument>
-                        
<argument>${basedir}/script/backup_module_dependencies.sh</argument>
-                    </arguments>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>uncompress</id>
-                        <goals>
-                            <goal>exec</goal>
-                        </goals>
-                        <phase>package</phase>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
     <profiles>
         <profile>
             <id>flink-all-version</id>
@@ -103,6 +77,27 @@
                             </execution>
                         </executions>
                     </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <version>${exec.maven.version}</version>
+                        <configuration>
+                            <executable>bash</executable>
+                            <arguments>
+                                <argument>+x</argument>
+                                
<argument>${basedir}/script/backup_module_dependencies.sh</argument>
+                            </arguments>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>uncompress</id>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <phase>package</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
                 </plugins>
             </build>
         </profile>
@@ -144,6 +139,27 @@
                             </execution>
                         </executions>
                     </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <version>${exec.maven.version}</version>
+                        <configuration>
+                            <executable>bash</executable>
+                            <arguments>
+                                <argument>+x</argument>
+                                
<argument>${basedir}/script/backup_module_dependencies.sh</argument>
+                            </arguments>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>uncompress</id>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <phase>package</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
                 </plugins>
             </build>
         </profile>
@@ -185,6 +201,27 @@
                             </execution>
                         </executions>
                     </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <version>${exec.maven.version}</version>
+                        <configuration>
+                            <executable>bash</executable>
+                            <arguments>
+                                <argument>+x</argument>
+                                
<argument>${basedir}/script/backup_module_dependencies.sh</argument>
+                            </arguments>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>uncompress</id>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <phase>package</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
                 </plugins>
             </build>
         </profile>
@@ -226,6 +263,27 @@
                             </execution>
                         </executions>
                     </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <version>${exec.maven.version}</version>
+                        <configuration>
+                            <executable>bash</executable>
+                            <arguments>
+                                <argument>+x</argument>
+                                
<argument>${basedir}/script/backup_module_dependencies.sh</argument>
+                            </arguments>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>uncompress</id>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <phase>package</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
                 </plugins>
             </build>
         </profile>
diff --git a/inlong-distribution/script/backup_module_dependencies.sh 
b/inlong-distribution/script/backup_module_dependencies.sh
index 880730d764..6278ce3c2a 100644
--- a/inlong-distribution/script/backup_module_dependencies.sh
+++ b/inlong-distribution/script/backup_module_dependencies.sh
@@ -34,11 +34,13 @@ filelist() {
 }
 
 # Get the current version for InLong
-find_gz_file=`ls -l ./target/*bin.tar.gz |awk '{print $9}'`
+prefix="apache-inlong-"
+suffix="-bin.tar.gz"
+find_gz_file=$(ls -l ./target/*bin.tar.gz |awk '{print $9}')
 gz_file=$(basename "$find_gz_file")
-name_length=`expr length $gz_file`
-version_length=$(expr $name_length \- 15 \- 10)
-project_version=`expr substr $gz_file 15 $version_length`
+version_with_suffix="${gz_file#$prefix}"
+project_version="${version_with_suffix%$suffix}"
+echo "The current version for InLong is: $project_version"
 
projectpath="./target/apache-inlong-${project_version}-bin/apache-inlong-${project_version}"
 
 # Generate the file "dependencys.txt"

Reply via email to