From 19663275d8914c32f4d5e43d87ca27d48b6447bd Mon Sep 17 00:00:00 2001 From: Florian Dreier Date: Mon, 3 Jan 2022 13:22:08 +0100 Subject: [PATCH] license-gather: ignore xml namespaces when parsing POM files (see #43) fixes #43 --- README.md | 1 + .../kotlin/com/github/vlsi/gradle/license/PomLicenseLoader.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 443ceaa..f46f9db 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,7 @@ Change log ---------- v1.78 * chore: bump Gradle 6.7 -> 6.9.1 +* license-gather: ignore xml namespaces when parsing POM files (see #43) v1.77 * crlf-plugin: bump jgit to 5.13.0.202109080827-r diff --git a/plugins/license-gather-plugin/src/main/kotlin/com/github/vlsi/gradle/license/PomLicenseLoader.kt b/plugins/license-gather-plugin/src/main/kotlin/com/github/vlsi/gradle/license/PomLicenseLoader.kt index 9108a1d..800c9cd 100644 --- a/plugins/license-gather-plugin/src/main/kotlin/com/github/vlsi/gradle/license/PomLicenseLoader.kt +++ b/plugins/license-gather-plugin/src/main/kotlin/com/github/vlsi/gradle/license/PomLicenseLoader.kt @@ -108,7 +108,7 @@ fun GPathResult.attr(name: String): String = get("@$name").text() @Suppress("UNCHECKED_CAST") fun GPathResult.getList(name: String) = getProperty(name) as Iterable -private fun File.parseXml(): GPathResult = XmlSlurper().parse(this) +private fun File.parseXml(): GPathResult = XmlSlurper(false, false).parse(this) fun GPathResult.parsePom(): PomContents { fun GPathResult.parseId(parentGroup: String = "") =