pom.xml url and description test

This commit is contained in:
xuwei-k 2026-04-10 13:16:45 +09:00
parent 7218b2a1ac
commit 75b5205360
1 changed files with 6 additions and 0 deletions

View File

@ -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"