From e885d8efea3fc6d0bf729fafe347784127a2df7b Mon Sep 17 00:00:00 2001 From: George Gastaldi Date: Wed, 9 Aug 2023 20:22:53 -0300 Subject: [PATCH] Output build graph using `quarkus.builder.graph-output` property Add `BuilderConfig` to eliminate build warnings --- .../io/quarkus/builder/BuildChainBuilder.java | 2 +- .../io/quarkus/runtime/BuilderConfig.java | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 core/runtime/src/main/java/io/quarkus/runtime/BuilderConfig.java diff --git a/core/builder/src/main/java/io/quarkus/builder/BuildChainBuilder.java b/core/builder/src/main/java/io/quarkus/builder/BuildChainBuilder.java index 820e66dc3e81a0..0578ba0c4bc34f 100644 --- a/core/builder/src/main/java/io/quarkus/builder/BuildChainBuilder.java +++ b/core/builder/src/main/java/io/quarkus/builder/BuildChainBuilder.java @@ -30,7 +30,7 @@ */ public final class BuildChainBuilder { - private static final String GRAPH_OUTPUT = System.getProperty("jboss.builder.graph-output"); + private static final String GRAPH_OUTPUT = System.getProperty("quarkus.builder.graph-output"); static final boolean LOG_CONFLICT_CAUSING = Boolean.getBoolean("quarkus.builder.log-conflict-cause"); private final BuildStepBuilder finalStep; diff --git a/core/runtime/src/main/java/io/quarkus/runtime/BuilderConfig.java b/core/runtime/src/main/java/io/quarkus/runtime/BuilderConfig.java new file mode 100644 index 00000000000000..ff33cdfa8751df --- /dev/null +++ b/core/runtime/src/main/java/io/quarkus/runtime/BuilderConfig.java @@ -0,0 +1,29 @@ +package io.quarkus.runtime; + +import java.util.Optional; + +import io.quarkus.runtime.annotations.ConfigItem; +import io.quarkus.runtime.annotations.ConfigPhase; +import io.quarkus.runtime.annotations.ConfigRoot; + +/** + * This configuration class is here to avoid warnings when using {@code -Dquarkus.builder.=...}. + * + * @see io.quarkus.builder.BuildChainBuilder + */ +@ConfigRoot(name = "builder", phase = ConfigPhase.RUN_TIME) +public class BuilderConfig { + + /** + * The path to the graph output file. + */ + @ConfigItem + public Optional graphOutput; + + /** + * Whether or not to log the cause of a conflict. + */ + @ConfigItem + public Optional logConflictCause; + +}