[ 
https://issues.apache.org/jira/browse/CAMEL-18642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17623817#comment-17623817
 ] 

Marat Gubaidullin commented on CAMEL-18642:
-------------------------------------------

Perhaps we could implement @BindToRegistry annotation in camel-quarkus?

> camel-jbang change class packag when export
> -------------------------------------------
>
>                 Key: CAMEL-18642
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18642
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>    Affects Versions: 3.18.2
>            Reporter: Marat Gubaidullin
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.18.4, 3.20.0
>
>
> camel-jbang export change class package to group from gav.
> after that class reference in yaml is not correct anymore, ex:
> The following 2 files *run* using camel-jbang without any issues
> {code:java}
> import org.apache.camel.BindToRegistry;
> import org.apache.camel.Exchange;
> import org.apache.camel.Processor;
> @BindToRegistry("CustomProcessor")
> public class CustomProcessor implements Processor {
>   public void process(Exchange exchange) throws Exception {
>       exchange.getIn().setBody("Hello world");
>   }
> }
> {code}
> and
> {code:java}
> - route:
>     from:
>       uri: kamelet:timer-source
>       steps:
>         - process:
>             ref: '#CustomProcessor'
>         - log:
>             message: ${body}
>       parameters:
>         period: 2000
>         message: xxx
> {code}
> while during export camel-jbang adds package to the class 
> {code:java}
> package org.test.demo;
> import org.apache.camel.BindToRegistry;
> import org.apache.camel.Exchange;
> import org.apache.camel.Processor;
> @BindToRegistry("CustomProcessor")
> public class CustomProcessor implements Processor {
>   public void process(Exchange exchange) throws Exception {
>       exchange.getIn().setBody("Hello world");
>   }
> }
> {code}
> After that yaml ref is not correct anymore
> We need to find a way to make export without changing source files



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to