Which Jackson maven dependencies to include in spring 3.1 project for JAXB JSON marshalling?

java, jaxb, json, marshalling, spring

Solution

The main difference i can see is the license.

The first option uses `jackson-mapper-asl` which uses the apache license, while the second one uses the lgpl license. so it is really a matter of legal.

see here.

Problem

In the code sample available here, one imports the following for JSON JAXB marshalling: ``` <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.5.3</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-oxm</artifactId> <version>3.1.0.RELEASE</version> </dependency> ``` Yet, this blog post, referring to this blog post, suggests: ``` <!-- Jackson --> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-core-lgpl</artifactId> <version>1.3.0</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-lgpl</artifactId> <version>1.3.0</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-xc</artifactId> <version>1.3.0</version> </dependency> ``` where 'jackson-xc provides the additional Jaxb support'. What is the difference between both set of maven dependencies when it comes to JAXB JSON marhsalling in Spring? Which one should be used preferably?

Original source