diff --git a/easyj-maven-plugin/src/main/java/icu/easyj/maven/plugin/mojo/simplify/simplifier/AbstractPomSimplifier.java b/easyj-maven-plugin/src/main/java/icu/easyj/maven/plugin/mojo/simplify/simplifier/AbstractPomSimplifier.java index 591c65e..f94aefb 100644 --- a/easyj-maven-plugin/src/main/java/icu/easyj/maven/plugin/mojo/simplify/simplifier/AbstractPomSimplifier.java +++ b/easyj-maven-plugin/src/main/java/icu/easyj/maven/plugin/mojo/simplify/simplifier/AbstractPomSimplifier.java @@ -659,6 +659,8 @@ protected void optimizeDependencies(List dependencies) { if (!dependencyBefore.equals(dependencyAfter)) { this.log.info(" optimize dependency: " + dependencyBefore + " -> " + dependencyAfter); + } else { + this.log.info(" keep dependency: " + dependencyBefore); } } } diff --git a/easyj-maven-plugin/src/main/java/icu/easyj/maven/plugin/mojo/simplify/simplifier/pom/DependenciesPomSimplifier.java b/easyj-maven-plugin/src/main/java/icu/easyj/maven/plugin/mojo/simplify/simplifier/pom/DependenciesPomSimplifier.java index 52e4bbe..08adb56 100644 --- a/easyj-maven-plugin/src/main/java/icu/easyj/maven/plugin/mojo/simplify/simplifier/pom/DependenciesPomSimplifier.java +++ b/easyj-maven-plugin/src/main/java/icu/easyj/maven/plugin/mojo/simplify/simplifier/pom/DependenciesPomSimplifier.java @@ -57,4 +57,13 @@ public void doSimplify() { super.doSimplify(); } + + + @Override + public void afterSimplify() { + this.replaceParentRevision(); + this.removeGroupIdAndVersionIfEqualsToParent(); + this.optimizeDependencyManagement(); + this.optimizeDependencies(); + } } diff --git a/easyj-maven-plugin/src/main/java/icu/easyj/maven/plugin/mojo/simplify/simplifier/pom/PomSimplifier.java b/easyj-maven-plugin/src/main/java/icu/easyj/maven/plugin/mojo/simplify/simplifier/pom/PomSimplifier.java index f109a3c..557a1fd 100644 --- a/easyj-maven-plugin/src/main/java/icu/easyj/maven/plugin/mojo/simplify/simplifier/pom/PomSimplifier.java +++ b/easyj-maven-plugin/src/main/java/icu/easyj/maven/plugin/mojo/simplify/simplifier/pom/PomSimplifier.java @@ -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