From 37e8947baa484a04cd393dc35f6e323aa1ee3fa1 Mon Sep 17 00:00:00 2001 From: Swell <5782559+sultan@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:49:59 +0200 Subject: [PATCH] Second batch of maintenance following PR #672 --- .../org/codehaus/mojo/versions/UseLatestVersionsMojo.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java b/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java index fd10d8a537..da31fd138d 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java @@ -45,6 +45,7 @@ import org.codehaus.mojo.versions.api.PomHelper; import org.codehaus.mojo.versions.api.Segment; import org.codehaus.mojo.versions.ordering.InvalidSegmentException; +import org.codehaus.mojo.versions.ordering.MajorMinorIncrementalFilter; import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader; import org.codehaus.mojo.versions.utils.DependencyBuilder; @@ -166,6 +167,8 @@ private void useLatestVersions( ModifiedPomXMLEventReader pom, Collection unchangedSegment = determineUnchangedSegment( allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates ); + MajorMinorIncrementalFilter majorMinorIncfilter = + new MajorMinorIncrementalFilter( allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates ); for ( Dependency dep : dependencies ) { @@ -197,9 +200,10 @@ private void useLatestVersions( ModifiedPomXMLEventReader pom, Collection 0 ) { String newVersion = filteredVersions[filteredVersions.length - 1].toString();