diff options
author | Olivier Lamy <olamy@apache.org> | 2012-03-01 16:34:03 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-03-01 16:34:03 +0000 |
commit | 9fbd8d9b405d680b52cd03727825f6c6963fd400 (patch) | |
tree | 7ff5d82088d49764ff753416a0e4f12890a10495 | |
parent | 4fdcbae3c111f62f46e6d9b65e2efc0fa1428afc (diff) | |
download | archiva-9fbd8d9b405d680b52cd03727825f6c6963fd400.tar.gz archiva-9fbd8d9b405d680b52cd03727825f6c6963fd400.zip |
fix unit tests
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1295659 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp/pom.xml | 16 | ||||
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/AbstractDownloadTest.java | 26 |
2 files changed, 34 insertions, 8 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml index d35415525..7c5a04a6d 100644 --- a/archiva-modules/archiva-web/archiva-webapp/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml @@ -352,6 +352,18 @@ </exclusions> </dependency> <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-jaxrs</artifactId> + </dependency> + <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-xc</artifactId> + </dependency> + <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-core-asl</artifactId> + </dependency> + <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-bundle-jaxrs</artifactId> <exclusions> @@ -395,6 +407,10 @@ <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-servlet_2.5_spec</artifactId> </exclusion> + <exclusion> + <groupId>org.codehaus.jettison</groupId> + <artifactId>jettison</artifactId> + </exclusion> </exclusions> </dependency> <dependency> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/AbstractDownloadTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/AbstractDownloadTest.java index 8e1d0db37..408a79028 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/AbstractDownloadTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/AbstractDownloadTest.java @@ -31,6 +31,7 @@ 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.codehaus.redback.integration.security.role.RedbackRoleConstants; import org.codehaus.redback.rest.api.model.User; import org.codehaus.redback.rest.api.services.RoleManagementService; @@ -47,6 +48,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.context.ContextLoaderListener; +import java.util.Collections; + /** * @author Olivier Lamy */ @@ -153,7 +156,8 @@ public abstract class AbstractDownloadTest { ProxyConnectorService service = JAXRSClientFactory.create( getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", - ProxyConnectorService.class ); + ProxyConnectorService.class, + Collections.singletonList( new JacksonJaxbJsonProvider() ) ); WebClient.client( service ).header( "Authorization", authorizationHeader ); WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L ); @@ -164,7 +168,8 @@ public abstract class AbstractDownloadTest { RemoteRepositoriesService service = JAXRSClientFactory.create( getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", - RemoteRepositoriesService.class ); + RemoteRepositoriesService.class, + Collections.singletonList( new JacksonJaxbJsonProvider() ) ); WebClient.client( service ).header( "Authorization", authorizationHeader ); WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L ); @@ -175,7 +180,8 @@ public abstract class AbstractDownloadTest { ManagedRepositoriesService service = JAXRSClientFactory.create( getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", - ManagedRepositoriesService.class ); + ManagedRepositoriesService.class, + Collections.singletonList( new JacksonJaxbJsonProvider() ) ); WebClient.client( service ).header( "Authorization", authorizationHeader ); WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L ); @@ -187,7 +193,8 @@ public abstract class AbstractDownloadTest { RepositoryGroupService service = JAXRSClientFactory.create( getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", - RepositoryGroupService.class ); + RepositoryGroupService.class, + Collections.singletonList( new JacksonJaxbJsonProvider() ) ); WebClient.client( service ).header( "Authorization", authorizationHeader ); WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L ); @@ -198,7 +205,8 @@ public abstract class AbstractDownloadTest { RepositoriesService service = JAXRSClientFactory.create( getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", - RepositoriesService.class ); + RepositoriesService.class, + Collections.singletonList( new JacksonJaxbJsonProvider() ) ); WebClient.client( service ).header( "Authorization", authorizationHeader ); WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L ); @@ -209,7 +217,8 @@ public abstract class AbstractDownloadTest { SearchService service = JAXRSClientFactory.create( getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", - SearchService.class ); + SearchService.class, + Collections.singletonList( new JacksonJaxbJsonProvider() ) ); WebClient.client( service ).header( "Authorization", authorizationHeader ); WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L ); @@ -227,7 +236,8 @@ public abstract class AbstractDownloadTest { RoleManagementService service = JAXRSClientFactory.create( "http://localhost:" + port + "/" + getRestServicesPath() + "/redbackServices/", - RoleManagementService.class ); + RoleManagementService.class, + Collections.singletonList( new JacksonJaxbJsonProvider() ) ); // for debuging purpose WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 3000000L ); @@ -243,7 +253,7 @@ public abstract class AbstractDownloadTest { UserService service = JAXRSClientFactory.create( "http://localhost:" + port + "/" + getRestServicesPath() + "/redbackServices/", - UserService.class ); + UserService.class, Collections.singletonList( new JacksonJaxbJsonProvider() ) ); // for debuging purpose WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 3000000L ); |