From 7fffa4cc6f172f562000a243d3004719804d90e8 Mon Sep 17 00:00:00 2001 From: Antonio Musarra Date: Fri, 6 Dec 2024 09:50:26 +0100 Subject: [PATCH 1/3] Added the git remote url when git full info enabled (cherry picked from commit d0859fcc31b3c05f2dccf86f5ca95077f04e93fb) --- .../src/main/java/io/quarkus/info/deployment/InfoProcessor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java b/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java index 1509ac3314abf..5dec40f17527f 100644 --- a/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java +++ b/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java @@ -111,6 +111,7 @@ void gitInfo(InfoBuildTimeConfig config, commit.put("id", id); + data.put("remote", git.getRepository().getConfig().getString("remote", "origin", "url")); data.put("tags", getTags(git, latestCommit)); } From 85387f96ac9b879af1fc0fd3636179bd6137da93 Mon Sep 17 00:00:00 2001 From: Antonio Musarra Date: Fri, 6 Dec 2024 10:10:57 +0100 Subject: [PATCH 2/3] Added the name of the application in build section: The application name does not always match the artifactId value. (cherry picked from commit 67bda9cc39e71c4b0808ee53e34640c94b54d0a2) --- .../main/java/io/quarkus/info/deployment/InfoProcessor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java b/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java index 5dec40f17527f..1cafa5308a418 100644 --- a/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java +++ b/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java @@ -34,6 +34,7 @@ import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; +import io.quarkus.deployment.builditem.ApplicationInfoBuildItem; import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem; import io.quarkus.deployment.pkg.builditem.OutputTargetBuildItem; import io.quarkus.info.BuildInfo; @@ -209,10 +210,13 @@ void buildInfo(CurateOutcomeBuildItem curateOutcomeBuildItem, InfoBuildTimeConfig config, BuildProducer valuesProducer, BuildProducer beanProducer, + ApplicationInfoBuildItem infoApplication, InfoRecorder recorder) { ApplicationModel applicationModel = curateOutcomeBuildItem.getApplicationModel(); ResolvedDependency appArtifact = applicationModel.getAppArtifact(); Map buildData = new LinkedHashMap<>(); + String name = infoApplication.getName(); + buildData.put("name", name); String group = appArtifact.getGroupId(); buildData.put("group", group); String artifact = appArtifact.getArtifactId(); From ebe80d5919905e8c2ec23d72264f9b686a60c618 Mon Sep 17 00:00:00 2001 From: Antonio Musarra Date: Fri, 6 Dec 2024 10:45:31 +0100 Subject: [PATCH 3/3] Added the vendor and the vendorVersion of the Java: Having the vendor and vendor version information of Java is useful in case of support and bug fixes of the specific vendor related Java version. (cherry picked from commit 9820480d8b88d30d66625e41a8024a87af124c77) --- .../io/quarkus/info/runtime/JavaInfoContributor.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/extensions/info/runtime/src/main/java/io/quarkus/info/runtime/JavaInfoContributor.java b/extensions/info/runtime/src/main/java/io/quarkus/info/runtime/JavaInfoContributor.java index 11a88a612afbd..e381b3ba41b6e 100644 --- a/extensions/info/runtime/src/main/java/io/quarkus/info/runtime/JavaInfoContributor.java +++ b/extensions/info/runtime/src/main/java/io/quarkus/info/runtime/JavaInfoContributor.java @@ -17,10 +17,20 @@ public Map data() { //TODO: should we add more information like 'java.runtime.*' and 'java.vm.*' ? Map result = new LinkedHashMap<>(); result.put("version", getVersion()); + result.put("vendor", getVendor()); + result.put("vendorVersion", getVendorVersion()); return result; } static String getVersion() { return System.getProperty("java.version"); } + + static String getVendor() { + return System.getProperty("java.vendor"); + } + + static String getVendorVersion() { + return System.getProperty("java.vendor.version"); + } }