cookpad / LicenseToolsPlugin

Gradle plugin to check library licenses and generate license pages for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Output of updateLicenses is not compatible with read content of checkLicenses

chillinski opened this issue · comments

We have a lot of dependencies in our project and there is one, where we are not able to check the license.
The artifact is org.jvnet.staxex:stax-ex:1.8
The pom.xml of this dependency looks like follows:

<project>
<!-- ... -->
    <licenses>
        <license>
            <name>
                Dual license consisting of the CDDL v1.1 and GPL v2
            </name>
            <url>https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
<!-- ... -->
</project>

The generated content of ./gradlew updateLicenses is as follows:

- artifact: org.jvnet.staxex:stax-ex:1.8
  copyrightHolder: #COPYRIGHT_HOLDER#
  license:
      Dual license consisting of the CDDL v1.1 and GPL v2
  licenseUrl: http://opensource.org/licenses/BSD-3-Clause
  name: stax-ex
  url: http://stax-ex.java.net/

When executing the task ./gradlew checkLicenses we see:

> Task :checkLicenses FAILED
# Licenses not matched with pom.xml in dependencies:
- artifact: org.jvnet.staxex:stax-ex:1.8
  license: Dual license consisting of the CDDL v1.1 and GPL v2

Hint:

  • It looks like newlines and whitespaces are not filtered out when trying to match the license name.