[ 
https://issues.apache.org/jira/browse/WAGON-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16586415#comment-16586415
 ] 

ASF GitHub Bot commented on WAGON-526:
--------------------------------------

michael-o commented on a change in pull request #37: [WAGON-526] making the 
retry handle of http client configurable
URL: https://github.com/apache/maven-wagon/pull/37#discussion_r211383797
 
 

 ##########
 File path: 
wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
 ##########
 @@ -354,6 +360,92 @@ private static PoolingHttpClientConnectionManager 
createConnManager()
         return connManager;
     }
 
+    /**
+     * The type of the retry handler, default to 
DefaultHttpRequestRetryHandler.
+     * Values can be default, standard (StandardHttpRequestRetryHandler), or a 
fully qualified name class.
+     *
+     * @since 3.2
+     */
+    private static final String RETRY_HANDLER_CLASS =
+            System.getProperty( "maven.wagon.http.retryhandler.class", 
"standard" );
+
+    /**
+     * true if it's OK to retry non-idempotent requests that have been sent.
+     * Note: only used for default and standard retry handlers.
+     *
+     * @since 3.2
+     */
+    private static final boolean RETRY_HANDLER_REQUEST_SENT_ENABLED =
+            Boolean.getBoolean( 
"maven.wagon.http.retryhandler.requestSentEnabled" );
+
+    /**
+     * Number of retries for the retry handler.
+     * Note: only used for default and standard retry handlers.
+     *
+     * @since 3.2
+     */
+    private static final int RETRY_HANDLER_COUNT =
+            Integer.getInteger( "maven.wagon.http.retryhandler.count", 3 );
+
+    /**
+     * Comma separated list of non retryable classes.
+     * Note: only used for default retry handler.
+     *
+     * @since 3.0.1
+     */
+    private static final String RETRY_HANDLER_EXCEPTIONS =
+            System.getProperty( 
"maven.wagon.http.retryhandler.nonRetryableClasses" );
+
+    private static HttpRequestRetryHandler createRetryHandler()
+    {
+        switch ( RETRY_HANDLER_CLASS )
+        {
+            case "default":
+                if ( RETRY_HANDLER_EXCEPTIONS == null )
 
 Review comment:
   I'd rather rely on `StringUtils#isEmpty()`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> making the retry handle of http client configurable
> ---------------------------------------------------
>
>                 Key: WAGON-526
>                 URL: https://issues.apache.org/jira/browse/WAGON-526
>             Project: Maven Wagon
>          Issue Type: New Feature
>            Reporter: Romain Manni-Bucau
>            Priority: Major
>
> Provide a way to customize a lot (until a custom impl) the way wagon retries 
> downloads.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to