dev
chaoyang.he 2023-07-15 17:53:22 +08:00
parent 1e1ab2c087
commit fca7ee645a
1 changed files with 6 additions and 1 deletions

View File

@ -26,6 +26,7 @@ import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.*;
import java.util.regex.Pattern;
public class BuilderPackageEcology extends Application {
@ -115,7 +116,11 @@ public class BuilderPackageEcology extends Application {
try {
FileCompressor.compressFiles(filePaths, outputFile.getAbsolutePath(), path -> {
String rootPath = Util.class.getResource("/").getPath();
rootPath = rootPath.split(File.separator + FileTreeBuilder.targetPath)[0] + File.separator + FileTreeBuilder.targetPath + FileTreeBuilder.classPath;
if(rootPath.startsWith("/")){
rootPath = rootPath.substring(1);
rootPath = rootPath.replace("/",File.separator);
}
rootPath = rootPath.split(Pattern.quote(File.separator + FileTreeBuilder.targetPath))[0] + File.separator + FileTreeBuilder.targetPath + FileTreeBuilder.classPath;
String replace = "/ecology/" + (isEcology ? "WEB-INF/classes/" : "classbean/");
if (path.endsWith(".jar")) {
replace = "/ecology/WEB-INF/lib/";