Skip to content

Commit

Permalink
Maven CLI: use recipes for platform extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriOndrusek committed Oct 25, 2023
1 parent 7a3fd94 commit adb4fa7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,8 @@ public boolean isSimpleVersionUpdate() {
return VersionUpdateType.UPDATE_VERSION.equals(getVersionUpdateType())
|| VersionUpdateType.RECOMMEND_PLATFORM_MANAGED.equals(getVersionUpdateType());
}

public boolean isVersionUpdate() {
return !VersionUpdateType.ADD_VERSION.equals(getVersionUpdateType());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ public List<ExtensionUpdateInfo> getSimpleVersionUpdates() {
return streamExtensions().filter(ExtensionUpdateInfo::isSimpleVersionUpdate).collect(Collectors.toList());
}

public List<ExtensionUpdateInfo> getVersionUpdates() {
return streamExtensions().filter(ExtensionUpdateInfo::isVersionUpdate).collect(Collectors.toList());
}

public boolean shouldUpdateExtensions() {
return streamExtensions().anyMatch(ExtensionUpdateInfo::shouldUpdateExtension);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static FetchResult createRecipe(MessageWriter log, Path target, MavenArti
request.currentVersion,
request.targetVersion,
request.projectExtensionsUpdateInfo
.getSimpleVersionUpdates());
.getVersionUpdates());
QuarkusUpdateRecipe recipe = new QuarkusUpdateRecipe()
.buildTool(request.buildTool);
if (request.updateJavaVersion.isPresent()) {
Expand Down

0 comments on commit adb4fa7

Please sign in to comment.