license-maven-plugin
license-maven-plugin copied to clipboard
Allow license selection when project includes multiple licenses
When running the third-party goal and pulling in a dependency which allows multiple license choices, it would be nice if you could "choose" one the licenses to be the one displayed in the output file (since that is what you are doing anyway when you include the project).
It seems like the "overrideFile" would potentially provide this functionality, but it doesn't seem to work that way in practice (i.e. providing a single override does not remove the other license from the output list).
Alternately, "excludeLicenses" could do this. if a project has multiple licenses and one of them is excluded, just include the project using only the non-excluded license. again, it doesn't seem to work that way today.
The resolution of #351 provides a solution for this issue as well, imho.
You could argue that overriding is not the same as selection though - but since
- you can add comments to the override properties file and
- specify the override for an explicit version of the dependency it seems to me that errors are unlikely since you cannot accidentally override a license when you update the dependency. Then you'd end up with multiple licenses for that dependency in the third-party report (because then the override's version does not match the updated version of the dependency and you have to "select" the desired license again).
On the other side, one could make the "selection" feature more robust by only allowing to select one of the given licenses of the dependency (while override would allow to insert any license)...
Hello hows it going?
@lama0206