cookpad / LicenseToolsPlugin

Gradle plugin to check library licenses and generate license pages for Android
Apache License 2.0
174 stars 29 forks source link

Output of updateLicenses is not compatible with read content of checkLicenses #149

Open chillinski opened 2 years ago

chillinski commented 2 years ago

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: