From 6fb42119cb8835a06feb6f224d7b0764c23c3487 Mon Sep 17 00:00:00 2001 From: Alexey Loubyansky Date: Thu, 7 Mar 2024 23:23:45 +0100 Subject: [PATCH] quarkus info command --- .../java/io/quarkus/domino/cli/Quarkus.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/domino/app/src/main/java/io/quarkus/domino/cli/Quarkus.java b/domino/app/src/main/java/io/quarkus/domino/cli/Quarkus.java index a771756b..597cba14 100644 --- a/domino/app/src/main/java/io/quarkus/domino/cli/Quarkus.java +++ b/domino/app/src/main/java/io/quarkus/domino/cli/Quarkus.java @@ -101,9 +101,13 @@ public class Quarkus implements Callable { protected Set members = Set.of(); @CommandLine.Option(names = { - "--redhat-version-rate" }, description = "Calculate the rate of redhat versions among the dependencies") + "--redhat-version-rate" }, description = "Calculate the rate of redhat versions among the inspected dependencies") public boolean redhatVersionRate; + @CommandLine.Option(names = { + "--info" }, description = "Log basic Quarkus platform release information") + public boolean info; + protected MessageWriter log = MessageWriter.info(); @Override @@ -111,6 +115,20 @@ public Integer call() throws Exception { var resolver = getResolver(); var platform = readPlatformInfo(resolver); + if (info) { + log.info(""); + log.info("Platform version: " + version); + log.info(""); + log.info("Member BOMs:"); + for (var m : platform.getMembers()) { + log.info("- " + m.getBom().toCompactCoords()); + } + log.info(""); + log.info("Maven plugin: " + platform.getMavenPlugin().toCompactCoords()); + log.info(""); + return 0; + } + var memberReports = new ArrayList(members.isEmpty() ? platform.getMembers().size() : members.size()); final MemberReport coreReport = new MemberReport(platform.getCore(), isMemberSelected(platform.getCore())); for (var m : platform.getMembers()) {