pmonks / tools-licenses

A Clojure tools.build task library related to dependency licenses.
Apache License 2.0
6 stars 4 forks source link

Look at parent POMs for license information #19

Closed pmonks closed 2 years ago

pmonks commented 2 years ago

When a pom.xml file declares that it has a parent POM, I want tools-licenses to look for license information in the parent, so I can ensure that any "inherited" license information is correctly applied.

Note that this must be recursive - if a parent has a parent, that must be checked too.

pmonks commented 2 years ago

This will also greatly reduce the need for the fallbacks, since many of the deps on that list have parents and those parents declare licenses.

pmonks commented 2 years ago

This is probably best achieved by using Maven's Model Builder APIs, rather than parsing pom.xml files directly, since (amongst other things) that code normalises the project inheritance (parent POM(s)) structure.

pmonks commented 2 years ago

This is implemented in the new lice-comb library that has been refactored out from tools-licenses. tools-licenses will be updated to use that library soon, at which point this issue will be resolved.

pmonks commented 2 years ago

Fixed in v1.0.64.

pmonks commented 2 years ago

Oh and heads up @jellelicht that this was probably the reason you were running into so many dependencies with unknown licenses.