mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Better logs.
This commit is contained in:
parent
a50a7a2313
commit
62453b1bad
1 changed files with 3 additions and 22 deletions
|
@ -55,10 +55,11 @@ class RepoFinder @Inject constructor(val executors: KobaltExecutors) {
|
||||||
for (i in 0..Kobalt.repos.size - 1) {
|
for (i in 0..Kobalt.repos.size - 1) {
|
||||||
try {
|
try {
|
||||||
val result = cs.take().get(2000, TimeUnit.MILLISECONDS)
|
val result = cs.take().get(2000, TimeUnit.MILLISECONDS)
|
||||||
log(2, " Result for repo #$i: $result")
|
|
||||||
if (result.found) {
|
if (result.found) {
|
||||||
log(2, "Located $id in ${result.hostConfig.url}")
|
log(2, "Located $id in ${result.hostConfig.url}")
|
||||||
results.add(result)
|
results.add(result)
|
||||||
|
} else {
|
||||||
|
log(3, " Result for repo #$i: $result")
|
||||||
}
|
}
|
||||||
} catch(ex: Exception) {
|
} catch(ex: Exception) {
|
||||||
warn("Error: $ex")
|
warn("Error: $ex")
|
||||||
|
@ -132,27 +133,7 @@ class RepoFinder @Inject constructor(val executors: KobaltExecutors) {
|
||||||
attemptPaths.map { repo.copy(url = repo.url + File(it).parentFile.path.replace("\\", "/")) }
|
attemptPaths.map { repo.copy(url = repo.url + File(it).parentFile.path.replace("\\", "/")) }
|
||||||
|
|
||||||
val firstFound = attemptUrls.map { Kurl(it)}.firstOrNull { it.exists }
|
val firstFound = attemptUrls.map { Kurl(it)}.firstOrNull { it.exists }
|
||||||
// val urlJar = repo.copy(url = repo.url + dep.toJarFile(dep.version))
|
log(3, "Result for $repoUrl for $id: $firstFound")
|
||||||
// var foundPath = ""
|
|
||||||
// if (Kurl(urlJar).exists) {
|
|
||||||
// foundPath = dep.toJarFile(dep.version)
|
|
||||||
// } else {
|
|
||||||
// val urlAar = repo.copy(url = repo.url + dep.toAarFile(dep.version))
|
|
||||||
// if (Kurl(urlAar).exists) {
|
|
||||||
// foundPath = dep.toAarFile(dep.version)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// val hasJar = true
|
|
||||||
// val found =
|
|
||||||
// if (! hasJar) {
|
|
||||||
// // No jar, try to find the directory
|
|
||||||
// val url = repo.copy(url = repoUrl
|
|
||||||
// + File(dep.toJarFile(dep.version)).parentFile.path.replace("\\", "/"))
|
|
||||||
// Kurl(url).exists
|
|
||||||
// } else {
|
|
||||||
// true
|
|
||||||
// }
|
|
||||||
log(2, "Result for $repoUrl for $id: $firstFound")
|
|
||||||
return RepoResult(repo, Version.of(dep.version), firstFound?.hostInfo?.url)
|
return RepoResult(repo, Version.of(dep.version), firstFound?.hostInfo?.url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue