This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch feature/CAMEL-23857-tui-runtime-chooser
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e3a48a544847dc6ec5bdf70014e7278e41f87aae
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Jun 29 22:05:32 2026 +0200

    CAMEL-23857: Move profile to DefaultConfigurationProperties so all runtimes 
(Spring Boot, Quarkus) can use it
    
    Co-Authored-By: Claude <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../camel-main-configuration-metadata.json         |  2 +-
 .../camel/main/DefaultConfigurationProperties.java | 33 +++++++++++++++++++++
 .../camel/main/MainConfigurationProperties.java    | 34 ----------------------
 3 files changed, 34 insertions(+), 35 deletions(-)

diff --git 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index 6f476fc39be7..ebf86b1e192c 100644
--- 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -105,7 +105,7 @@
     { "name": "camel.main.modeline", "required": false, "description": 
"Whether to support JBang style \/\/DEPS to specify additional dependencies 
when running Camel CLI", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
     { "name": "camel.main.name", "required": false, "description": "Sets the 
name of the CamelContext.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "string", 
"javaType": "java.lang.String", "secret": false },
     { "name": "camel.main.producerTemplateCacheSize", "required": false, 
"description": "Producer template endpoints cache size.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", 
"javaType": "int", "defaultValue": 1000, "secret": false },
-    { "name": "camel.main.profile", "required": false, "description": "Camel 
profile to use when running. The dev profile is for development, which enables 
a set of additional developer focus functionality, tracing, debugging, and 
gathering additional runtime statistics that are useful during development. 
However, those additional features has a slight overhead cost, and are not 
enabled for production profile. The default profile is prod.", "sourceType": 
"org.apache.camel.main.MainConfig [...]
+    { "name": "camel.main.profile", "required": false, "description": "Camel 
profile to use when running. The dev profile is for development, which enables 
a set of additional developer focus functionality, tracing, debugging, and 
gathering additional runtime statistics that are useful during development. 
However, those additional features has a slight overhead cost, and are not 
enabled for production profile. The default profile is prod.", "sourceType": 
"org.apache.camel.main.DefaultCon [...]
     { "name": "camel.main.routeFilterExcludePattern", "required": false, 
"description": "Used for filtering routes routes matching the given pattern, 
which follows the following rules: - Match by route id - Match by route input 
endpoint uri The matching is using exact match, by wildcard and regular 
expression as documented by PatternHelper#matchPattern(String,String) . For 
example to only include routes which starts with foo in their route id's, use: 
include=foo&#42; And to exclude route [...]
     { "name": "camel.main.routeFilterIncludePattern", "required": false, 
"description": "Used for filtering routes matching the given pattern, which 
follows the following rules: - Match by route id - Match by route input 
endpoint uri The matching is using exact match, by wildcard and regular 
expression as documented by PatternHelper#matchPattern(String,String) . For 
example to only include routes which starts with foo in their route id's, use: 
include=foo&#42; And to exclude routes which [...]
     { "name": "camel.main.routesBuilderClasses", "required": false, 
"description": "Sets classes names that implement RoutesBuilder .", 
"sourceType": "org.apache.camel.main.MainConfigurationProperties", "type": 
"string", "javaType": "java.lang.String", "secret": false },
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
index 01e3034a48db..c2bba2d5a1c2 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
@@ -34,6 +34,8 @@ public abstract class DefaultConfigurationProperties<T> {
 
     private String name;
     private String description;
+    @Metadata(enums = "dev,test,prod")
+    private String profile;
     @Metadata(defaultValue = "Default", enums = 
"Verbose,Default,Brief,Oneline,Off")
     private StartupSummaryLevel startupSummaryLevel;
     private int durationMaxSeconds;
@@ -190,6 +192,23 @@ public abstract class DefaultConfigurationProperties<T> {
         this.description = description;
     }
 
+    public String getProfile() {
+        return profile;
+    }
+
+    /**
+     * Camel profile to use when running.
+     *
+     * The dev profile is for development, which enables a set of additional 
developer focus functionality, tracing,
+     * debugging, and gathering additional runtime statistics that are useful 
during development. However, those
+     * additional features has a slight overhead cost, and are not enabled for 
production profile.
+     *
+     * The default profile is prod.
+     */
+    public void setProfile(String profile) {
+        this.profile = profile;
+    }
+
     public StartupSummaryLevel getStartupSummaryLevel() {
         return startupSummaryLevel;
     }
@@ -1776,6 +1795,20 @@ public abstract class DefaultConfigurationProperties<T> {
         return (T) this;
     }
 
+    /**
+     * Camel profile to use when running.
+     *
+     * The dev profile is for development, which enables a set of additional 
developer focus functionality, tracing,
+     * debugging, and gathering additional runtime statistics that are useful 
during development. However, those
+     * additional features has a slight overhead cost, and are not enabled for 
production profile.
+     *
+     * The default profile is prod.
+     */
+    public T withProfile(String profile) {
+        this.profile = profile;
+        return (T) this;
+    }
+
     /**
      * To specify for how long time in seconds to keep running the JVM before 
automatic terminating the JVM. You can use
      * this to run Camel for a short while.
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/MainConfigurationProperties.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/MainConfigurationProperties.java
index 5a6da245a292..7502b3702ed4 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/MainConfigurationProperties.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/MainConfigurationProperties.java
@@ -26,7 +26,6 @@ import org.apache.camel.builder.LambdaRouteBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.spi.BootstrapCloseable;
 import org.apache.camel.spi.Configurer;
-import org.apache.camel.spi.Metadata;
 
 /**
  * Global configuration for Camel Main to configure context name, stream 
caching and other global configurations.
@@ -35,8 +34,6 @@ import org.apache.camel.spi.Metadata;
 public class MainConfigurationProperties extends 
DefaultConfigurationProperties<MainConfigurationProperties>
         implements BootstrapCloseable {
 
-    @Metadata(enums = "dev,test,prod")
-    private String profile;
     private boolean autoConfigurationEnabled = true;
     private boolean autoConfigurationEnvironmentVariablesEnabled = true;
     private boolean autoConfigurationSystemPropertiesEnabled = true;
@@ -506,23 +503,6 @@ public class MainConfigurationProperties extends 
DefaultConfigurationProperties<
     // getter and setters
     // --------------------------------------------------------------
 
-    public String getProfile() {
-        return profile;
-    }
-
-    /**
-     * Camel profile to use when running.
-     *
-     * The dev profile is for development, which enables a set of additional 
developer focus functionality, tracing,
-     * debugging, and gathering additional runtime statistics that are useful 
during development. However, those
-     * additional features has a slight overhead cost, and are not enabled for 
production profile.
-     *
-     * The default profile is prod.
-     */
-    public void setProfile(String profile) {
-        this.profile = profile;
-    }
-
     public boolean isAutoConfigurationEnabled() {
         return autoConfigurationEnabled;
     }
@@ -852,20 +832,6 @@ public class MainConfigurationProperties extends 
DefaultConfigurationProperties<
     // fluent builders
     // --------------------------------------------------------------
 
-    /**
-     * Camel profile to use when running.
-     *
-     * The dev profile is for development, which enables a set of additional 
developer focus functionality, tracing,
-     * debugging, and gathering additional runtime statistics that are useful 
during development. However, those
-     * additional features has a slight overhead cost, and are not enabled for 
production profile.
-     *
-     * The default profile is prod.
-     */
-    public MainConfigurationProperties withProfile(String profile) {
-        this.profile = profile;
-        return this;
-    }
-
     /**
      * Whether auto configuration of components/dataformats/languages is 
enabled or not. When enabled the configuration
      * parameters are loaded from the properties component and configured as 
defaults (similar to spring-boot

Reply via email to