CAMEL-22857 Jackson 3 components : camel-jackson3, camel-jackson3-avro, camel-jackson3-protobuf, camel-jackson3xml#21644
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
I see the PR doc validation error and will submit changes fixing them Monday. |
|
I dont like we have duplicate DSLs. As an end user you would only use either Jackson 2 or 3 not both at the same time. So what we should look at is to make Camel attempt to load jackson3 if available and if not jackson2 and then keep the DSL as is. The DSL in Camel is big and verbose, we should avoid expanding this - especially because of a implementation detail of the jackson library upgraded under the hood. There is the DataFormatResolver that attempt to discover the library - that code can be improved to be able to detect jackson 3 and 2. See |
|
And ditto for the |
I think this is doable (and the DSL) but I think I'm going to need some help to prevent collisions in the generated docs between camel-jackson / camel-jackson3 - are there any other situations where two components have shared a DSL name or Transformer name? |
|
I dont think we need need docs, lets try to make it a different JAR and nothing else. We know that jackson2 is eventually going to be dropped later when all the ducks are aligned. |
f965e90 to
2d6e892
Compare
|
I'm having some trouble figuring out the CI error here - is the error on "cat: target/it/HeaderSupport/build.log: No such file or directory"? I don't think I've changed anything in that area? |
|
I think its some old stuff for the camel-archetype-api-component when its used for creating a new api based component, then there is something that creates a sample project and some groovy stuff verify |
|
see |
|
I wonder if there is a reason why there is a new Ideally we can use the existing jackson data format model, and then the data format resolver will load jackson 3.x if its on the classpath (as you already have done). We have not added new exclusive options in the dataformat that are new in jackson 3.x only and not available in 2.x ? In other words if the DSL is unchanged or as little changed the better. |
|
Great work Tom we are almost there |
|
@davsclaus Can you point me to the |
|
I think I found it, |
|
yeah it smells like a left over. You can also run the full regen script from the etc folder |
|
Run [[ -z $(git status --porcelain) ]] || { echo 'There are uncommitted changes'; git status; echo; echo; git diff; exit 1; } |
|
Weird - I've built locally twice and have nothing uncommited. Rebased and trying again. |
|
yeah it may also even be on main branch itself |
|
you can rebase main as there were some unmodified files that needed regen I dont dare do the regen on your behalf as this is a big PR and maybe something goes wrong |
.../camel-core-model/src/main/java/org/apache/camel/model/dataformat/JacksonXML3DataFormat.java
Outdated
Show resolved
Hide resolved
- camel-jackson3: JSON support with Jackson 3 - camel-jackson3-avro: Avro support with Jackson 3 - camel-jackson3-protobuf: Protobuf support with Jackson 3 - camel-jackson3xml: XML support with Jackson 3
…s passed skip the exec step in camel-package-maven-plugin (there will be no log to process) to prevent CI test failures
|
LGTM |
Description
https://issues.apache.org/jira/browse/CAMEL-22857
There are four jackson components in camel : camel-jackson, camel-jackson-avro, camel-jackson-protobuf, camel-jacksonxml. Introduce Jackson 3 versions of these components that use the Jackson 3 API.
camel-jackson3: JSON support with Jackson 3
camel-jackson3-avro: Avro support with Jackson 3
camel-jackson3-protobuf: Protobuf support with Jackson 3
camel-jackson3xml: XML support with Jackson 3
edit March 2 2026 : DSL and transformer names are now shared with the camel-jackson 2 components and we select the component to use based on which package name the ObjectMapper has on the classpath in DefaultTransformerResolver.java and DefaultDataFormatResolver.java. The catalog presents a challenge - we're skipping the jackson3 components in listing the transformers .
Target
mainbranch)Tracking
Apache Camel coding standards and style
I checked that each commit in the pull request has a meaningful subject line and body.
I have run
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.