From fb0a965aac0597199b3379c0f3023cb05c0f3a3f Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Thu, 21 Sep 2023 09:59:08 +0200 Subject: [PATCH] Log error when project cannot be created --- .../kubernetes/deployment/KubernetesCommonHelper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/KubernetesCommonHelper.java b/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/KubernetesCommonHelper.java index 511a1d5f8f1e8..d7045b6cf22a8 100644 --- a/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/KubernetesCommonHelper.java +++ b/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/KubernetesCommonHelper.java @@ -104,8 +104,10 @@ import io.quarkus.kubernetes.spi.Property; import io.quarkus.kubernetes.spi.RoleRef; import io.quarkus.kubernetes.spi.Subject; +import org.jboss.logging.Logger; public class KubernetesCommonHelper { + private static final Logger LOG = Logger.getLogger(KubernetesCommonHelper.class); private static final String ANY = null; private static final String OUTPUT_ARTIFACT_FORMAT = "%s%s.jar"; private static final String[] PROMETHEUS_ANNOTATION_TARGETS = { "Service", @@ -125,9 +127,10 @@ public static Optional createProject(ApplicationInfoBuildItem app, public static Optional createProject(ApplicationInfoBuildItem app, Optional customProjectRoot, Path artifactPath) { //Let dekorate create a Project instance and then override with what is found in ApplicationInfoBuildItem. + final var name = app.getName(); try { Project project = FileProjectFactory.create(artifactPath.toFile()); - BuildInfo buildInfo = new BuildInfo(app.getName(), app.getVersion(), + BuildInfo buildInfo = new BuildInfo(name, app.getVersion(), "jar", project.getBuildInfo().getBuildTool(), project.getBuildInfo().getBuildToolVersion(), artifactPath.toAbsolutePath(), @@ -139,6 +142,7 @@ public static Optional createProject(ApplicationInfoBuildItem app, buildInfo, project.getScmInfo())); } catch (Exception e) { + LOG.debugv(e, "Couldn't create project for {0} application", name); return Optional.empty(); } }