xiugai
parent
1e1ab2c087
commit
fca7ee645a
|
@ -26,6 +26,7 @@ import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class BuilderPackageEcology extends Application {
|
public class BuilderPackageEcology extends Application {
|
||||||
|
|
||||||
|
@ -115,7 +116,11 @@ public class BuilderPackageEcology extends Application {
|
||||||
try {
|
try {
|
||||||
FileCompressor.compressFiles(filePaths, outputFile.getAbsolutePath(), path -> {
|
FileCompressor.compressFiles(filePaths, outputFile.getAbsolutePath(), path -> {
|
||||||
String rootPath = Util.class.getResource("/").getPath();
|
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/");
|
String replace = "/ecology/" + (isEcology ? "WEB-INF/classes/" : "classbean/");
|
||||||
if (path.endsWith(".jar")) {
|
if (path.endsWith(".jar")) {
|
||||||
replace = "/ecology/WEB-INF/lib/";
|
replace = "/ecology/WEB-INF/lib/";
|
||||||
|
|
Loading…
Reference in New Issue