On Tue, Aug 13, 2019 at 11:07 PM anu thomas <anu...@gmail.com> wrote:
>
> I'm writing an android application, which has following Jackson dependencies:
>
> implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
>
> implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.9'
>
>
> While building the application using "gradle clean build", the linter 
> reported following errors:
>
> jackson-module-jaxb-annotations-2.9.9.jar: Error: Invalid package reference 
> in library; not included in Android: javax.activation. Referenced from 
> com.fasterxml.jackson.module.jaxb.deser.DataHandlerJsonDeserializer. 
> [InvalidPackage]
>
> jackson-module-jaxb-annotations-2.9.9.jar: Error: Invalid package reference 
> in library; not included in Android: javax.xml.bind.annotation.adapters. 
> Referenced from com.fasterxml.jackson.module.jaxb.AdapterConverter. 
> [InvalidPackage]
>
> jackson-module-jaxb-annotations-2.9.9.jar: Error: Invalid package reference 
> in library; not included in Android: javax.xml.bind.annotation. Referenced 
> from com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector. 
> [InvalidPackage]
>
> It looks like the Jackson module "com.fasterxml.jackson.module.jaxb" is using 
> following packages not available in Android platform:
>
> javax.activation
> javax.xml.bind.annotation.adapters
> javax.xml.bind.annotation
>
> As per linter documentation - This is only an error if your code calls one of 
> the library classes which wind up referencing the unsupported package.
>
> My understanding is "com.fasterxml.jackson.module.jaxb" module provides 
> support for using JAXB (javax.xml.bind) annotations as an alternative to 
> native Jackson annotations.
>
> If my application is not using any JAXB (javax.xml.bind) annotations and uses 
> only the native Jackson annotations then is it safe to ignore these linter 
> errors (so that I can suppress it)?

First of all, apologies for slow response.

Yes, I think you are correct that they are safe to ignore. You may
want to try to see if you can exclude dependency to JAXB module
package, but ignoring warnings should be fine.
Jackson core components do not rely on these types.

-+ Tatu +-

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/CAL4a10hJb1eH6GqA_UpeqZZKoDiKmLq8aHCMZPmRtuiKrkp7Rg%40mail.gmail.com.

Reply via email to