This is an automated email from the ASF dual-hosted git repository.
cdeppisch pushed a commit to branch camel-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.18.x by this push:
new 8a2757a884a8 Update to Citrus 4.10.0
8a2757a884a8 is described below
commit 8a2757a884a800fc2aac9dfd745d14da464990eb
Author: Christoph Deppisch <[email protected]>
AuthorDate: Thu Mar 19 17:33:13 2026 +0100
Update to Citrus 4.10.0
---
.../dsl/jbang/core/commands/test/TestPlugin.java | 21 ++++++++++++++-------
.../templates/citrus-application-properties.tmpl | 5 +++++
.../main/resources/templates/jbang-properties.tmpl | 6 ------
parent/pom.xml | 2 +-
4 files changed, 20 insertions(+), 14 deletions(-)
diff --git
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestPlugin.java
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestPlugin.java
index a556df43b7c3..f3505fac04d7 100644
---
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestPlugin.java
+++
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestPlugin.java
@@ -27,12 +27,14 @@ import java.util.List;
import java.util.Optional;
import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.catalog.VersionHelper;
import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
import org.apache.camel.dsl.jbang.core.commands.ExportHelper;
import org.apache.camel.dsl.jbang.core.common.CamelJBangPlugin;
import org.apache.camel.dsl.jbang.core.common.Plugin;
import org.apache.camel.dsl.jbang.core.common.PluginExporter;
import org.apache.camel.util.IOHelper;
+import org.citrusframework.CitrusSettings;
import org.citrusframework.CitrusVersion;
import org.citrusframework.jbang.JBangSettings;
import org.citrusframework.jbang.JBangSupport;
@@ -83,7 +85,8 @@ public class TestPlugin implements Plugin {
}
JBangSupport citrus =
JBangSupport.jbang().app(JBangSettings.getApp())
- .withSystemProperty("citrus.jbang.version",
CitrusVersion.version());
+ .withSystemProperty("citrus.jbang.version",
CitrusVersion.version())
+ .withSystemProperty("citrus.camel.jbang.version", new
VersionHelper().getVersion());
// Prepare commands
if ("init".equals(command)) {
@@ -118,18 +121,22 @@ public class TestPlugin implements Plugin {
throw new RuntimeCamelException("Cannot create test working
directory in: " + currentDir);
}
- // Create jbang properties with default dependencies if not present
- if (!workingDir.resolve("jbang.properties").toFile().exists()) {
- Path jbangProperties = workingDir.resolve("jbang.properties");
+ // Create Citrus application properties if not present
+ if
(!workingDir.resolve(CitrusSettings.getApplicationPropertiesFile()).toFile().exists())
{
+ Path citrusApplicationProperties =
workingDir.resolve(CitrusSettings.getApplicationPropertiesFile());
try (InputStream is
- =
TestPlugin.class.getClassLoader().getResourceAsStream("templates/jbang-properties.tmpl"))
{
+ = TestPlugin.class.getClassLoader()
+
.getResourceAsStream("templates/citrus-application-properties.tmpl")) {
String context = IOHelper.loadText(is);
context = context.replaceAll("\\{\\{ \\.CitrusVersion }}",
CitrusVersion.version());
+ context = context.replaceAll("\\{\\{ \\.CamelVersion }}",
new VersionHelper().getVersion());
- ExportHelper.safeCopy(new
ByteArrayInputStream(context.getBytes(StandardCharsets.UTF_8)),
jbangProperties);
+ ExportHelper.safeCopy(new
ByteArrayInputStream(context.getBytes(StandardCharsets.UTF_8)),
+ citrusApplicationProperties);
} catch (Exception e) {
- main.getOut().println("Failed to create jbang.properties
for tests in:" + jbangProperties);
+ main.getOut().println("Failed to create %s for tests in:
%s"
+
.formatted(CitrusSettings.getApplicationPropertiesFile(),
citrusApplicationProperties));
}
}
diff --git
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/resources/templates/citrus-application-properties.tmpl
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/resources/templates/citrus-application-properties.tmpl
new file mode 100644
index 000000000000..2db6974953ad
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/resources/templates/citrus-application-properties.tmpl
@@ -0,0 +1,5 @@
+# Camel version used by Citrus
+citrus.camel.jbang.version={{ .CamelVersion }}
+
+# Enable dump of Camel JBang integration output
+citrus.camel.jbang.dump.integration.output=true
diff --git
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/resources/templates/jbang-properties.tmpl
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/resources/templates/jbang-properties.tmpl
deleted file mode 100644
index eb7090380347..000000000000
---
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/resources/templates/jbang-properties.tmpl
+++ /dev/null
@@ -1,6 +0,0 @@
-# Declare required additional dependencies
-run.deps=org.citrusframework:citrus-camel:{{ .CitrusVersion }},\
-org.citrusframework:citrus-testcontainers:{{ .CitrusVersion }}
-
-# Enable dump of Camel JBang integration output
-run.D=citrus.camel.jbang.dump.integration.output=true
diff --git a/parent/pom.xml b/parent/pom.xml
index 185180a34723..f034a2e01499 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -105,7 +105,7 @@
<checker-framework-version>3.53.1</checker-framework-version>
<chicory-version>1.6.1</chicory-version>
<chunk-templates-version>3.6.2</chunk-templates-version>
- <citrus-version>4.9.2</citrus-version>
+ <citrus-version>4.10.0</citrus-version>
<classgraph-version>4.8.184</classgraph-version>
<cloudant-version>0.10.15</cloudant-version>
<com-ibm-mq-jakarta-client-version>9.4.5.0</com-ibm-mq-jakarta-client-version>