Skip to content

Conversation

@mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Oct 3, 2022

🤔 What's changed?

Like everyone else Cucumber needs to write Json and does so using Jackson. To avoid conflicts with other versions of Jackson, Cucumber shades its own version. Unfortunately this shading isn't done perfectly and the files in META-INF/services are not updated to match.

By excluding the services declared by Jackson we can avoid this problem altogether, though it may come back in the future if/when Jackson decides to use its own services outside of ObjectMapper.findAndRegisterModules. Hopefully, the shade plugin has been fixed by then.

Fixes: #2620

🏷️ What kind of change is this?

  • 🐛 Bug fix (non-breaking change which fixes a defect)

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

Like everyone else Cucumber needs to write Json and does so using Jackson.
To avoid conflicts with other versions of Jackson, Cucumber shades its own
version. Unfortunately this shading isn't done perfectly and the files in
`META-INF/services` are not updated to match.

By excluding the services declared by Jackson we can avoid this problem
altogether, though it may come back in the future if/when Jackson decides
to use its own services.

Fixes: #2620
@mpkorstanje mpkorstanje force-pushed the remove-jackson-shaded-services branch from 7b44caa to 9fca9bb Compare October 3, 2022 16:20
@mpkorstanje mpkorstanje marked this pull request as ready for review October 3, 2022 16:35
@mpkorstanje mpkorstanje merged commit 5759eb8 into main Oct 3, 2022
@mpkorstanje mpkorstanje deleted the remove-jackson-shaded-services branch October 3, 2022 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maven shading of Jackson should exclude Module ServiceLoader files

2 participants