summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2013-10-31 23:01:23 +0000
committerOlivier Lamy <olamy@apache.org>2013-10-31 23:01:23 +0000
commit250d903b72ef3e43deb98cfedbe03cdbd36d6de1 (patch)
treecaf73256440b06c2c30455190d071f3ed11d8690
parent31f70ba6fce7357265ec0fcca45d828a1a551612 (diff)
downloadarchiva-250d903b72ef3e43deb98cfedbe03cdbd36d6de1.tar.gz
archiva-250d903b72ef3e43deb98cfedbe03cdbd36d6de1.zip
use last jackson version
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1537753 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--pom.xml12
-rw-r--r--redback-integrations/redback-rest/redback-rest-services/pom.xml10
-rw-r--r--redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/interceptors/JacksonJsonConfigurator.java7
-rw-r--r--redback-integrations/redback-rest/redback-rest-services/src/main/resources/META-INF/spring-context.xml4
-rw-r--r--redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/AbstractRestServicesTest.java4
-rw-r--r--redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/UserServiceTest.java4
-rw-r--r--redback-integrations/redback-rest/redback-rest-services/src/test/resources/META-INF/spring-context.xml2
7 files changed, 33 insertions, 10 deletions
diff --git a/pom.xml b/pom.xml
index 2e2e85658..e2e7406fe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -609,6 +609,7 @@
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
</dependency>
+ <!--
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
@@ -619,6 +620,17 @@
<artifactId>jackson-xc</artifactId>
<version>${jacksonVersion}</version>
</dependency>
+ -->
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-json-provider</artifactId>
+ <version>${jacksonVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-xml-provider</artifactId>
+ <version>${jacksonVersion}</version>
+ </dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle-jaxrs</artifactId>
diff --git a/redback-integrations/redback-rest/redback-rest-services/pom.xml b/redback-integrations/redback-rest/redback-rest-services/pom.xml
index 728e41942..dcdfec5e5 100644
--- a/redback-integrations/redback-rest/redback-rest-services/pom.xml
+++ b/redback-integrations/redback-rest/redback-rest-services/pom.xml
@@ -72,6 +72,7 @@
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-keys-memory</artifactId>
</dependency>
+ <!--
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
@@ -80,6 +81,15 @@
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-xc</artifactId>
</dependency>
+ -->
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-json-provider</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-xml-provider</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle-jaxrs</artifactId>
diff --git a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/interceptors/JacksonJsonConfigurator.java b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/interceptors/JacksonJsonConfigurator.java
index bac0f7a2c..aca273c19 100644
--- a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/interceptors/JacksonJsonConfigurator.java
+++ b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/interceptors/JacksonJsonConfigurator.java
@@ -18,8 +18,8 @@ package org.apache.archiva.redback.rest.services.interceptors;
* under the License.
*/
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
@@ -41,6 +41,7 @@ public class JacksonJsonConfigurator
public JacksonJsonConfigurator( ObjectMapper objectMapper )
{
log.info( "configure jackson ObjectMapper" );
- objectMapper.configure( DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false );
+ objectMapper.disable( DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES );
+
}
}
diff --git a/redback-integrations/redback-rest/redback-rest-services/src/main/resources/META-INF/spring-context.xml b/redback-integrations/redback-rest/redback-rest-services/src/main/resources/META-INF/spring-context.xml
index c3989141a..98188f449 100644
--- a/redback-integrations/redback-rest/redback-rest-services/src/main/resources/META-INF/spring-context.xml
+++ b/redback-integrations/redback-rest/redback-rest-services/src/main/resources/META-INF/spring-context.xml
@@ -39,11 +39,11 @@
<context:component-scan
base-package="org.apache.archiva.redback.rest.services"/>
- <bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider">
+ <bean id="jsonProvider" class="com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider">
<property name="mapper" ref="redbackJacksonMapper"/>
</bean>
- <bean id="redbackJacksonMapper" class="org.codehaus.jackson.map.ObjectMapper">
+ <bean id="redbackJacksonMapper" class="com.fasterxml.jackson.databind.ObjectMapper">
</bean>
<jaxrs:server id="redbackServices" address="/redbackServices">
diff --git a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/AbstractRestServicesTest.java b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/AbstractRestServicesTest.java
index 14b600943..cf72692af 100644
--- a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/AbstractRestServicesTest.java
+++ b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/AbstractRestServicesTest.java
@@ -19,6 +19,7 @@ package org.apache.archiva.redback.rest.services;
* under the License.
*/
+import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
import junit.framework.TestCase;
import org.apache.archiva.redback.integration.security.role.RedbackRoleConstants;
import org.apache.archiva.redback.rest.api.model.User;
@@ -34,7 +35,6 @@ import org.apache.cxf.common.util.Base64Utility;
import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
import org.apache.cxf.jaxrs.client.WebClient;
import org.apache.cxf.transport.servlet.CXFServlet;
-import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider;
import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
@@ -133,7 +133,7 @@ public abstract class AbstractRestServicesTest
{
return JAXRSClientFactory.create(
"http://localhost:" + port + "/" + getRestServicesPath() + "/fakeCreateAdminService/",
- FakeCreateAdminService.class, Collections.singletonList( new JacksonJaxbJsonProvider() ) );
+ FakeCreateAdminService.class, Collections.singletonList( new com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider() ) );
}
@After
diff --git a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/UserServiceTest.java b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/UserServiceTest.java
index 04e66390d..66d1bd17c 100644
--- a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/UserServiceTest.java
+++ b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/UserServiceTest.java
@@ -19,6 +19,7 @@ package org.apache.archiva.redback.rest.services;
* under the License.
*/
+import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
import org.apache.archiva.redback.rest.api.model.Operation;
import org.apache.archiva.redback.rest.api.model.Permission;
import org.apache.archiva.redback.rest.api.model.ResetPasswordRequest;
@@ -30,7 +31,6 @@ import org.apache.archiva.redback.rest.services.mock.ServicesAssert;
import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
import org.apache.cxf.jaxrs.client.ServerWebApplicationException;
import org.apache.cxf.jaxrs.client.WebClient;
-import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider;
import org.junit.Test;
import javax.ws.rs.core.MediaType;
@@ -69,7 +69,7 @@ public class UserServiceTest
assertFalse( users.isEmpty() );
}
- @Test (expected = ServerWebApplicationException.class)
+ @Test( expected = ServerWebApplicationException.class )
public void getUsersWithoutAuthz()
throws Exception
{
diff --git a/redback-integrations/redback-rest/redback-rest-services/src/test/resources/META-INF/spring-context.xml b/redback-integrations/redback-rest/redback-rest-services/src/test/resources/META-INF/spring-context.xml
index 6a303d2a6..3f22e2a55 100644
--- a/redback-integrations/redback-rest/redback-rest-services/src/test/resources/META-INF/spring-context.xml
+++ b/redback-integrations/redback-rest/redback-rest-services/src/test/resources/META-INF/spring-context.xml
@@ -46,7 +46,7 @@
<ref bean="servicesAssert"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
- <bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
+ <bean class="com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider"/>
</jaxrs:providers>
</jaxrs:server>