This is an automated email from the ASF dual-hosted git repository. apupier 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 959c18672ae Fix several Camel Jbang functionalities on Windows when classpath url is used 959c18672ae is described below commit 959c18672aed5eb9cd6ac5835496e1456b8319f6 Author: Aurélien Pupier <apup...@redhat.com> AuthorDate: Tue Jun 3 14:40:52 2025 +0200 Fix several Camel Jbang functionalities on Windows when classpath url is used * Checking if the path starts with classpath: before using it with Path.of * Use Path.of instead of Paths.get as the javadoc is recommending it this way it allows to get down from 34 failures and 2 errors to 2 errors and 2 failures on Windows for reference, the regression was introduced with https://github.com/apache/camel/commit/e732f61286f69bd9aec5802cff8ececf51a78377 Signed-off-by: Aurélien Pupier <apup...@redhat.com> --- .../modules/ROOT/pages/camel-4x-upgrade-guide-4_12.adoc | 11 +++++++++-- .../java/org/apache/camel/dsl/jbang/core/commands/Run.java | 8 +++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_12.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_12.adoc index 06c2618bd0f..4693872497b 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_12.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_12.adoc @@ -236,10 +236,17 @@ The `camel-jetty-starter` has been deprecated in favor of `camel-platform-http-s The `camel-undertow-starter` has been deprecated in favor of `camel-platform-http-starter` to use the HTTP server from Spring Boot. - == camel-langchain4j-tokenizer The code was upgraded to LangChain4j version 1.0.0, which brings a few breaking changes: - By default, tokenization now uses segment sizes -- To tokenize by tokens, the model used in the system must be provided \ No newline at end of file +- To tokenize by tokens, the model used in the system must be provided + +== Known regressions + +On Windows, Camel Jbang export is no more working out of the box. A workaround consists in providing `--maven-wrapper=false`. + +On Windows, when using an URL starting with `classpath:` with Camel JBang, most of the actions are not working. + +Both are fixed in Camel 4.13. 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 524c5abf4b4..a973234597e 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 @@ -1871,9 +1871,11 @@ public class Run extends CamelCommand { } // skip dirs - Path path = Paths.get(name); - if (Files.exists(path) && Files.isDirectory(path)) { - return true; + if (!name.startsWith("classpath:")) { + Path path = Path.of(name); + if (Files.exists(path) && Files.isDirectory(path)) { + return true; + } } if (FileUtil.onlyExt(name) == null) {