mojohaus / license-maven-plugin

Maven plugin to download and collect license files from project dependencies.
https://www.mojohaus.org/license-maven-plugin/
GNU Lesser General Public License v3.0
102 stars 125 forks source link

Allow splitting of licenses #138

Open reitzmichnicht opened 6 years ago

reitzmichnicht commented 6 years ago

Projects often declare 2 different licences as single license.

For Example: CDDL+GPLv2

Would be great to merge this to 2 different licenses.

Currently I have

<licenseMerge>Common Development and Distribution License, Version 1.0) (GNU General Public License, Version 2 with the Classpath Exception|
                COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) plus GPL|
                CDDL/GPLv2+CE|
                CDDL or GPLv2 with exceptions|
                CDDL+GPLv2|
                CDDL+GPL|
                CDDL+GPL License|
                CDDL + GPLv2 with classpath exception
              </licenseMerge>

But I need this which is not allowed:

             <licenseMerge>Common Development and Distribution License, Version 1.0|
                COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) plus GPL|
                CDDL/GPLv2+CE|
                CDDL or GPLv2 with exceptions|
                CDDL+GPLv2|
                CDDL+GPL|
                CDDL+GPL License|
                CDDL + GPLv2 with classpath exception
              </licenseMerge>
              <licenseMerge>GNU General Public License, Version 2 with the Classpath Exception|
                COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) plus GPL|
                CDDL/GPLv2+CE|
                CDDL or GPLv2 with exceptions|
                CDDL+GPLv2|
                CDDL+GPL|
                CDDL+GPL License|
                CDDL + GPLv2 with classpath exception
              </licenseMerge>
ppalaga commented 5 years ago

Please explain better (1) sum up the current behavior (2) what is wrong with the current behavior and (3) what is the expected behavior

ppalaga commented 5 years ago

Which goals are affected?

reitzmichnicht commented 5 years ago

Often the license information in the pom.xml looks like this:

    <licenses>
        <license>
            <name>CDDL + GPLv2 with classpath exception</name>
            <url>http://glassfish.java.net/nonav/public/CDDL+GPL.html</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

When running the goal license:aggregate-add-third-party for example it is not possible to configure 2 license merges for the same string as described above. That makes it hard to maintain blacklists.

Kind regards, Michael