Skip to content

Commit 94e964e

Browse files
author
Wil Selwood
committed
fix sax parser to not care about namespaces
1 parent a259194 commit 94e964e

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/main/groovy/nl/javadude/gradle/plugins/license/LicenseResolver.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class LicenseResolver {
188188
Configuration pomConfiguration = project.configurations.detachedConfiguration(d)
189189

190190
File pStream = pomConfiguration.resolve().asList().first()
191-
GPathResult xml = new XmlSlurper().parse(pStream)
191+
GPathResult xml = new XmlSlurper(true, false).parse(pStream)
192192
DependencyMetadata pomData = new DependencyMetadata(dependency: initialDependency)
193193

194194
xml.licenses.license.each {

src/test/groovy/nl/javadude/gradle/plugins/license/DownloadLicensesIntegTest.groovy

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,23 @@ class DownloadLicensesIntegTest extends Specification {
5656
ant.delete(dir: projectDir)
5757
}
5858

59+
def "Test that poms with xlint args are handled"() {
60+
setup:
61+
project.dependencies {
62+
compile "com.sun.mail:javax.mail:1.5.4"
63+
}
64+
65+
when:
66+
downloadLicenses.execute()
67+
68+
then:
69+
File f = getLicenseReportFolder()
70+
assertLicenseReportsExist(f)
71+
dependenciesInReport(xml4LicenseByDependencyReport(f)) == 2
72+
licensesInReport(xml4DependencyByLicenseReport(f)) == 2
73+
74+
}
75+
5976
def "Test that report generating in multi module build doesn't include unrelated subprojects dependencies"() {
6077
setup:
6178
subproject.dependencies {

0 commit comments

Comments
 (0)