add try/catch block into ModelGetter
@@ -78,7 +78,7 @@ def copyWithProgress(InputStream inStr, OutputStream outStr, long totalLength){
def downloadFile(String urlStr, File file) {
println "GET : $urlStr -> $file (Using proxy? ${proxy != null})"
url = new URL(urlStr)
-
+ try {
urlConn = proxy ? url.openConnection(proxy) : url.openConnection()
contentLength = urlConn.getContentLengthLong()
@@ -89,6 +89,10 @@ def downloadFile(String urlStr, File file) {
outStream.close()
inStream.close()
println "Download Complete.."
+ } catch (IOException e) {
+ println "Couldn't download $file at the moment. Will skip tests that require that model/file for now."
+ e.printStackTrace()
+ }
}
def urlPrefix = "http://opennlp.sourceforge.net/models-1.5"
