[
https://issues.apache.org/jira/browse/CAMEL-20994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17871923#comment-17871923
]
Claus Ibsen commented on CAMEL-20994:
-------------------------------------
I can run this example without any problems:
{code}
~/Downloads/camel-cloud-examples/spring-boot/timer-log main ❯ mvn compile
spring-boot:run
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< examples:timer-log >-------------------------
[INFO] Building timer-log 1.0.0
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ timer-log ---
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO]
[INFO] --- compiler:3.13.0:compile (default-compile) @ timer-log ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 1 source file with javac [debug parameters release 17] to
target/classes
[INFO]
[INFO] >>> spring-boot:3.3.1:run (default-cli) > test-compile @ timer-log >>>
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ timer-log ---
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO]
[INFO] --- compiler:3.13.0:compile (default-compile) @ timer-log ---
[INFO] Nothing to compile - all classes are up to date.
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ timer-log ---
[INFO] skip non existing resourceDirectory
/Users/davsclaus/Downloads/camel-cloud-examples/spring-boot/timer-log/src/test/resources
[INFO]
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ timer-log ---
[INFO] No sources to compile
[INFO]
[INFO] <<< spring-boot:3.3.1:run (default-cli) < test-compile @ timer-log <<<
[INFO]
[INFO]
[INFO] --- spring-boot:3.3.1:run (default-cli) @ timer-log ---
[INFO] Attaching agents: []
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.3.1)
2024-08-08T11:42:52.202+02:00 INFO 48774 --- [ main]
examples.timerlog.CamelApplication : Starting CamelApplication using Java
17.0.11 with PID 48774
(/Users/davsclaus/Downloads/camel-cloud-examples/spring-boot/timer-log/target/classes
started by davsclaus in
/Users/davsclaus/Downloads/camel-cloud-examples/spring-boot/timer-log)
2024-08-08T11:42:52.204+02:00 INFO 48774 --- [ main]
examples.timerlog.CamelApplication : No active profile set, falling back
to 1 default profile: "default"
2024-08-08T11:42:52.774+02:00 INFO 48774 --- [ main]
o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080
(http)
2024-08-08T11:42:52.779+02:00 INFO 48774 --- [ main]
o.apache.catalina.core.StandardService : Starting service [Tomcat]
2024-08-08T11:42:52.780+02:00 INFO 48774 --- [ main]
o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache
Tomcat/10.1.25]
2024-08-08T11:42:52.843+02:00 INFO 48774 --- [ main]
o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded
WebApplicationContext
2024-08-08T11:42:52.844+02:00 INFO 48774 --- [ main]
w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext:
initialization completed in 619 ms
2024-08-08T11:42:53.235+02:00 INFO 48774 --- [ main]
o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint beneath base
path '/actuator'
2024-08-08T11:42:53.300+02:00 INFO 48774 --- [ main]
o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8080 (http)
with context path '/'
2024-08-08T11:42:53.411+02:00 INFO 48774 --- [ main]
o.a.c.impl.engine.AbstractCamelContext : Apache Camel 4.8.0-SNAPSHOT
(camel-1) is starting
2024-08-08T11:42:53.415+02:00 INFO 48774 --- [ main]
o.a.c.impl.engine.AbstractCamelContext : Routes startup (total:1)
2024-08-08T11:42:53.415+02:00 INFO 48774 --- [ main]
o.a.c.impl.engine.AbstractCamelContext : Started route1 (timer://yaml)
2024-08-08T11:42:53.415+02:00 INFO 48774 --- [ main]
o.a.c.impl.engine.AbstractCamelContext : Apache Camel 4.8.0-SNAPSHOT
(camel-1) started in 3ms (build:0ms init:0ms start:3ms)
2024-08-08T11:42:53.415+02:00 INFO 48774 --- [ main]
examples.timerlog.CamelApplication : Started CamelApplication in 1.363
seconds (process running for 1.509)
2024-08-08T11:42:54.438+02:00 INFO 48774 --- [ - timer://yaml] route1
: Hello Camel from route1
2024-08-08T11:42:55.426+02:00 INFO 48774 --- [ - timer://yaml] route1
: Hello Camel from route1
2024-08-08T11:42:56.429+02:00 INFO 48774 --- [ - timer://yaml] route1
: Hello Camel from route1
{code}
> export fails to add camel-direct component when there is a rest consumer
> ------------------------------------------------------------------------
>
> Key: CAMEL-20994
> URL: https://issues.apache.org/jira/browse/CAMEL-20994
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang
> Reporter: Claudio Miranda
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.8.0
>
>
> Given the following integration route.
> {code}
> camel export --gav=com.mycompany:app:1.0 --dir=test --runtime=quarkus
> Timer2log.java
> {code}
> There is no camel-quarkus-direct component in the generated pom.xml
> {code}
> import org.apache.camel.builder.RouteBuilder;
> public class Timer2log extends RouteBuilder {
> @Override
> public void configure() throws Exception {
> rest()
> .post("/message")
> .id("rest")
> .to("direct:foo");
> from("direct:foo")
> .log("hello");
> }
> }
> {code}
> I noticed it's related to the rest component. Replace it with timer then the
> export command adds the camel-quarkus-direct dependency to the pom.xml
--
This message was sent by Atlassian Jira
(v8.20.10#820010)