[
https://issues.apache.org/jira/browse/CAMEL-22675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-22675:
--------------------------------
Fix Version/s: 4.17.0
> Camel JBang Run with --source-dir always loads http server
> ----------------------------------------------------------
>
> Key: CAMEL-22675
> URL: https://issues.apache.org/jira/browse/CAMEL-22675
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang
> Affects Versions: 4.14.2, 4.16.0
> Reporter: Mikael Koskinen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.17.0
>
>
> If I use --source-dir argument in camel run, http server is always loaded.
> This doesn't happen with 4.10.7 but 4.14.2 and 4.16.0 both has the same
> issue.
> Going through old issues I found
> https://issues.apache.org/jira/browse/CAMEL-21987 which could be related?
> *With 4.10.7:*
> {code:java}
> 2025-11-10 08:43:56.125 INFO 958775 --- [ main]
> org.apache.camel.main.MainSupport : Apache Camel (JBang) 4.10.7 is
> starting
> 2025-11-10 08:43:56.155 INFO 958775 --- [ main]
> org.apache.camel.main.MainSupport : Additional files added to
> classpath: anotherintegration_kcqcoey2/application.properties~
> 2025-11-10 08:43:56.221 INFO 958775 --- [ main]
> org.apache.camel.main.MainSupport : Running Linux
> 6.17.6-300.fc43.x86_64 (amd64)
> 2025-11-10 08:43:56.221 INFO 958775 --- [ main]
> org.apache.camel.main.MainSupport : Using Java 17.0.16 (OpenJDK 64-Bit
> Server VM) with PID 958775
> 2025-11-10 08:43:56.221 INFO 958775 --- [ main]
> org.apache.camel.main.MainSupport : Started by mikoskinen in /tmp
> 2025-11-10 08:43:56.267 INFO 958775 --- [ main]
> org.apache.camel.main.BaseMainSupport : Properties location:
> file:anotherintegration_kcqcoey2/application.properties
> 2025-11-10 08:43:56.293 INFO 958775 --- [ main]
> org.apache.camel.main.ProfileConfigurer : The application is starting with
> profile: dev
> 2025-11-10 08:43:56.471 INFO 958775 --- [ main]
> he.camel.cli.connector.LocalCliConnector : Camel JBang CLI enabled
> 2025-11-10 08:43:56.509 INFO 958775 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Apache Camel 4.10.7 (integration)
> is starting
> 2025-11-10 08:43:56.570 INFO 958775 --- [ main]
> org.apache.camel.main.BaseMainSupport : Property-placeholders summary
> 2025-11-10 08:43:56.570 INFO 958775 --- [ main]
> org.apache.camel.main.BaseMainSupport : [application.properties]
> AdditionalMessage = New integration using initThis message comes from the
> application.properties
> 2025-11-10 08:43:56.636 INFO 958775 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Routes startup (total:1)
> 2025-11-10 08:43:56.636 INFO 958775 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Started route1 (timer://yaml)
> 2025-11-10 08:43:56.637 INFO 958775 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Apache Camel 4.10.7 (integration)
> started in 127ms (build:0ms init:0ms start:127ms boot:382ms)
> 2025-11-10 08:43:57.585 INFO 958775 --- [ - timer://yaml]
> integration.camel.yaml:8 : Hello Weik.io: New integration
> using initThis message comes from the application.properties{code}
> With 4.14.2:
> {code:java}
> ➜ /tmp jbang run -Dcamel.jbang.version=4.14.2 camel@apache/camel run
> --source-dir=anotherintegration_kcqcoey2
> 2025-11-10 08:45:33.122 INFO 959350 --- [ main]
> org.apache.camel.main.MainSupport : Apache Camel (JBang) 4.14.2 is
> starting
> 2025-11-10 08:45:33.153 INFO 959350 --- [ main]
> org.apache.camel.main.MainSupport : Additional files added to
> classpath: anotherintegration_kcqcoey2/application.properties~
> 2025-11-10 08:45:33.216 INFO 959350 --- [ main]
> org.apache.camel.main.MainSupport : Running Linux
> 6.17.6-300.fc43.x86_64 (amd64)
> 2025-11-10 08:45:33.216 INFO 959350 --- [ main]
> org.apache.camel.main.MainSupport : Using Java 17.0.16 (OpenJDK 64-Bit
> Server VM) with PID 959350
> 2025-11-10 08:45:33.216 INFO 959350 --- [ main]
> org.apache.camel.main.MainSupport : Started by mikoskinen in /tmp
> 2025-11-10 08:45:33.263 INFO 959350 --- [ main]
> org.apache.camel.main.BaseMainSupport : Properties location:
> file:anotherintegration_kcqcoey2/application.properties
> 2025-11-10 08:45:33.323 INFO 959350 --- [ main]
> org.apache.camel.main.ProfileConfigurer : The application is starting with
> profile: dev
> 2025-11-10 08:45:33.471 INFO 959350 --- [ main]
> he.camel.cli.connector.LocalCliConnector : Camel JBang CLI enabled
> 2025-11-10 08:45:33.510 INFO 959350 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Apache Camel 4.14.2 (integration)
> is starting
> 2025-11-10 08:45:33.609 INFO 959350 --- [ main]
> vertx.core.spi.resolver.ResolverProvider : Using the default address resolver
> as the dns resolver could not be loaded
> 2025-11-10 08:45:33.697 INFO 959350 --- [ntloop-thread-0]
> tform.http.vertx.VertxPlatformHttpServer : Vert.x HttpServer started on
> 0.0.0.0:8080
> 2025-11-10 08:45:33.716 INFO 959350 --- [ main]
> org.apache.camel.main.BaseMainSupport : Property-placeholders summary
> 2025-11-10 08:45:33.716 INFO 959350 --- [ main]
> org.apache.camel.main.BaseMainSupport : [application.properties]
> AdditionalMessage = New integration using initThis message comes from the
> application.properties
> 2025-11-10 08:45:33.784 INFO 959350 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Routes startup (total:1)
> 2025-11-10 08:45:33.784 INFO 959350 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Started route1 (timer://yaml)
> 2025-11-10 08:45:33.784 INFO 959350 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Apache Camel 4.14.2 (integration)
> started in 273ms (build:0ms init:0ms start:273ms boot:386ms){code}
> With 4.16.0:
> {code:java}
>
> ➜ /tmp jbang run -Dcamel.jbang.version=4.16.0 camel@apache/camel run
> --source-dir=anotherintegration_kcqcoey2
> 2025-11-10 08:46:51.765 INFO 959748 --- [ main]
> org.apache.camel.main.MainSupport : Apache Camel (JBang) 4.16.0 is
> starting
> 2025-11-10 08:46:51.797 INFO 959748 --- [ main]
> org.apache.camel.main.MainSupport : Additional files added to
> classpath: anotherintegration_kcqcoey2/application.properties~
> 2025-11-10 08:46:51.865 INFO 959748 --- [ main]
> org.apache.camel.main.MainSupport : Running Linux
> 6.17.6-300.fc43.x86_64 (amd64)
> 2025-11-10 08:46:51.865 INFO 959748 --- [ main]
> org.apache.camel.main.MainSupport : Using Java 17.0.16 (OpenJDK 64-Bit
> Server VM) with PID 959748
> 2025-11-10 08:46:51.865 INFO 959748 --- [ main]
> org.apache.camel.main.MainSupport : Started by mikoskinen in /tmp
> 2025-11-10 08:46:51.911 INFO 959748 --- [ main]
> org.apache.camel.main.BaseMainSupport : Properties location:
> file:anotherintegration_kcqcoey2/application.properties
> 2025-11-10 08:46:51.968 INFO 959748 --- [ main]
> org.apache.camel.main.ProfileConfigurer : The application is starting with
> profile: dev
> 2025-11-10 08:46:52.119 INFO 959748 --- [ main]
> he.camel.cli.connector.LocalCliConnector : Camel JBang CLI enabled
> 2025-11-10 08:46:52.158 INFO 959748 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Apache Camel 4.16.0 (integration)
> is starting
> 2025-11-10 08:46:52.255 INFO 959748 --- [ main]
> vertx.core.spi.resolver.ResolverProvider : Using the default address resolver
> as the dns resolver could not be loaded
> 2025-11-10 08:46:52.320 INFO 959748 --- [ntloop-thread-0]
> tform.http.vertx.VertxPlatformHttpServer : Vert.x HttpServer started on
> 0.0.0.0:8080
> 2025-11-10 08:46:52.339 INFO 959748 --- [ main]
> org.apache.camel.main.BaseMainSupport : Property-placeholders summary
> 2025-11-10 08:46:52.340 INFO 959748 --- [ main]
> org.apache.camel.main.BaseMainSupport : [application.properties]
> AdditionalMessage = New integration using initThis message comes from the
> application.properties
> 2025-11-10 08:46:52.407 INFO 959748 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Routes startup (total:1)
> 2025-11-10 08:46:52.408 INFO 959748 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Started route1 (timer://yaml)
> {code}
> Neither 4.14.2 or 4.16.0 start http server if I don't provide source-dir:
> {code:java}
> ➜ /tmp jbang run -Dcamel.jbang.version=4.16.0 camel@apache/camel run
> anotherintegration_kcqcoey2/*
> 2025-11-10 08:48:25.162 INFO 960209 --- [ main]
> org.apache.camel.main.MainSupport : Apache Camel (JBang) 4.16.0 is
> starting
> 2025-11-10 08:48:25.194 INFO 960209 --- [ main]
> org.apache.camel.main.MainSupport : Additional files added to
> classpath: anotherintegration_kcqcoey2/application.properties~
> 2025-11-10 08:48:25.261 INFO 960209 --- [ main]
> org.apache.camel.main.MainSupport : Running Linux
> 6.17.6-300.fc43.x86_64 (amd64)
> 2025-11-10 08:48:25.262 INFO 960209 --- [ main]
> org.apache.camel.main.MainSupport : Using Java 17.0.16 (OpenJDK 64-Bit
> Server VM) with PID 960209
> 2025-11-10 08:48:25.262 INFO 960209 --- [ main]
> org.apache.camel.main.MainSupport : Started by mikoskinen in /tmp
> 2025-11-10 08:48:25.307 INFO 960209 --- [ main]
> org.apache.camel.main.BaseMainSupport : Properties location:
> file:anotherintegration_kcqcoey2/application.properties
> 2025-11-10 08:48:25.369 INFO 960209 --- [ main]
> org.apache.camel.main.ProfileConfigurer : The application is starting with
> profile: dev
> 2025-11-10 08:48:25.516 INFO 960209 --- [ main]
> he.camel.cli.connector.LocalCliConnector : Camel JBang CLI enabled
> 2025-11-10 08:48:25.553 INFO 960209 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Apache Camel 4.16.0 (integration)
> is starting
> 2025-11-10 08:48:25.614 INFO 960209 --- [ main]
> org.apache.camel.main.BaseMainSupport : Property-placeholders summary
> 2025-11-10 08:48:25.614 INFO 960209 --- [ main]
> org.apache.camel.main.BaseMainSupport : [application.properties]
> AdditionalMessage = New integration using initThis message comes from the
> application.properties
> 2025-11-10 08:48:25.682 INFO 960209 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Routes startup (total:1)
> 2025-11-10 08:48:25.682 INFO 960209 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Started route1 (timer://yaml)
> 2025-11-10 08:48:25.682 INFO 960209 --- [ main]
> e.camel.impl.engine.AbstractCamelContext : Apache Camel 4.16.0 (integration)
> started in 128ms (build:0ms init:0ms start:128ms boot:390ms){code}
> This is the integration:
> {code:java}
> - from:
> uri: "timer:yaml"
> parameters:
> period: "3500"
> steps:
> - setBody:
> simple: "Hello {{AdditionalMessage}}"
> - log: "${body}"% {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)