From 845f4ed4b9896c71003b53c28ad092a855a6018d Mon Sep 17 00:00:00 2001 From: wangbing Date: Tue, 1 Sep 2026 09:00:25 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96lib=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E8=BF=87=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/xyz/wbsite/deployee/Deploy.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/xyz/wbsite/deployee/Deploy.java b/src/main/java/xyz/wbsite/deployee/Deploy.java index 19bf7b9..1e274dc 100644 --- a/src/main/java/xyz/wbsite/deployee/Deploy.java +++ b/src/main/java/xyz/wbsite/deployee/Deploy.java @@ -192,7 +192,16 @@ public class Deploy extends AbstractMojo { File libDir = new File(targetPath, "lib"); if (libDir.exists() && libDir.isDirectory()) { printLog("start upload lib directory"); - client.putFiles(libDir.getAbsolutePath(), serverPath + "/lib"); + client.createDirs(serverPath + "/lib"); + File[] libFiles = libDir.listFiles(); + int totalFiles = libFiles != null ? libFiles.length : 0; + for (int i = 0; i < totalFiles; i++) { + File file = libFiles[i]; + String targetPath = (serverPath + "/lib/" + file.getName()).replace('\\', '/'); + client.putFile(file.getAbsolutePath(), targetPath); + System.out.print(StrUtil.format("[INFO] upload lib {}/{}", (i + 1), totalFiles) + "\r"); + } + System.out.println(); printLog("upload lib directory finish"); } else { printLog("[WARN] lib directory not found: {}, skip lib upload", libDir.getAbsolutePath());