|
|
@@ -122,7 +122,7 @@ public class EncryptExecutor {
|
|
|
/**
|
|
|
* xml中要清除的(根节点的)子节点名称
|
|
|
*/
|
|
|
- private final Set<String> toClearChildElementNameSet;
|
|
|
+ private final Set<String> toCleanChildElementNameSet;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -199,7 +199,7 @@ public class EncryptExecutor {
|
|
|
|
|
|
private EncryptExecutor(String originJarOrWar, boolean originIsJar, String finalName, String targetRootDir,
|
|
|
String targetLibDir, String targetClassesDir, String password,
|
|
|
- Set<String> includeXmlPrefixSet, Set<String> excludeXmlPrefixSet, Set<String> toClearChildElementNameSet,
|
|
|
+ Set<String> includeXmlPrefixSet, Set<String> excludeXmlPrefixSet, Set<String> toCleanChildElementNameSet,
|
|
|
Set<String> includePrefixSet, Set<String> excludePrefixSet, Set<String> includeLibSet,
|
|
|
Set<Pair<String, String>> alreadyProtectedLibSet, String supportFile) {
|
|
|
this.originJarOrWar = originJarOrWar;
|
|
|
@@ -211,7 +211,7 @@ public class EncryptExecutor {
|
|
|
this.password = password;
|
|
|
this.includeXmlPrefixSet = includeXmlPrefixSet;
|
|
|
this.excludeXmlPrefixSet = excludeXmlPrefixSet;
|
|
|
- this.toClearChildElementNameSet = toClearChildElementNameSet;
|
|
|
+ this.toCleanChildElementNameSet = toCleanChildElementNameSet;
|
|
|
this.includePrefixSet = includePrefixSet;
|
|
|
this.excludePrefixSet = excludePrefixSet;
|
|
|
this.includeLibSet = includeLibSet;
|
|
|
@@ -345,7 +345,7 @@ public class EncryptExecutor {
|
|
|
// 清空原xml文件的关键节点
|
|
|
for (String zipEntryName : encryptNonClassFileSet) {
|
|
|
byte[] bytes = IOUtil.readFileFromWorkbenchRoot(targetRootDirFile, zipEntryName);
|
|
|
- String cleanedXml = clearXml(new String(bytes, StandardCharsets.UTF_8), Constant.XML_PADDING_COMMENT, toClearChildElementNameSet);
|
|
|
+ String cleanedXml = clearXml(new String(bytes, StandardCharsets.UTF_8), Constant.XML_PADDING_COMMENT, toCleanChildElementNameSet);
|
|
|
IOUtil.writeContentToFile(cleanedXml, new File(targetRootDir, zipEntryName));
|
|
|
}
|
|
|
}
|
|
|
@@ -908,7 +908,7 @@ public class EncryptExecutor {
|
|
|
", excludePrefixSet=" + excludePrefixSet +
|
|
|
", includeXmlPrefixSet=" + includeXmlPrefixSet +
|
|
|
", excludeXmlPrefixSet=" + excludeXmlPrefixSet +
|
|
|
- ", toClearChildElementNameSet=" + toClearChildElementNameSet +
|
|
|
+ ", toCleanChildElementNameSet=" + toCleanChildElementNameSet +
|
|
|
", includeLibSet=" + includeLibSet +
|
|
|
", alreadyProtectedLibSet=" + alreadyProtectedLibSet +
|
|
|
'}';
|
|
|
@@ -937,7 +937,7 @@ public class EncryptExecutor {
|
|
|
|
|
|
private String excludeXmlPrefix;
|
|
|
|
|
|
- private String toClearChildElementName;
|
|
|
+ private String toCleanChildElementName;
|
|
|
|
|
|
private String includeLibs;
|
|
|
|
|
|
@@ -984,8 +984,8 @@ public class EncryptExecutor {
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public Builder toClearChildElementName(String toClearChildElementName) {
|
|
|
- this.toClearChildElementName = toClearChildElementName;
|
|
|
+ public Builder toCleanChildElementName(String toCleanChildElementName) {
|
|
|
+ this.toCleanChildElementName = toCleanChildElementName;
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
@@ -1104,10 +1104,10 @@ public class EncryptExecutor {
|
|
|
// xml相关参数解析
|
|
|
Set<String> includeXmlPrefixSet = StrUtil.strToSet(includeXmlPrefix);
|
|
|
Set<String> excludeXmlPrefixSet = StrUtil.strToSet(excludeXmlPrefix);
|
|
|
- toClearChildElementName = StrUtil.isBlank(toClearChildElementName) ? Constant.DEFAULT_XML_NODE_NAMES : toClearChildElementName;
|
|
|
- Set<String> toClearChildElementNameSet = StrUtil.strToSet(toClearChildElementName);
|
|
|
+ toCleanChildElementName = StrUtil.isBlank(toCleanChildElementName) ? Constant.DEFAULT_XML_NODE_NAMES : toCleanChildElementName;
|
|
|
+ Set<String> toCleanChildElementNameSet = StrUtil.strToSet(toCleanChildElementName);
|
|
|
return new EncryptExecutor(this.originJarOrWar, originIsJar, this.finalName, targetRootDir, targetLibDir, targetClassesDir,
|
|
|
- password, includeXmlPrefixSet, excludeXmlPrefixSet, toClearChildElementNameSet, includePrefixSet, excludePrefixSet, includeLibSet, alreadyProtectedLibSet, this.supportFile);
|
|
|
+ password, includeXmlPrefixSet, excludeXmlPrefixSet, toCleanChildElementNameSet, includePrefixSet, excludePrefixSet, includeLibSet, alreadyProtectedLibSet, this.supportFile);
|
|
|
}
|
|
|
|
|
|
/**
|