mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
--resolve: display the dependencies of the id found.
This commit is contained in:
parent
f628597dd3
commit
457de8de34
1 changed files with 8 additions and 5 deletions
|
@ -23,13 +23,16 @@ class ResolveDependency @Inject constructor(val repoFinder: RepoFinder) {
|
||||||
class Dep(val dep: IClasspathDependency, val level: Int)
|
class Dep(val dep: IClasspathDependency, val level: Int)
|
||||||
|
|
||||||
fun run(id: String) {
|
fun run(id: String) {
|
||||||
val indent = -1
|
|
||||||
val dep = MavenDependency.create(id)
|
|
||||||
val root = Node(Dep(dep, indent))
|
|
||||||
val seen = hashSetOf<String>(id)
|
|
||||||
root.addChildren(findChildren(root, seen))
|
|
||||||
val repoResult = repoFinder.findCorrectRepo(id)
|
val repoResult = repoFinder.findCorrectRepo(id)
|
||||||
|
|
||||||
|
val indent = -1
|
||||||
|
val originalDep = MavenDependency.create(id)
|
||||||
|
// We want to display the dependencies of the id we found, not the one we queries
|
||||||
|
val dep = MavenDependency.create(originalDep.shortId + repoResult.version)
|
||||||
|
val root = Node(Dep(dep, indent))
|
||||||
|
val seen = hashSetOf(id)
|
||||||
|
root.addChildren(findChildren(root, seen))
|
||||||
|
|
||||||
val simpleDep = SimpleDep(MavenId.create(id))
|
val simpleDep = SimpleDep(MavenId.create(id))
|
||||||
val url = repoResult.hostConfig.url + simpleDep.toJarFile(repoResult)
|
val url = repoResult.hostConfig.url + simpleDep.toJarFile(repoResult)
|
||||||
AsciiArt.logBox(listOf(id, url).map { " $it" }, {s -> println(s) })
|
AsciiArt.logBox(listOf(id, url).map { " $it" }, {s -> println(s) })
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue