Skip to content

Commit

Permalink
optimize: 优化 PomSimplifier,避免 dependencyManagement 中的版本号被替换为具体版本号,导致子…
Browse files Browse the repository at this point in the history
…模块无法重写。
  • Loading branch information
wangliang181230 committed Jun 13, 2024
1 parent c0d6ec6 commit 88ce398
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,8 @@ protected void optimizeDependencies(List<Dependency> dependencies) {
}

protected Function<String, String> getReplaceVariableFunction() {
if (this.originalModel.getParent() != null || isEmpty(this.model.getProperties())) {
boolean removedParent = this.originalModel.getParent() == null && this.model.getParent() != null;
if (!removedParent && (this.originalModel.getParent() != null || isEmpty(this.model.getProperties()))) {
this.log.info(" - Optimize with 'getProjectProperty'");
return this::getProjectProperty;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,4 @@ public void doSimplify() {

super.doSimplify();
}


@Override
public void afterSimplify() {
this.replaceParentRevision();
this.removeGroupIdAndVersionIfEqualsToParent();
this.optimizeDependencyManagement();
this.optimizeDependencies();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ public void doSimplify() {
}


@Override
public void afterSimplify() {
this.replaceParentRevision();
this.removeGroupIdAndVersionIfEqualsToParent();
//this.optimizeDependencyManagement();
this.optimizeDependencies();
}


@Override
public void removeDependencyManagement() {
// do nothing
Expand Down

0 comments on commit 88ce398

Please sign in to comment.