You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/12/07 11:51:21 UTC
[camel] branch main updated: CAMEL-18800 - Support Camel K integration in JBang run command (#8853)
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 02b0f00d51c CAMEL-18800 - Support Camel K integration in JBang run command (#8853)
02b0f00d51c is described below
commit 02b0f00d51c6bf1dfe93b291995562189bb6cd3f
Author: Christoph Deppisch <cd...@redhat.com>
AuthorDate: Wed Dec 7 12:51:15 2022 +0100
CAMEL-18800 - Support Camel K integration in JBang run command (#8853)
Besides KameletBinding we can also run Camel K Integration custom resources via JBang
---
.../main/java/org/apache/camel/dsl/jbang/core/commands/Run.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
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 67a0cac3d8c..dd59b5d4eb5 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
@@ -95,7 +95,7 @@ class Run extends CamelCommand {
//CHECKSTYLE:OFF
@Parameters(description = "The Camel file(s) to run. If no files specified then application.properties is used as source for which files to run.",
- arity = "0..9", paramLabel = "<files>", parameterConsumer = FilesConsumer.class)
+ arity = "0..9", paramLabel = "<files>", parameterConsumer = FilesConsumer.class)
Path[] filePaths; // Defined only for file path completion; the field never used
List<String> files = new ArrayList<>();
@@ -737,9 +737,10 @@ class Run extends CamelCommand {
if ("xml".equals(ext2)) {
return data.contains("<routes") || data.contains("<routeConfiguration") || data.contains("<rests");
} else {
- // also support kamelet bindings
+ // also support Camel K integrations and Kamelet bindings
return data.contains("- from:") || data.contains("- route:") || data.contains("- route-configuration:")
- || data.contains("- rest:") || data.contains("KameletBinding");
+ || data.contains("- rest:") || data.contains("KameletBinding")
+ || data.contains("kind: Integration");
}
}
}