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

morningman pushed a commit to branch branch-fs-spi
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 53e2c974ff61359303a2e67506b5241aefae12ee
Author: morningman <[email protected]>
AuthorDate: Thu Apr 2 01:40:16 2026 +0800

    [fix](build) Fix fe-filesystem plugin build and deployment
    
    ### What problem does this PR solve?
    
    Issue Number: N/A
    
    Problem Summary:
    1. The fallback dependency:copy-dependencies for fe-core ran without
       -DoutputDirectory, so Maven used the default target/dependency/ instead
       of target/lib/. This caused 'cp: cannot stat target/lib/*' when a
       Maven Build Cache hit skipped the copy-dependencies lifecycle phase.
       Fix: add -DoutputDirectory and -DincludeScope=runtime to match the
       pom.xml execution configuration.
    
    2. All fe-filesystem impl modules lacked <finalName>, producing
       fe-filesystem-s3-1.2-SNAPSHOT.jar while build.sh expected
       doris-fe-filesystem-s3*.jar. Fix: add 
<finalName>doris-fe-filesystem-{name}</finalName>
       to each module's pom.xml, consistent with fe-filesystem-spi.
    
    3. The filesystem plugin deployment loop used bare mvn instead of
       ${MVN_CMD}. Fix: use ${MVN_CMD} for consistency.
    
    4. The main JAR glob pattern in the deployment loop had a spurious '-'
       before '*' (doris-fe-filesystem-s3-*.jar) that couldn't match the
       versionless finalName output. Fix: remove the '-'.
    
    ### Release note
    
    None
    
    ### Check List (For Author)
    
    - Test: Manual test - ran sh build.sh --fe, verified all 8 filesystem
      plugins (s3/azure/oss/cos/obs/hdfs/local/broker) deploy correctly to
      output/fe/plugins/filesystem/ with main JAR + transitive deps
    - Behavior changed: No
    - Does this need documentation: No
    
    Co-authored-by: Copilot <[email protected]>
---
 build.sh                                      | 9 ++++++---
 fe/fe-filesystem/fe-filesystem-azure/pom.xml  | 4 ++++
 fe/fe-filesystem/fe-filesystem-broker/pom.xml | 4 ++++
 fe/fe-filesystem/fe-filesystem-cos/pom.xml    | 4 ++++
 fe/fe-filesystem/fe-filesystem-hdfs/pom.xml   | 4 ++++
 fe/fe-filesystem/fe-filesystem-local/pom.xml  | 4 ++++
 fe/fe-filesystem/fe-filesystem-obs/pom.xml    | 4 ++++
 fe/fe-filesystem/fe-filesystem-oss/pom.xml    | 4 ++++
 fe/fe-filesystem/fe-filesystem-s3/pom.xml     | 4 ++++
 9 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/build.sh b/build.sh
index 5f4ca956258..86d59e0ad9a 100755
--- a/build.sh
+++ b/build.sh
@@ -927,7 +927,10 @@ if [[ "${BUILD_FE}" -eq 1 ]]; then
     if [[ ! -d "${DORIS_HOME}/fe/fe-core/target/lib" ]]; then
         echo "target/lib not found (build cache hit), running 
dependency:copy-dependencies..."
         (cd "${DORIS_HOME}/fe" && "${MVN_CMD}" dependency:copy-dependencies \
-            -pl fe-core --no-transfer-progress -q)
+            -pl fe-core \
+            -DoutputDirectory="${DORIS_HOME}/fe/fe-core/target/lib" \
+            -DincludeScope=runtime \
+            --no-transfer-progress -q)
     fi
     cp -r -p "${DORIS_HOME}/fe/fe-core/target/lib"/* "${DORIS_OUTPUT}/fe/lib"/
     cp -r -p "${DORIS_HOME}/fe/fe-core/target/doris-fe.jar" 
"${DORIS_OUTPUT}/fe/lib"/
@@ -979,9 +982,9 @@ if [[ "${BUILD_FE}" -eq 1 ]]; then
         fi
         mkdir -p "${fs_plugin_target}/lib"
         # Copy main JAR
-        cp -f "${fs_module_dir}/target/doris-fe-filesystem-${fs_module}-"*.jar 
"${fs_plugin_target}/" 2>/dev/null || true
+        cp -f "${fs_module_dir}/target/doris-fe-filesystem-${fs_module}"*.jar 
"${fs_plugin_target}/" 2>/dev/null || true
         # Copy transitive dependencies, excluding spi JARs already on FE 
classpath
-        (cd "${DORIS_HOME}/fe" && mvn dependency:copy-dependencies \
+        (cd "${DORIS_HOME}/fe" && "${MVN_CMD}" dependency:copy-dependencies \
             -pl "fe-filesystem/fe-filesystem-${fs_module}" \
             -DoutputDirectory="${fs_plugin_target}/lib" \
             -DexcludeArtifactIds="fe-filesystem-spi,fe-extension-spi" \
diff --git a/fe/fe-filesystem/fe-filesystem-azure/pom.xml 
b/fe/fe-filesystem/fe-filesystem-azure/pom.xml
index 26d2bd833c0..ca9273f25bb 100644
--- a/fe/fe-filesystem/fe-filesystem-azure/pom.xml
+++ b/fe/fe-filesystem/fe-filesystem-azure/pom.xml
@@ -62,4 +62,8 @@ under the License.
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+    <build>
+        <finalName>doris-fe-filesystem-azure</finalName>
+    </build>
 </project>
diff --git a/fe/fe-filesystem/fe-filesystem-broker/pom.xml 
b/fe/fe-filesystem/fe-filesystem-broker/pom.xml
index ded46076dfa..61770538c1c 100644
--- a/fe/fe-filesystem/fe-filesystem-broker/pom.xml
+++ b/fe/fe-filesystem/fe-filesystem-broker/pom.xml
@@ -78,4 +78,8 @@ under the License.
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+    <build>
+        <finalName>doris-fe-filesystem-broker</finalName>
+    </build>
 </project>
diff --git a/fe/fe-filesystem/fe-filesystem-cos/pom.xml 
b/fe/fe-filesystem/fe-filesystem-cos/pom.xml
index fd7b194e5b1..dc249e2e743 100644
--- a/fe/fe-filesystem/fe-filesystem-cos/pom.xml
+++ b/fe/fe-filesystem/fe-filesystem-cos/pom.xml
@@ -41,4 +41,8 @@ under the License.
             <version>${revision}</version>
         </dependency>
     </dependencies>
+
+    <build>
+        <finalName>doris-fe-filesystem-cos</finalName>
+    </build>
 </project>
diff --git a/fe/fe-filesystem/fe-filesystem-hdfs/pom.xml 
b/fe/fe-filesystem/fe-filesystem-hdfs/pom.xml
index a3c5c95cfdf..108be1d5657 100644
--- a/fe/fe-filesystem/fe-filesystem-hdfs/pom.xml
+++ b/fe/fe-filesystem/fe-filesystem-hdfs/pom.xml
@@ -72,4 +72,8 @@ under the License.
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+    <build>
+        <finalName>doris-fe-filesystem-hdfs</finalName>
+    </build>
 </project>
diff --git a/fe/fe-filesystem/fe-filesystem-local/pom.xml 
b/fe/fe-filesystem/fe-filesystem-local/pom.xml
index 89ed1c995dd..35d70014585 100644
--- a/fe/fe-filesystem/fe-filesystem-local/pom.xml
+++ b/fe/fe-filesystem/fe-filesystem-local/pom.xml
@@ -41,4 +41,8 @@ under the License.
             <version>${revision}</version>
         </dependency>
     </dependencies>
+
+    <build>
+        <finalName>doris-fe-filesystem-local</finalName>
+    </build>
 </project>
diff --git a/fe/fe-filesystem/fe-filesystem-obs/pom.xml 
b/fe/fe-filesystem/fe-filesystem-obs/pom.xml
index 5d24e886abc..065480833d9 100644
--- a/fe/fe-filesystem/fe-filesystem-obs/pom.xml
+++ b/fe/fe-filesystem/fe-filesystem-obs/pom.xml
@@ -41,4 +41,8 @@ under the License.
             <version>${revision}</version>
         </dependency>
     </dependencies>
+
+    <build>
+        <finalName>doris-fe-filesystem-obs</finalName>
+    </build>
 </project>
diff --git a/fe/fe-filesystem/fe-filesystem-oss/pom.xml 
b/fe/fe-filesystem/fe-filesystem-oss/pom.xml
index a32a9f015bf..2a1babb5daa 100644
--- a/fe/fe-filesystem/fe-filesystem-oss/pom.xml
+++ b/fe/fe-filesystem/fe-filesystem-oss/pom.xml
@@ -41,4 +41,8 @@ under the License.
             <version>${revision}</version>
         </dependency>
     </dependencies>
+
+    <build>
+        <finalName>doris-fe-filesystem-oss</finalName>
+    </build>
 </project>
diff --git a/fe/fe-filesystem/fe-filesystem-s3/pom.xml 
b/fe/fe-filesystem/fe-filesystem-s3/pom.xml
index d81de9fd811..76a209d8355 100644
--- a/fe/fe-filesystem/fe-filesystem-s3/pom.xml
+++ b/fe/fe-filesystem/fe-filesystem-s3/pom.xml
@@ -70,4 +70,8 @@ under the License.
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+    <build>
+        <finalName>doris-fe-filesystem-s3</finalName>
+    </build>
 </project>


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

Reply via email to