You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2016/05/29 14:20:05 UTC

svn commit: r1746014 - /commons/scripts/NexusGet.java

Author: sebb
Date: Sun May 29 14:20:05 2016
New Revision: 1746014

URL: http://svn.apache.org/viewvc?rev=1746014&view=rev
Log:
Add a retry

Modified:
    commons/scripts/NexusGet.java

Modified: commons/scripts/NexusGet.java
URL: http://svn.apache.org/viewvc/commons/scripts/NexusGet.java?rev=1746014&r1=1746013&r2=1746014&view=diff
==============================================================================
--- commons/scripts/NexusGet.java (original)
+++ commons/scripts/NexusGet.java Sun May 29 14:20:05 2016
@@ -90,7 +90,7 @@ public class NexusGet {
      * So we don't need to bother to check the <leaf> tag.
      */
     private static void parseNexus(String  name, String folder, XMLInputFactory fact)
-            throws XMLStreamException, IOException, FileNotFoundException {
+            throws XMLStreamException, IOException {
         URLConnection urlConn = new URL(name).openConnection();
         try (InputStream is = urlConn.getInputStream()) {
             XMLStreamReader xr = fact.createXMLStreamReader(is);
@@ -100,7 +100,12 @@ public class NexusGet {
                         xr.next();
                         final String text = xr.getText();
                         if (text.endsWith("/")) {
-                            parseNexus(text, folder, fact);
+                            try {
+                                parseNexus(text, folder, fact);
+                            } catch (IOException ioe){
+                                System.out.println("Retrying once; Nexus sometimes objects " + ioe);
+                                parseNexus(text, folder, fact);                                
+                            }
                         } else {
                             getFile(text, folder);
                         }