technomancy / lein-licenses

List the license of each of your dependencies.
44 stars 13 forks source link

Support printing all available licenses, not just the first #4

Open mwmitchell opened 9 years ago

mwmitchell commented 9 years ago

Some libraries give the option of choosing a license that best suites the needs of the consumer. For example, the UnboundID LDAP SDK has 3. Gradle has a license plugin that supports this, as well as npm (the other tools we're using in our stack). It would be useful to also have lein-licenses support printing all possible licenses from dependencies too.

An alternative to this would be to provide an option (function) in project.clj to allow customization of what's printed for a given lib. So I could do: (fn [lib licenses] (if (.contains lib "foo") "bar" licenses))

arr-ee commented 9 years ago

Interesting, I’ve never seen this before.

I agree that multiple licenses should be supported, and that we should support overrides (alongside with fallbacks). Also we probably should introduce tests at some point :D

I’ll try to look into this some time next week, but meanwhile patches are very much welcome.

(for future reference: http://central.maven.org/maven2/com/unboundid/unboundid-ldapsdk/3.0.0/unboundid-ldapsdk-3.0.0.pom)

kenrestivo-stem commented 7 years ago

The multiple-license thing bit us too, incorrectly reporting an LGPL license that is dual-licensed under Apache (and so is fine).

pmonks commented 4 years ago

Note that SPDX (see issue #7) provides a standard mechanism for representing the various ways that a work can be multiply-licensed: SPDX license expressions.