mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Initialize pom in init {}.
This commit is contained in:
parent
862271f4d0
commit
93ad378fa6
1 changed files with 3 additions and 4 deletions
|
@ -54,9 +54,9 @@ public class Pom @javax.inject.Inject constructor(@Assisted val id: String,
|
||||||
val id: String = "$groupId:$artifactId:$version"
|
val id: String = "$groupId:$artifactId:$version"
|
||||||
}
|
}
|
||||||
|
|
||||||
val dependencies: List<Dependency> by lazy {
|
val dependencies = arrayListOf<Dependency>()
|
||||||
val result = arrayListOf<Dependency>()
|
|
||||||
|
|
||||||
|
init {
|
||||||
val DEPENDENCIES = XPATH.compile("/project/dependencies/dependency")
|
val DEPENDENCIES = XPATH.compile("/project/dependencies/dependency")
|
||||||
|
|
||||||
val document = kotlinx.dom.parseXml(InputSource(FileReader(documentFile)))
|
val document = kotlinx.dom.parseXml(InputSource(FileReader(documentFile)))
|
||||||
|
@ -99,9 +99,8 @@ public class Pom @javax.inject.Inject constructor(@Assisted val id: String,
|
||||||
}
|
}
|
||||||
log(3, "Done parsing: $groupId $artifactId $version")
|
log(3, "Done parsing: $groupId $artifactId $version")
|
||||||
val tmpDependency = Dependency(groupId!!, artifactId!!, packaging, version, optional!!, scope)
|
val tmpDependency = Dependency(groupId!!, artifactId!!, packaging, version, optional!!, scope)
|
||||||
result.add(tmpDependency)
|
dependencies.add(tmpDependency)
|
||||||
}
|
}
|
||||||
result
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override public fun toString() = toString("Pom", id, "id")
|
override public fun toString() = toString("Pom", id, "id")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue