Reputation: 492
Hy,
I'm currently updating my custom camel components to camel version 3.7.0
Because it now seems to be necessary to make TypeConverters discoverable by the camelContext, I also added the camel-package-maven-plugin
to generate the TypeConverterBulkLoader.
Now I have the problem, that the plugin crashes when I run it in a module, that also has a custom camel component:
Error generating data org.apache.maven.plugin.MojoFailureException: Unable to create mojo: Could not find component java type -> [Help 1]
It seems like this is an error when implementing a custom language and not specifying the javaType for that, but I only have a custom component (including endpoints/producers/consumers) and custom TypeConverters.
Can somebody tell me how to correctly use the plugin or alternatively how to implement custom TypeConverters so they are picked up by the camelContext without using the plugin?
Greets Chris
Edit:
The same error happens when I use the camel-component-maven-plugin
instead of the package plugin
Upvotes: 1
Views: 548
Reputation: 492
So I figured out what to do.
I now use the camel-component-maven-plugin
as documented here: https://camel.apache.org/manual/latest/camel-component-maven-plugin.html
In addition I had to make sure to add all the annotations, that seem to be required now (if they were already mandatory in camel 2.x, then I was not aware of that).
I especially needed to add @UriParams
to the endpoint configuration class itself (not only the variable in the endpoint).
Additionally I had to add @Component("name")
to the component class.
All this is documented on this page and other links on that page:
https://camel.apache.org/manual/latest/writing-components.html
Upvotes: 2