From b9fe63bf1a9b6917a4a46a0f4fc44db7b8c1fc7f Mon Sep 17 00:00:00 2001 From: Andrzej Jarmoniuk Date: Sat, 19 Aug 2023 19:28:04 +0200 Subject: [PATCH] Resolves #990: Check prerequisites if required enforcer Maven version is empty --- .../mojo/versions/MinimalMavenBuildVersionFinder.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/MinimalMavenBuildVersionFinder.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/MinimalMavenBuildVersionFinder.java index 3604a83067..87b171eb8b 100644 --- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/MinimalMavenBuildVersionFinder.java +++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/MinimalMavenBuildVersionFinder.java @@ -41,11 +41,11 @@ static Optional getGreatestVersion(ArtifactVersion... v) { static ArtifactVersion find(MavenProject mavenProject, Log log) { return getGreatestVersion( - getEnforcerMavenVersion(mavenProject, log), - ofNullable(mavenProject.getPrerequisites()) - .map(Prerequisites::getMaven) - .map(DefaultArtifactVersionCache::of) - .orElse(null)) + getEnforcerMavenVersion(mavenProject, log), + ofNullable(mavenProject.getPrerequisites()) + .map(Prerequisites::getMaven) + .map(DefaultArtifactVersionCache::of) + .orElse(null)) .orElse(null); }