(camel-quarkus) 03/03: Add cli-connector support for Camel JBang runtime=quarkus

2024-05-04 Thread jamesnetherton
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit a9726063b0cc308a19ef83d998bcc500c84d56f0
Author: James Netherton 
AuthorDate: Wed May 1 14:30:03 2024 +0100

Add cli-connector support for Camel JBang runtime=quarkus
---
 .../pages/reference/extensions/cli-connector.adoc  | 19 ++
 extensions-jvm/cli-connector/deployment/pom.xml|  6 +++
 .../deployment/CliConnectorProcessor.java  | 25 
 .../deployment/CliConnectorDisabledTest.java   | 43 +
 .../deployment/CliConnectorEnabledTest.java| 44 ++
 .../cli/connector/CamelCliConnectorConfig.java | 30 +++
 .../cli/connector/CamelCliConnectorRecorder.java   | 32 
 .../cli/connector/QuarkusCliConnectorFactory.java  | 27 +
 .../cli/connector/QuarkusLocalCliConnector.java| 38 +++
 9 files changed, 264 insertions(+)

diff --git a/docs/modules/ROOT/pages/reference/extensions/cli-connector.adoc 
b/docs/modules/ROOT/pages/reference/extensions/cli-connector.adoc
index 536be15ea0..61c3634c42 100644
--- a/docs/modules/ROOT/pages/reference/extensions/cli-connector.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/cli-connector.adoc
@@ -39,3 +39,22 @@ Please refer to the above link for usage and configuration 
details.
 ifeval::[{doc-show-user-guide-link} == true]
 Check the xref:user-guide/index.adoc[User guide] for more information about 
writing Camel Quarkus applications.
 endif::[]
+
+[id="extensions-cli-connector-additional-camel-quarkus-configuration"]
+== Additional Camel Quarkus configuration
+
+[width="100%",cols="80,5,15",options="header"]
+|===
+| Configuration property | Type | Default
+
+
+|icon:lock[title=Fixed at build time] 
[[quarkus.camel.cli.enabled]]`link:#quarkus.camel.cli.enabled[quarkus.camel.cli.enabled]`
+
+Sets whether to enable Camel CLI Connector support.
+| `boolean`
+| `true`
+|===
+
+[.configuration-legend]
+{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed 
at build time. All other configuration properties are overridable at runtime.
+
diff --git a/extensions-jvm/cli-connector/deployment/pom.xml 
b/extensions-jvm/cli-connector/deployment/pom.xml
index 37c9ba9e97..dfb39cb1eb 100644
--- a/extensions-jvm/cli-connector/deployment/pom.xml
+++ b/extensions-jvm/cli-connector/deployment/pom.xml
@@ -46,6 +46,12 @@
 org.apache.camel.quarkus
 camel-quarkus-cli-connector
 
+
+
+io.quarkus
+quarkus-junit5-internal
+test
+
 
 
 
diff --git 
a/extensions-jvm/cli-connector/deployment/src/main/java/org/apache/camel/quarkus/component/cli/connector/deployment/CliConnectorProcessor.java
 
b/extensions-jvm/cli-connector/deployment/src/main/java/org/apache/camel/quarkus/component/cli/connector/deployment/CliConnectorProcessor.java
index 0edcf224df..dcad85e99d 100644
--- 
a/extensions-jvm/cli-connector/deployment/src/main/java/org/apache/camel/quarkus/component/cli/connector/deployment/CliConnectorProcessor.java
+++ 
b/extensions-jvm/cli-connector/deployment/src/main/java/org/apache/camel/quarkus/component/cli/connector/deployment/CliConnectorProcessor.java
@@ -16,14 +16,23 @@
  */
 package org.apache.camel.quarkus.component.cli.connector.deployment;
 
+import java.util.function.BooleanSupplier;
+
+import io.quarkus.builder.Version;
 import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.annotations.BuildSteps;
 import io.quarkus.deployment.annotations.ExecutionTime;
 import io.quarkus.deployment.annotations.Record;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
 import io.quarkus.deployment.pkg.steps.NativeOrNativeSourcesBuild;
+import 
org.apache.camel.quarkus.component.cli.connector.CamelCliConnectorConfig;
+import 
org.apache.camel.quarkus.component.cli.connector.CamelCliConnectorRecorder;
 import org.apache.camel.quarkus.core.JvmOnlyRecorder;
+import org.apache.camel.quarkus.core.deployment.spi.CamelBeanBuildItem;
+import org.apache.camel.spi.CliConnectorFactory;
 import org.jboss.logging.Logger;
 
+@BuildSteps(onlyIf = CliConnectorProcessor.CliConnectorEnabled.class)
 class CliConnectorProcessor {
 
 private static final Logger LOG = 
Logger.getLogger(CliConnectorProcessor.class);
@@ -34,6 +43,14 @@ class CliConnectorProcessor {
 return new FeatureBuildItem(FEATURE);
 }
 
+@BuildStep
+@Record(value = ExecutionTime.STATIC_INIT)
+CamelBeanBuildItem camelBeanBuildItem(CamelCliConnectorRecorder recorder) {
+return new CamelBeanBuildItem("quarkusCliConnectorFactory",
+CliConnectorFactory.class.getName(),
+recorder.createCliConnectorFactory(Version.getVersion()));
+}
+
 /**
  * Remove this once this extension starts supporting the native

(camel-quarkus) 02/03: Revert "Disable microprofile-fault-tolerance testing due to #5995"

2024-05-04 Thread jamesnetherton
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit b7068f9c9d61223d85bea977e4bba304c20a644e
Author: James Netherton 
AuthorDate: Wed Apr 17 12:57:18 2024 +0100

Revert "Disable microprofile-fault-tolerance testing due to #5995"

This reverts commit 17a559652d5eca26974e6d89f8af567c5e85a16f.
---
 .../foundation/core-fault-tolerance/pom.xml|  2 --
 .../faulttolerance/it/CoreFaultToleranceIT.java|  2 --
 .../faulttolerance/it/CoreFaultToleranceTest.java  |  2 --
 integration-tests/foundation-grouped/pom.xml   | 17 ++---
 integration-tests/microprofile/pom.xml | 40 +++---
 .../MicroprofileFaultToleranceIT.java  |  2 --
 .../MicroprofileFaultToleranceTest.java|  2 --
 pom.xml|  2 --
 8 files changed, 26 insertions(+), 43 deletions(-)

diff --git a/integration-test-groups/foundation/core-fault-tolerance/pom.xml 
b/integration-test-groups/foundation/core-fault-tolerance/pom.xml
index fbdc601265..2e116bcd35 100644
--- a/integration-test-groups/foundation/core-fault-tolerance/pom.xml
+++ b/integration-test-groups/foundation/core-fault-tolerance/pom.xml
@@ -59,7 +59,6 @@
 
 
 
-
 
 virtualDependencies
 
diff --git 
a/integration-test-groups/foundation/core-fault-tolerance/src/test/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceIT.java
 
b/integration-test-groups/foundation/core-fault-tolerance/src/test/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceIT.java
index a05c81faf2..76f553a17b 100644
--- 
a/integration-test-groups/foundation/core-fault-tolerance/src/test/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceIT.java
+++ 
b/integration-test-groups/foundation/core-fault-tolerance/src/test/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceIT.java
@@ -17,9 +17,7 @@
 package org.apache.camel.quarkus.core.faulttolerance.it;
 
 import io.quarkus.test.junit.QuarkusIntegrationTest;
-import org.junit.jupiter.api.Disabled;
 
-@Disabled("https://github.com/apache/camel-quarkus/issues/5995";)
 @QuarkusIntegrationTest
 public class CoreFaultToleranceIT extends CoreFaultToleranceTest {
 }
diff --git 
a/integration-test-groups/foundation/core-fault-tolerance/src/test/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceTest.java
 
b/integration-test-groups/foundation/core-fault-tolerance/src/test/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceTest.java
index 6ccdcf4364..6aaa60aaf1 100644
--- 
a/integration-test-groups/foundation/core-fault-tolerance/src/test/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceTest.java
+++ 
b/integration-test-groups/foundation/core-fault-tolerance/src/test/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceTest.java
@@ -17,13 +17,11 @@
 package org.apache.camel.quarkus.core.faulttolerance.it;
 
 import io.quarkus.test.junit.QuarkusTest;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
 import static io.restassured.RestAssured.get;
 import static org.hamcrest.Matchers.is;
 
-@Disabled("https://github.com/apache/camel-quarkus/issues/5995";)
 @QuarkusTest
 public class CoreFaultToleranceTest {
 
diff --git a/integration-tests/foundation-grouped/pom.xml 
b/integration-tests/foundation-grouped/pom.xml
index 01e5bf6155..f4c7cecd45 100644
--- a/integration-tests/foundation-grouped/pom.xml
+++ b/integration-tests/foundation-grouped/pom.xml
@@ -112,12 +112,10 @@
 org.apache.camel.quarkus
 camel-quarkus-log
 
-
 
 org.apache.camel.quarkus
 camel-quarkus-mock
@@ -214,8 +212,6 @@
 
${maven.multiModuleProjectDirectory}/integration-test-groups/foundation
 
${project.basedir}
 
src/main/resources/application.properties
-
-
core-fault-tolerance
 
 
 
@@ -456,6 +452,19 @@
 
 
 
+
+org.apache.camel.quarkus
+
camel-quarkus-microprofile-fault-tolerance-deployment
+${project.version}
+pom
+test
+
+
+*
+*
+
+
+
 
 org.apache.camel.quarkus
 camel-quarkus-mock-deployment
diff --git a/integration-tests/microprofile/pom.xml 
b/

(camel-quarkus) branch camel-main updated (6adfc3adea -> a9726063b0)

2024-05-04 Thread jamesnetherton
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a change to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


 discard 6adfc3adea Add cli-connector support for Camel JBang runtime=quarkus
omit a74a7dabcc Revert "Disable microprofile-fault-tolerance testing due to 
#5995"
omit 29608150a5 Upgrade Camel to 4.6.0
 add 5764aa4817 Remove superfluous usage of System.out.println
 add 9f82f9ed84 Register @PropertyInject classes for reflection
 add 294f70ce46 MySql test does not work on FIPS enabled system
 add ae3cc90898 Add changelog for 3.8.2
 add 0f7f3c0306 Add langchain-chat extension
 new fd8416a05a Upgrade Camel to 4.6.0
 new b7068f9c9d Revert "Disable microprofile-fault-tolerance testing due to 
#5995"
 new a9726063b0 Add cli-connector support for Camel JBang runtime=quarkus

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (6adfc3adea)
\
 N -- N -- N   refs/heads/camel-main (a9726063b0)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.md   |  31 ++
 catalog/pom.xml|  13 +
 .../ROOT/examples/components/langchain4j-chat.yml  |  13 +
 docs/modules/ROOT/examples/components/log.yml  |   4 +-
 docs/modules/ROOT/nav.adoc |   1 +
 .../reference/extensions/langchain4j-chat.adoc |  41 +++
 .../ROOT/pages/reference/extensions/log.adoc   |   6 +-
 .../core/deployment/PropertyInjectProcessor.java   |  66 
 extensions-jvm/langchain4j-chat/deployment/pom.xml |  63 
 .../chat/deployment/LangchainChatProcessor.java|  46 +++
 extensions-jvm/langchain4j-chat/pom.xml|  39 ++
 extensions-jvm/langchain4j-chat/runtime/pom.xml| 100 ++
 .../main/resources/META-INF/quarkus-extension.yaml |   9 +-
 extensions-jvm/pom.xml |   1 +
 .../main/resources/META-INF/quarkus-extension.yaml |   2 +-
 .../camel/quarkus/component/bean/BeanResource.java |  10 +
 .../camel/quarkus/component/bean/BeanRoutes.java   |   2 +
 .../component/bean/PropertyInjectedFieldBean.java  |  42 +++
 .../bean/PropertyInjectedFieldMethodBean.java  |  32 ++
 .../component/bean/PropertyInjectedMethodBean.java |  36 ++
 .../bean/src/main/resources/application.properties |   4 +
 .../quarkus/component/bean/PropertyInjectIT.java   |  23 ++
 .../quarkus/component/bean/PropertyInjectTest.java | 101 ++
 .../apache/camel/quarkus/eip/it/EipResource.java   |   1 -
 .../quarkus/component/jdbc/db2/Db2JdbcRoutes.java  |   1 -
 .../quarkus/component/jdbc/h2/H2JdbcRoutes.java|   1 -
 .../component/jdbc/mariadb/MariaDbJdbcRoutes.java  |   1 -
 .../component/jdbc/mssql/MssqlJdbcRoutes.java  |   1 -
 integration-test-groups/jdbc/mysql/README.adoc |  26 ++
 integration-test-groups/jdbc/mysql/pom.xml |  41 ++-
 .../component/jdbc/mysql/MysqlJdbcRoutes.java  |   1 -
 .../jdbc/mysql/Sha256FIPSPasswordPlugin.java   |  36 ++
 .../component/jdbc/oracle/OracleJdbcRoutes.java|   1 -
 .../jdbc/postgresql/PostgresqlJdbcRoutes.java  |   1 -
 integration-tests-jvm/langchain4j-chat/README.adoc |  20 ++
 integration-tests-jvm/langchain4j-chat/pom.xml | 127 +++
 .../langchain/chat/it/LangchainChatResource.java   | 118 ++
 .../component/langchain/chat/it/OllamaRoute.java   |  60 
 .../langchain/chat/it/LangchainChatTest.java   |  48 +++
 .../langchain/chat/it/OllamaTestResource.java  |  44 +++
 .../test/resources/mappings/multipleMessages.json  |  24 ++
 .../src/test/resources/mappings/promptMessage.json |  24 ++
 .../src/test/resources/mappings/simpleMessage.json |  24 ++
 integration-tests-jvm/pom.xml  |   1 +
 .../platform/http/proxy/it/ProxyTest.java  |   2 -
 .../component/quartz/it/QuartzResource.java|   1 -
 pom.xml|  14 +-
 poms/bom-test/pom.xml  |   6 +
 poms/bom/pom.xml   |  15 +
 poms/bom/src/main/generated/flattened-full-pom.xml | 395 +++--
 .../src/main/generated/flattened-reduced-pom.xml   |  54 ++

(camel) branch main updated: CAMEL-20735: camel-jbang - Add support for spring-boot datasource

2024-05-04 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
 new d2ef0d979bf CAMEL-20735: camel-jbang - Add support for spring-boot 
datasource
d2ef0d979bf is described below

commit d2ef0d979bfc4d54d4841831c8229bdb788752ca
Author: Claus Ibsen 
AuthorDate: Sat May 4 12:22:01 2024 +0200

CAMEL-20735: camel-jbang - Add support for spring-boot datasource
---
 .../org/apache/camel/spi/PropertiesComponent.java  |   9 ++
 .../component/properties/PropertiesComponent.java  |  16 +++
 .../org/apache/camel/main/BaseMainSupport.java |  52 +
 .../java/org/apache/camel/main/MainHelper.java |  57 +
 .../modules/ROOT/pages/camel-jbang.adoc|  40 +++
 .../apache/camel/dsl/jbang/core/commands/Run.java  |   4 +
 .../java/org/apache/camel/main/KameletMain.java|   8 +-
 .../download/AutoConfigureDownloadListener.java|   4 +-
 .../DependencyDownloaderPropertiesComponent.java   | 128 +
 .../main/download/KnownDependenciesResolver.java   |  19 ++-
 .../auto-configure/spring.datasource.url.java  |  46 
 .../camel-main-known-dependencies.properties   |   1 +
 12 files changed, 330 insertions(+), 54 deletions(-)

diff --git 
a/core/camel-api/src/main/java/org/apache/camel/spi/PropertiesComponent.java 
b/core/camel-api/src/main/java/org/apache/camel/spi/PropertiesComponent.java
index 00edeab3834..ef725a8ec01 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/PropertiesComponent.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/PropertiesComponent.java
@@ -114,6 +114,15 @@ public interface PropertiesComponent extends StaticService 
{
  */
 Properties loadProperties(Predicate filter);
 
+/**
+ * Loads the properties from the default locations and extract properties 
by the given prefix.
+ *
+ * @param  optionPrefix prefix to filter
+ * @param  nested   whether to include nested properties
+ * @return  the properties loaded with option prefix removed.
+ */
+Properties extractProperties(String optionPrefix, boolean nested);
+
 /**
  * Loads the properties from the default locations and sources filtering 
them out according to a predicate, and maps
  * the key using the key mapper.
diff --git 
a/core/camel-base/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java
 
b/core/camel-base/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java
index bf708f58a22..3ca2daee9ba 100644
--- 
a/core/camel-base/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java
+++ 
b/core/camel-base/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java
@@ -47,6 +47,7 @@ import org.apache.camel.util.FilePathResolver;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.OrderedLocationProperties;
 import org.apache.camel.util.OrderedProperties;
+import org.apache.camel.util.PropertiesHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -236,6 +237,21 @@ public class PropertiesComponent extends ServiceSupport
 return loadProperties(filter, k -> k);
 }
 
+@Override
+public Properties extractProperties(String optionPrefix, boolean nested) {
+Properties answer = new Properties();
+var map = loadPropertiesAsMap(k -> {
+boolean accept = k.startsWith(optionPrefix);
+if (accept && !nested) {
+int pos = k.lastIndexOf('.');
+accept = pos == -1 || pos <= optionPrefix.length();
+}
+return accept;
+});
+answer.putAll(PropertiesHelper.extractProperties(map, optionPrefix));
+return answer;
+}
+
 @Override
 public Properties loadProperties(Predicate filter, 
Function keyMapper) {
 OrderedLocationProperties prop = new OrderedLocationProperties();
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java 
b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
index 645cd0d2638..90a833951f5 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
@@ -33,7 +33,6 @@ import java.util.Properties;
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.function.Function;
-import java.util.function.Predicate;
 import java.util.stream.Collectors;
 
 import org.apache.camel.CamelConfiguration;
@@ -503,37 +502,10 @@ public abstract class BaseMainSupport extends BaseService 
{
 
 private static void logConfigurationSummary(OrderedLocationProperties 
autoConfiguredProperties) {
 // first log variables
-doLogConfigurationSummary(autoConfiguredProperties, "Variables 
sum

(camel) branch regen_bot updated (8bc55ff4b35 -> d2ef0d979bf)

2024-05-04 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch regen_bot
in repository https://gitbox.apache.org/repos/asf/camel.git


from 8bc55ff4b35 (chores) brand: add project icon in IntelliJ
 add d2ef0d979bf CAMEL-20735: camel-jbang - Add support for spring-boot 
datasource

No new revisions were added by this update.

Summary of changes:
 .../org/apache/camel/spi/PropertiesComponent.java  |   9 ++
 .../component/properties/PropertiesComponent.java  |  16 +++
 .../org/apache/camel/main/BaseMainSupport.java |  52 +
 .../java/org/apache/camel/main/MainHelper.java |  57 +
 .../modules/ROOT/pages/camel-jbang.adoc|  40 +++
 .../apache/camel/dsl/jbang/core/commands/Run.java  |   4 +
 .../java/org/apache/camel/main/KameletMain.java|   8 +-
 .../download/AutoConfigureDownloadListener.java|   4 +-
 .../DependencyDownloaderPropertiesComponent.java   | 128 +
 .../main/download/KnownDependenciesResolver.java   |  19 ++-
 .../auto-configure/spring.datasource.url.java  |  46 
 .../camel-main-known-dependencies.properties   |   1 +
 12 files changed, 330 insertions(+), 54 deletions(-)
 create mode 100644 
dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderPropertiesComponent.java
 create mode 100644 
dsl/camel-kamelet-main/src/main/resources/auto-configure/spring.datasource.url.java



(camel) branch main updated: CAMEL-20736: camel-jbang - Catalog downloaded should not start CamelContext

2024-05-04 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
 new 742646f730b CAMEL-20736: camel-jbang - Catalog downloaded should not 
start CamelContext
742646f730b is described below

commit 742646f730bfad654204972b99d869fab3ebe370
Author: Claus Ibsen 
AuthorDate: Sat May 4 13:19:08 2024 +0200

CAMEL-20736: camel-jbang - Catalog downloaded should not start CamelContext
---
 .../dsl/jbang/core/commands/ExportBaseCommand.java |   2 +
 .../dsl/jbang/core/commands/ExportSpringBoot.java  |   2 +
 .../camel/dsl/jbang/core/common/CatalogLoader.java | 105 ++---
 3 files changed, 53 insertions(+), 56 deletions(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
index e01a9fc7622..a582a9204fb 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
@@ -423,6 +423,8 @@ abstract class ExportBaseCommand extends CamelCommand {
 }
 answer.removeAll(toBeRemoved);
 
+System.out.println(answer);
+
 return answer;
 }
 
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
index d5070320abf..e7d8165bd6f 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
@@ -104,9 +104,11 @@ class ExportSpringBoot extends Export {
 srcKameletsResourcesDir.mkdirs();
 // copy application properties files
 copyApplicationPropertiesFiles(srcResourcesDir);
+
 // copy source files
 copySourceFiles(settings, profile, srcJavaDirRoot, srcJavaDir, 
srcResourcesDir, srcCamelResourcesDir,
 srcKameletsResourcesDir, srcPackageName);
+
 // copy from settings to profile
 copySettingsAndProfile(settings, profile, srcResourcesDir, prop -> {
 if (!hasModeline(settings)) {
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/CatalogLoader.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/CatalogLoader.java
index d10bb13826d..d06539af851 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/CatalogLoader.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/CatalogLoader.java
@@ -31,10 +31,10 @@ import org.apache.camel.catalog.CamelCatalog;
 import org.apache.camel.catalog.DefaultCamelCatalog;
 import org.apache.camel.catalog.RuntimeProvider;
 import org.apache.camel.catalog.VersionManager;
-import org.apache.camel.main.KameletMain;
 import org.apache.camel.main.download.DependencyDownloaderClassLoader;
 import org.apache.camel.main.download.DownloadException;
 import org.apache.camel.main.download.MavenDependencyDownloader;
+import org.apache.camel.support.ObjectHelper;
 import org.apache.camel.tooling.maven.MavenArtifact;
 
 public final class CatalogLoader {
@@ -49,27 +49,21 @@ public final class CatalogLoader {
 }
 
 public static CamelCatalog loadCatalog(String repos, String version) 
throws Exception {
+CamelCatalog answer = new DefaultCamelCatalog();
 if (version == null) {
-CamelCatalog answer = new DefaultCamelCatalog();
+answer = new DefaultCamelCatalog();
 answer.enableCache();
 return answer;
 }
 
-// use kamelet-main to dynamic download dependency via maven
-KameletMain main = new KameletMain();
+DependencyDownloaderClassLoader cl = new 
DependencyDownloaderClassLoader(null);
+MavenDependencyDownloader downloader = new MavenDependencyDownloader();
+downloader.setClassLoader(cl);
+downloader.setRepos(repos);
 try {
-main.setRepos(repos);
-// enable stub in silent mode so we do not use real components
-main.setSilent(true);
-main.setStubPattern("*");
-main.start();
-
-// wrap downloaded catalog files in an isolated classloader
-DependencyDownloaderClassLoader cl
-= new DependencyDownloaderClassLoader(null);
+downloader.start();
 
 // download camel-catalog fo

(camel) branch main updated: CAMEL-20736: camel-jbang - Catalog downloaded should not start CamelContext

2024-05-04 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
 new 7eda1e622bb CAMEL-20736: camel-jbang - Catalog downloaded should not 
start CamelContext
7eda1e622bb is described below

commit 7eda1e622bb647a81a2139f65375fc8c7d64fa45
Author: Claus Ibsen 
AuthorDate: Sat May 4 13:22:17 2024 +0200

CAMEL-20736: camel-jbang - Catalog downloaded should not start CamelContext
---
 .../org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java | 2 --
 1 file changed, 2 deletions(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
index a582a9204fb..e01a9fc7622 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
@@ -423,8 +423,6 @@ abstract class ExportBaseCommand extends CamelCommand {
 }
 answer.removeAll(toBeRemoved);
 
-System.out.println(answer);
-
 return answer;
 }
 



(camel) branch regen_bot updated (d2ef0d979bf -> 742646f730b)

2024-05-04 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch regen_bot
in repository https://gitbox.apache.org/repos/asf/camel.git


from d2ef0d979bf CAMEL-20735: camel-jbang - Add support for spring-boot 
datasource
 add 742646f730b CAMEL-20736: camel-jbang - Catalog downloaded should not 
start CamelContext

No new revisions were added by this update.

Summary of changes:
 .../dsl/jbang/core/commands/ExportBaseCommand.java |   2 +
 .../dsl/jbang/core/commands/ExportSpringBoot.java  |   2 +
 .../camel/dsl/jbang/core/common/CatalogLoader.java | 105 ++---
 3 files changed, 53 insertions(+), 56 deletions(-)



(camel) branch main updated: CAMEL-20735: camel-jbang - Add support for spring-boot datasource

2024-05-04 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
 new 0c13dff431f CAMEL-20735: camel-jbang - Add support for spring-boot 
datasource
0c13dff431f is described below

commit 0c13dff431f807593beab748c4051178cfa20f0d
Author: Claus Ibsen 
AuthorDate: Sat May 4 13:27:18 2024 +0200

CAMEL-20735: camel-jbang - Add support for spring-boot datasource
---
 .../src/main/resources/auto-configure/spring.datasource.url.java| 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/dsl/camel-kamelet-main/src/main/resources/auto-configure/spring.datasource.url.java
 
b/dsl/camel-kamelet-main/src/main/resources/auto-configure/spring.datasource.url.java
index b4cfd8fee19..2629262b273 100644
--- 
a/dsl/camel-kamelet-main/src/main/resources/auto-configure/spring.datasource.url.java
+++ 
b/dsl/camel-kamelet-main/src/main/resources/auto-configure/spring.datasource.url.java
@@ -15,9 +15,7 @@
  * limitations under the License.
  */
 
-var answer = "";
 var registry = context.getRegistry();
-answer = "Auto-configuring spring-datasource";
 
 var p = new org.springframework.boot.autoconfigure.jdbc.DataSourceProperties();
 p.setBeanClassLoader(context.getApplicationContextClassLoader());
@@ -41,6 +39,6 @@ 
org.apache.camel.main.MainHelper.setPropertiesOnTarget(context, ds, hikari, "spr
 registry.bind(name, ds);
 
 // log summary to see what was configured
-org.apache.camel.main.MainHelper.logConfigurationSummary(null, set, "Spring 
DataSource (" + name + ")", null);
+org.apache.camel.main.MainHelper.logConfigurationSummary(null, set, 
"Auto-configuration Spring Datasource: " + name + " summary", null);
 
-return answer;
\ No newline at end of file
+return null;
\ No newline at end of file



(camel) branch regen_bot updated (742646f730b -> 7eda1e622bb)

2024-05-04 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch regen_bot
in repository https://gitbox.apache.org/repos/asf/camel.git


from 742646f730b CAMEL-20736: camel-jbang - Catalog downloaded should not 
start CamelContext
 add 7eda1e622bb CAMEL-20736: camel-jbang - Catalog downloaded should not 
start CamelContext

No new revisions were added by this update.

Summary of changes:
 .../org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java | 2 --
 1 file changed, 2 deletions(-)



(camel) branch regen_bot updated (7eda1e622bb -> 0c13dff431f)

2024-05-04 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch regen_bot
in repository https://gitbox.apache.org/repos/asf/camel.git


from 7eda1e622bb CAMEL-20736: camel-jbang - Catalog downloaded should not 
start CamelContext
 add 0c13dff431f CAMEL-20735: camel-jbang - Add support for spring-boot 
datasource

No new revisions were added by this update.

Summary of changes:
 .../src/main/resources/auto-configure/spring.datasource.url.java| 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)



(camel) branch main updated: CAMEL-20737: camel-jbang - Export with fresh does not work. Export should read application.properties if present.

2024-05-04 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
 new 1d2000b0298 CAMEL-20737: camel-jbang - Export with fresh does not 
work. Export should read application.properties if present.
1d2000b0298 is described below

commit 1d2000b0298941f0fcfa9c4bf3bb3ea4ce0fd8df
Author: Claus Ibsen 
AuthorDate: Sat May 4 13:57:30 2024 +0200

CAMEL-20737: camel-jbang - Export with fresh does not work. Export should 
read application.properties if present.
---
 .../org/apache/camel/dsl/jbang/core/commands/ExportCamelMain.java | 2 +-
 .../java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java  | 2 +-
 .../org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java| 2 +-
 .../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java   | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportCamelMain.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportCamelMain.java
index 782589666ea..d833f666416 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportCamelMain.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportCamelMain.java
@@ -59,7 +59,7 @@ class ExportCamelMain extends Export {
 
 // the settings file has information what to export
 File settings = new File(CommandLineHelper.getWorkDir(), 
Run.RUN_SETTINGS_FILE);
-if (fresh || files != null || !settings.exists()) {
+if (fresh || !files.isEmpty() || !settings.exists()) {
 // allow to automatic build
 if (!quiet && fresh) {
 printer().println("Generating fresh run data");
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java
index c736b920bfb..1e481b29b33 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java
@@ -62,7 +62,7 @@ class ExportQuarkus extends Export {
 
 // the settings file has information what to export
 File settings = new File(CommandLineHelper.getWorkDir(), 
Run.RUN_SETTINGS_FILE);
-if (fresh || files != null || !settings.exists()) {
+if (fresh || !files.isEmpty() || !settings.exists()) {
 // allow to automatic build
 if (!quiet) {
 printer().println("Generating fresh run data");
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
index e7d8165bd6f..948b4c6d2df 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
@@ -63,7 +63,7 @@ class ExportSpringBoot extends Export {
 
 // the settings file has information what to export
 File settings = new File(CommandLineHelper.getWorkDir(), 
Run.RUN_SETTINGS_FILE);
-if (fresh || files != null || !settings.exists()) {
+if (fresh || !files.isEmpty() || !settings.exists()) {
 // allow to automatic build
 if (!quiet) {
 printer().println("Generating fresh run data");
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
index 35acf9e6b57..07420806a1a 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
@@ -455,8 +455,8 @@ public class Run extends CamelCommand {
  + " because application.properties 
file does not exist or camel.main.routesIncludePattern is not configured");
 return 1;
 } else {
-// silent-run then auto-detect all files (except 
properties as they are loaded explicit)
-String[] allFiles = new File(".").list((dir, name) -> 
!name.endsWith(".properties"));
+// silent-run then auto-detect all files
+String[

(camel) branch main updated: CAMEL-20737: camel-jbang - Export with fresh does not work. Export should read application.properties if present.

2024-05-04 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
 new 166156ebdef CAMEL-20737: camel-jbang - Export with fresh does not 
work. Export should read application.properties if present.
166156ebdef is described below

commit 166156ebdefd00a6446fccc314479d154ea60311
Author: Claus Ibsen 
AuthorDate: Sat May 4 14:01:10 2024 +0200

CAMEL-20737: camel-jbang - Export with fresh does not work. Export should 
read application.properties if present.
---
 .../org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java| 4 
 1 file changed, 4 insertions(+)

diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
index 948b4c6d2df..2b0086cf477 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
@@ -233,6 +233,10 @@ class ExportSpringBoot extends Export {
 gav.setVersion(camelVersion);
 }
 }
+// use spring-boot version from BOM
+if ("org.springframework.boot".equals(gid)) {
+gav.setVersion(null); // uses BOM so version should not be 
included
+}
 gavs.add(gav);
 }
 



(camel) branch regen_bot updated (0c13dff431f -> 1d2000b0298)

2024-05-04 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch regen_bot
in repository https://gitbox.apache.org/repos/asf/camel.git


from 0c13dff431f CAMEL-20735: camel-jbang - Add support for spring-boot 
datasource
 add 1d2000b0298 CAMEL-20737: camel-jbang - Export with fresh does not 
work. Export should read application.properties if present.

No new revisions were added by this update.

Summary of changes:
 .../org/apache/camel/dsl/jbang/core/commands/ExportCamelMain.java | 2 +-
 .../java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java  | 2 +-
 .../org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java| 2 +-
 .../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java   | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)



(camel) branch regen_bot updated (1d2000b0298 -> 166156ebdef)

2024-05-04 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch regen_bot
in repository https://gitbox.apache.org/repos/asf/camel.git


from 1d2000b0298 CAMEL-20737: camel-jbang - Export with fresh does not 
work. Export should read application.properties if present.
 add 166156ebdef CAMEL-20737: camel-jbang - Export with fresh does not 
work. Export should read application.properties if present.

No new revisions were added by this update.

Summary of changes:
 .../org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java| 4 
 1 file changed, 4 insertions(+)



Re: [I] [CI] - Camel Main Branch Build Failure [camel-quarkus]

2024-05-04 Thread via GitHub


github-actions[bot] commented on issue #2927:
URL: https://github.com/apache/camel-quarkus/issues/2927#issuecomment-2094536284

   The [camel-main](https://github.com/apache/camel-quarkus/tree/camel-main) 
branch build has failed:
   
   * Build ID: 8954185559-1369-080c5d78-ef19-48fa-9a7e-0996ec8291c1
   * Camel Quarkus Commit: a9726063b0cc308a19ef83d998bcc500c84d56f0
   
   * Camel Main Commit: 0f7f3c0306a7e5cd574900a04d922b3a40674f10
   * Link to build: 
https://github.com/apache/camel-quarkus/actions/runs/8954185559


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] [CI] - Quarkus Main Branch Build Failure [camel-quarkus]

2024-05-04 Thread via GitHub


github-actions[bot] commented on issue #2926:
URL: https://github.com/apache/camel-quarkus/issues/2926#issuecomment-2094570700

   The 
[quarkus-main](https://github.com/apache/camel-quarkus/tree/quarkus-main) 
branch build has failed:
   
   * Build ID: 8954976548-1473-07f4cce1-6513-4973-8c08-1c85e787b76f
   * Camel Quarkus Commit: 2a6da4db8c442dd6674753588751f9153c885180
   
   * Quarkus Main Commit: 0f7f3c0306a7e5cd574900a04d922b3a40674f10
   * Link to build: 
https://github.com/apache/camel-quarkus/actions/runs/8954976548


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org