sbt / sbt-dependency-graph

sbt plugin to create a dependency graph for your project
Apache License 2.0
1.24k stars 113 forks source link

dependencyLicenseInfo thinks the project's own license is unspecified #162

Open Sciss opened 6 years ago

Sciss commented 6 years ago

E.g.

$ sbt dependencyLicenseInfo
[info] Loading settings for project global-plugins from build.sbt,idea.sbt ...
[info] Loading global plugins from /home/hhrutz/.sbt/1.0/plugins
[info] Loading settings for project mellite-build from plugins.sbt ...
[info] Loading project definition from /home/hhrutz/Documents/devel/Mellite/project
[info] Loading settings for project mellite from build.sbt ...
[info] Set current project to Mellite (in build file:/home/hhrutz/Documents/devel/Mellite/)
[info] No license specified
[info]   de.sciss:mellite_2.12:2.27.0
[info]   lucene:lucene:1.4.3
[info]   com.sleepycat:je:5.0.104
[info] 
[info] AGPL v3+
[info]   de.sciss:fscape_2.12:2.17.0
[info]   de.sciss:fscape-cdp_2.12:2.17.0
...

So this is run from Mellite project, which is the first line printed in "No license specified". The settings are clear:

licenses := Seq("GNU Affero General Public License v3+" -> url("http://www.gnu.org/licenses/agpl-3.0.txt"))

I also tried licenses in ThisBuild. Perhaps the plugin tries to resolve the artifact which in this case is not yet published. So I guess it should realise if an artifact designes the sbt project itself and receive the license information from there?

jrudolph commented 6 years ago

Yep, right now it only includes dependencies and gets the information from the dependency resolution layer. We could either keep it that way and remove the first entry or treat it specially by using the sbt information.