Skip to content

Commit

Permalink
插件内部将参数解析成set,避免对maven版本有要求 (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
novoland authored Dec 7, 2023
1 parent 4ade973 commit a491814
Showing 1 changed file with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,50 @@ protected void logExcludeMessage(List<String> jarGroupIds, List<String> jarArtif
}
}

public void setExcludes(String str) {
this.excludes = parseToSet(str);
}

public void setExcludeGroupIds(String str) {
this.excludeGroupIds = parseToSet(str);
}

public void setExcludeArtifactIds(String str) {
this.excludeArtifactIds = parseToSet(str);
}

public void setDenyImportPackages(String str) {
this.denyImportPackages = parseToSet(str);
}

public void setDenyImportClasses(String str) {
this.denyImportClasses = parseToSet(str);
}

public void setDenyImportResources(String str) {
this.denyImportResources = parseToSet(str);
}

public void setInjectPluginDependencies(String str) {
this.injectPluginDependencies = parseToSet(str);
}

public void setInjectPluginExportPackages(String str) {
this.injectPluginExportPackages = parseToSet(str);
}

private LinkedHashSet<String> parseToSet(String str) {
LinkedHashSet<String> set = new LinkedHashSet<>();
if (StringUtils.isBlank(str)) {
return set;
}
Arrays.stream(str.split(","))
.map(String::trim)
.filter(StringUtils::isNotBlank)
.forEach(set::add);
return set;
}

public static class ExcludeConfigResponse {

private boolean success;
Expand Down

0 comments on commit a491814

Please sign in to comment.