[2.x] Format pom.xml (#9059)

This commit is contained in:
kenji yoshida 2026-04-11 08:20:02 +09:00 committed by GitHub
parent e0bdb531f7
commit f8a8742dbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -4289,7 +4289,9 @@ object Classpaths {
configuration.allRepositories,
)
val processed = configuration.process(pomXml)
scala.xml.XML.save(file.getAbsolutePath, processed, "UTF-8", xmlDecl = true)
val printer = new scala.xml.PrettyPrinter(1000, 4)
val formatted = scala.xml.XML.loadString(printer.format(processed))
scala.xml.XML.save(file.getAbsolutePath, formatted, "UTF-8", xmlDecl = true)
log.info("Wrote " + file.getAbsolutePath)
file
})