There are 2 variants of Jackson JAX-RS providers:

http://repo1.maven.org/maven2/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.9.0/

and what you'd want is "no-metainf" one -- it does not include SPI for
indicating as provider.
I think you can specify that with Maven "classifier" for dependency
(default is 'none', that is, empty String).
Something like:

  <classifier>no-metainf</classifier>

This assumes you are including provider. Although if you are, I guess
you could as well just remove the dependency.

You may also try to just exclude the dependency explicitly when
include jersey packages.

Other than this I do not know how to make Jersey ignore dependencies.

-+ Tatu +-


On Thu, Aug 10, 2017 at 8:42 PM,  <mhcomput...@gmail.com> wrote:
> Hello,
>
> I am running into a seemingly impossible problem with these three classes:
>
> org.glassfish.jersey.jackson.internal.JacksonAutoDiscoverable
> com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider
> com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider
>
> How can I completely disable the Jersey and Jackson code which registers
> these classes, and register a custom implementation instead?
>
> Every method I have found is outdated and broken and doesn't seem to work.
>
> I can tell it doesn't work, because it doesn't respect the custom
> pretty-printer which indents with four spaces instead of two.
>
> This page seemed to be the closest, but the improper providers still appear
> in Jersey's debug trace provider list, and the indentation is still wrong.
>
> https://stackoverflow.com/questions/18872931/custom-objectmapper-with-jersey-2-2-and-jackson-2-1
>
> However, things printed into Strings using my Mapper, have the right
> indentation.
>
> So there is some horrible issue with the registration I can't figure out
> yet.
>
> Matthew.
>
> --
> You received this message because you are subscribed to the Google Groups
> "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jackson-user+unsubscr...@googlegroups.com.
> To post to this group, send email to jackson-user@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To post to this group, send email to jackson-user@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to