自动打包工具拓展自动打jar包
parent
c95e6e41e8
commit
3c3382f1d2
|
@ -55,7 +55,7 @@ public class BuilderPackageEcology extends Application {
|
|||
try {
|
||||
FileCompressor.compressFiles(filePaths, outputFile.getAbsolutePath(), path -> {
|
||||
String rootPath = Util.class.getResource("/").getPath();
|
||||
rootPath = rootPath.split(File.separator + "target" + File.separator)[0] + File.separator + "target" + File.separator + "classes" + File.separator;
|
||||
rootPath = rootPath.split(File.separator + FileTreeBuilder.targetPath)[0] + File.separator + FileTreeBuilder.targetPath + "classes" + File.separator;
|
||||
String replace = "/ecology/" + (isEcology ? "WEB-INF/classes/" : "classbean/");
|
||||
if (path.endsWith(".jar")) {
|
||||
replace = "/ecology/WEB-INF/lib/";
|
||||
|
|
|
@ -12,6 +12,8 @@ public class FileTreeBuilder {
|
|||
public static final String DIRECTORY_TYPE = "文件夹";
|
||||
public static final String FILE_TYPE = "文件";
|
||||
|
||||
public static String targetPath;
|
||||
|
||||
public static FileInfo buildFileTree() {
|
||||
String directoryPath = "target";
|
||||
List<String> blackList = new ArrayList<>();
|
||||
|
@ -31,6 +33,7 @@ public class FileTreeBuilder {
|
|||
if (!directoryPath.endsWith(File.separator)) {
|
||||
directoryPath += File.separator;
|
||||
}
|
||||
targetPath = directoryPath;
|
||||
}
|
||||
List<String> blacklistPrefixes = Arrays.asList(
|
||||
directoryPath + "generated-sources",
|
||||
|
|
Loading…
Reference in New Issue