maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bwald...@apache.org
Subject cvs commit: maven/src/bootstrap/org/apache/maven BootstrapTask.java
Date Tue, 10 Jun 2003 14:16:08 GMT
bwalding    2003/06/10 07:16:08

  Modified:    src/bootstrap/org/apache/maven BootstrapTask.java
  Log:
  Patch to make BootstrapTask a bit more robust / more logging.
  PR:MAVEN-434
  Submitted by:	Brett Porter
  
  Revision  Changes    Path
  1.15      +23 -10    maven/src/bootstrap/org/apache/maven/BootstrapTask.java
  
  Index: BootstrapTask.java
  ===================================================================
  RCS file: /home/cvs/maven/src/bootstrap/org/apache/maven/BootstrapTask.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- BootstrapTask.java	10 Feb 2003 14:54:00 -0000	1.14
  +++ BootstrapTask.java	10 Jun 2003 14:16:08 -0000	1.15
  @@ -57,8 +57,6 @@
    */
   import java.io.File;
   
  -import java.net.URL;
  -
   import java.util.Iterator;
   import java.util.List;
   import java.util.ArrayList;
  @@ -353,14 +351,29 @@
                       directory.mkdirs();
                   }
   
  -                HttpUtils.getFile( baseUrl + file, 
  -                                   destinationFile, 
  -                                   ignoreErrors, 
  -                                   useTimestamp, 
  -                                   proxyHost, 
  -                                   proxyPort, 
  -                                   proxyUserName,
  -                                   proxyPassword);
  +                log( "Downloading dependency: " + baseUrl + file );
  +
  +                int numRetries = 3;
  +                while ( numRetries >= 0 )
  +                {
  +                    try
  +                    {
  +                        HttpUtils.getFile( baseUrl + file, 
  +                                           destinationFile, 
  +                                           ignoreErrors, 
  +                                           useTimestamp, 
  +                                           proxyHost, 
  +                                           proxyPort, 
  +                                           proxyUserName,
  +                                           proxyPassword);
  +                        break;
  +                    }
  +                    catch (Exception e)
  +                    {
  +                        numRetries--;
  +                        continue;
  +                    }
  +                }
               }
               catch (Exception e)
               {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message