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());