Marat Gubaidullin created CAMEL-18642:
-----------------------------------------
Summary: 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
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)