downloader

This commit is contained in:
jiahua.liu 2020-03-06 21:50:03 +08:00
parent 592d28044e
commit 140cd538b5

View File

@ -104,20 +104,13 @@ suspend fun HttpClient.downloadMavenPomAsString(
version: String
):String{
return kotlin.runCatching {
Http.get<String>(
this.get<String>(
aliyunPath.buildPath(groupName,projectName,version,"pom")
)
}.getOrElse {
try {
Http.get(
aliyunPath.buildPath(groupName, projectName, version, "pom")
)
}catch (e:Exception){
if(e.message?.contains("404 Not Found") == true) {
return ""
}
throw e
}
this.get(
aliyunPath.buildPath(groupName, projectName, version, "pom")
)
}
}