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 acd71c3 commit c0d6ec6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,8 @@ protected void optimizeDependencies(List<Dependency> dependencies) {

if (!dependencyBefore.equals(dependencyAfter)) {
this.log.info(" optimize dependency: " + dependencyBefore + " -> " + dependencyAfter);
} else {
this.log.info(" keep dependency: " + dependencyBefore);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,13 @@ 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,6 +46,15 @@ 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 c0d6ec6

Please sign in to comment.