mirror of https://github.com/sbt/sbt.git
pom.xml url and description test
This commit is contained in:
parent
7218b2a1ac
commit
75b5205360
|
|
@ -6,6 +6,8 @@ lazy val root = (project in file(".")) settings (
|
|||
val converter = fileConverter.value
|
||||
XML.loadFile(converter.toPath(vf).toFile)
|
||||
},
|
||||
description := "pom.xml test description",
|
||||
homepage := Some(url("https://example.com/pom_test_url")),
|
||||
TaskKey[Unit]("checkPom") := checkPom.value,
|
||||
TaskKey[Unit]("checkExtra") := checkExtra.value,
|
||||
TaskKey[Unit]("checkVersionPlusMapping") := checkVersionPlusMapping.value,
|
||||
|
|
@ -65,6 +67,10 @@ lazy val checkReleaseNotesURL = readPom.map: pomXml =>
|
|||
lazy val checkPom = Def.task {
|
||||
val pomXML = readPom.value
|
||||
checkProject(pomXML)
|
||||
val urlFromPom = (pomXML \ "url").text
|
||||
assert(urlFromPom == "https://example.com/pom_test_url", urlFromPom)
|
||||
val descriptionFromPom = (pomXML \ "description").text
|
||||
assert(descriptionFromPom == "pom.xml test description", descriptionFromPom)
|
||||
val ivyRepositories = fullResolvers.value
|
||||
withRepositories(pomXML) { repositoriesElement =>
|
||||
val repositories = repositoriesElement \ "repository"
|
||||
|
|
|
|||
Loading…
Reference in New Issue