1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00
This commit is contained in:
Cedric Beust 2015-12-16 18:52:42 +04:00
parent 6c36a7c227
commit 55bc15359a

View file

@ -12,7 +12,7 @@ import java.util.concurrent.ExecutorService
import javax.inject.Inject
public class DepFactory @Inject constructor(val localRepo: LocalRepo,
val repoFinder: RepoFinder,
val remoteRepo: RepoFinder,
val executors: KobaltExecutors,
val downloadManager: DownloadManager,
val pomFactory: Pom.IFactory) {
@ -39,7 +39,7 @@ public class DepFactory @Inject constructor(val localRepo: LocalRepo,
if (localFirst) {
localRepo.findLocalVersion(mavenId.groupId, mavenId.artifactId, mavenId.packaging)
} else {
repoResult = repoFinder.findCorrectRepo(id)
repoResult = remoteRepo.findCorrectRepo(id)
if (!repoResult.found) {
throw KobaltException("Couldn't resolve $id")
} else {
@ -48,7 +48,7 @@ public class DepFactory @Inject constructor(val localRepo: LocalRepo,
}
return MavenDependency(MavenId.create(mavenId.groupId, mavenId.artifactId, packaging, version),
executor, localRepo, repoFinder, pomFactory, downloadManager)
executor, localRepo, remoteRepo, pomFactory, downloadManager)
}
}
}