Skip to content

Commit

Permalink
bugfix: 修复 simplify-pom 插件生成 <profiles> 内容时,变量变为了实际值的问题修复。
Browse files Browse the repository at this point in the history
  • Loading branch information
wangliang181230 committed May 21, 2024
1 parent 7886ba8 commit c9bd9e9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void execute() throws MojoExecutionException {
getLog().info("fileList: " + generateFiles.toString());

for (FileInfo fileInfo : generateFiles) {
if (StringUtils.isEmpty(fileInfo.getPath()) || fileInfo.isEnabled()) {
if (StringUtils.isEmpty(fileInfo.getPath()) || !fileInfo.isEnabled()) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -857,17 +857,6 @@ public void removeProfiles() {
}
}

public void keepProfiles() {
if (isEmpty(originalModel.getProfiles())) {
return;
}

if ((originalModel.getParent() != null && model.getParent() != null)
|| (originalModel.getParent() == null && model.getParent() == null)) {
originalModel.setProfiles(model.getProfiles());
}
}

//endregion ##


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ public void doSimplify() {
this.removeModules();

this.removeLocalProperties();

this.keepProfiles();
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public static void createFile(File newFile, String text) throws IOException {
}

try (FileOutputStream out = new FileOutputStream(newFile)) {
out.write(text.getBytes());
out.write(text.replaceAll("\r", "").getBytes());
out.flush();
}
}
Expand Down

0 comments on commit c9bd9e9

Please sign in to comment.