Jersey Jackson and Codehouse vs Quickxml

I am using Jersey 1.17.1 with Jackson 2.2.1. Jackson seems to have switched packages from org.codehaus to com.fasterxml. I set up my code correctly and used the latest jackson. However, it seems that Jersey is still pulling in org.codehaus.jackson. Is there a way to soften this or should I stick with codehaus packages until the jersey is updated to use quickxml packages?

Thank.

+25
jackson jersey
Jun 01 '13 at 19:34
source share
1 answer

Jackson's older libraries are pulled as jersey-json artifact dependencies. When

<dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-json</artifactId> <version>1.17</version> </dependency> 

included in your POM, you will automatically get the org.codehaus.jackson library versions included in your project. Unfortunately, jersey-json has connection time dependencies on Jackson classes, so you cannot just use exceptions. What you want to do is to completely eliminate it. This is really a kind of wrapper library around a bunch of JSON libraries that you don't need. After removal, you can add the dependencies for the Jackson 2.2.1 libraries and the JAX-RS provider:

 <dependency> <groupId>com.fasterxml.jackson.jaxrs</groupId> <artifactId>jackson-jaxrs-json-provider</artifactId> <version>2.2.1</version> </dependency> 

Please note that when uninstalling jersey-json you no longer have a Stax2, Jettison or JAXB provider. If you need it, you will have to manually find and add dependencies for them.

+22
Jun 09 '13 at 5:51 on
source share



All Articles