-
Notifications
You must be signed in to change notification settings - Fork 80
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
Change jackson-module-jaxb-annotations dependency to optional for JSON #123
Comments
Ok first things first: the reason dependency to This is rather tricky thing: on one hand, if not enabling JAXB annotation support, it is probably fine not to include JAXB annotations -- instance creation of And unfortunately I don't really know how to test this, or know specific users who use this functionality (esp. in OSGi containers). This may be something best brought up on dev mailing list at: |
Thinking about this a bit, I think that we should remove JAXB dependency from all providers with possible exception of XML provider (since |
Note to self: should implement by replacing |
…tionIntrospector` directly. Does not yet remove JAXB dependency (leaving JAXB-provider subtypes in place for now).
Did some initial groundwork for master/3.0: no more Did not yet remove |
I have
com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider
2.10.0 installed in an OSGi environment withoutcom.fasterxml.jackson.module.jackson-module-jaxb-annotations
installed since it is optional for OSGi environments. However, when I declarecom.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider
as a dependency in my Maven project, theorg.apache.felix:maven-bundle-plugin
generates theImport-Package
section of my MANIFEST.MF for my project's bundle as, in part:Which is a problem for me since my OSGi environment only provides
javax.xml.bind
2.1.0. This prevents my bundle from starting. I can work around this by excludingcom.fasterxml.jackson.module:jackson-module-jaxb-annotations
in my pom:Which then causes the
Import-Package
part of my MANIFEST.MF to be written as:which works with my OSGi environment.
An alternative to me excluding
com.fasterxml.jackson.module:jackson-module-jaxb-annotations
from my dependency decleration would be havingcom.fasterxml.jackson.module:jackson-module-jaxb-annotations
marked as an optional dependency in thecom.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider
project. When that is the case I get the same result in myImport-Package
as I get when I explicitly excludecom.fasterxml.jackson.module:jackson-module-jaxb-annotations
.I'm unsure if there is a reason
com.fasterxml.jackson.module.jaxb
is marked as optional in the osgi section of the pom, while thecom.fasterxml.jackson.module:jackson-module-jaxb-annotations
dependency is not also marked as optional.The text was updated successfully, but these errors were encountered: