]> source.dussan.org Git - archiva.git/commitdiff
add comment in code snippet and add a snippet in pom for rest dependencies
authorOlivier Lamy <olamy@apache.org>
Thu, 1 Mar 2012 17:34:21 +0000 (17:34 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 1 Mar 2012 17:34:21 +0000 (17:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1295689 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java
pom.xml

index 8c78f5ddeb3425fd3bbd92f0dbe5690aa18c7903..b36e9ee68af17b254b93709d075bca758342a84f 100644 (file)
@@ -207,12 +207,14 @@ public abstract class AbstractArchivaRestTest
             JAXRSClientFactory.create( getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/",
                                        SearchService.class,
                                        Collections.singletonList( new JacksonJaxbJsonProvider() ) );
-
+        // to add authentification
         if ( authzHeader != null )
         {
             WebClient.client( service ).header( "Authorization", authzHeader );
         }
+        // to configure read timeout
         WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 100000000 );
+        // if you want to use json as exchange format xml is supported too
         WebClient.client( service ).accept( MediaType.APPLICATION_JSON_TYPE );
         WebClient.client( service ).type( MediaType.APPLICATION_JSON_TYPE );
         return service;
diff --git a/pom.xml b/pom.xml
index 6b02ef84800c51dc8121415b8201c354a9eab261..1a33834c5a902974e1cd59512cb323561f07a080 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <artifactId>jsr311-api</artifactId>
         <version>1.1.1</version>
       </dependency>
+      <!-- START SNIPPET: rest-dependencies -->
       <dependency>
         <groupId>org.codehaus.jackson</groupId>
         <artifactId>jackson-jaxrs</artifactId>
           </exclusion>
         </exclusions>
       </dependency>
-
+      <!-- END SNIPPET: rest-dependencies -->
       <dependency>
         <groupId>com.google.guava</groupId>
         <artifactId>guava</artifactId>