You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/10/25 07:32:00 UTC
[jira] [Resolved] (CAMEL-18642) camel-jbang change class packag when export
[ https://issues.apache.org/jira/browse/CAMEL-18642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-18642.
---------------------------------
Resolution: Information Provided
I dont want at this point to "change" the source code with replacing annotations etc.
> 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)