Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow jackson-module-jaxb-annotations to tolerate 2.2,3 in Import-Package #235

Merged
merged 8 commits into from
May 20, 2024

Conversation

JDUNNIN
Copy link
Contributor

@JDUNNIN JDUNNIN commented Jan 12, 2024

Resolves #233

I removed the Jakarta import, from the comment Despite groupId, this is "old" JAXB, not Jakarta (3.x is real Jakarta one) it sounds like this should be OK. The end result in the MANIFEST.MF was the same as when I just added the jaxb-api dependency above it.

image

<version>${version.jaxb.impl}</version>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.12</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this instead change version.jaxb.impl property?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I don't think so as there is only a 2.3.3 or 2.3.2 available.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like version.jaxb.impl is used to get a JAXB impl for tests:

    <!-- may also need JAXB impl for tests -->
    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-runtime</artifactId>
      <version>${version.jaxb.impl}</version>
      <scope>test</scope>
    </dependency>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... but that does not seem to be needed, so I think I'll comment it out.

@cowtowncoder
Copy link
Member

Hmmh. I am really uncomfortable with this change -- I know JAXB/Jakarta upgrade has been a Royal Mess, and I am not sure this helps in general. It seems to me that there are TWO overlapping distinct packages (as in, different Maven coordinates) that nonetheless both provide same classes: one with 2.2.x version (one chosen here) and another 2.3.x (one being replaced). I don't think Maven can express such either-or case.
It seems like this could easily break existing usage with 2.3 dependency?

And in particular making change in a patch of 2.16, if breaking, would be very unfortunate. Especially as we are downgrading a dependency.

Is it not possible to add local overrides on package depending on JAXB annotations module?

@GedMarc WDYT?

@JDUNNIN
Copy link
Contributor Author

JDUNNIN commented May 17, 2024

FYI we had a similar change go through in swagger-core swagger-api/swagger-core#4595

@cowtowncoder
Copy link
Member

@JDUNNIN that is for OSGi dependnecy tho? Is the end results same?

One other quick note: since 2.17.1 is released, this PR needs to be rebased against 2.18; will not add in a patch.

@JDUNNIN
Copy link
Contributor Author

JDUNNIN commented May 20, 2024

@cowtowncoder yes I had originally raised PR for fix the same as this PR, but they changed it to use the OSGi method instead. The end result was the same, MANIFEST.MF updated.

@JDUNNIN JDUNNIN changed the base branch from 2.16 to 2.18 May 20, 2024 08:20
@cowtowncoder cowtowncoder merged commit ef24fba into FasterXML:2.18 May 20, 2024
4 checks passed
@cowtowncoder
Copy link
Member

UGGGGH. How did this end up merging 2.18 changes to 2.16 branch.... need to untangle this now.

@cowtowncoder
Copy link
Member

Ok had to hard reset 2.16 branch. What I do not understand is how Github managed to merge this into 2.16 branch, despite PR clearly stating 2.18 as target...

Need to re-create PR now.

cowtowncoder added a commit that referenced this pull request May 20, 2024
Re-apply #235 but now with 2.18 target (not sure what happened earlier)
joschi referenced this pull request in dropwizard/dropwizard Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants