hierynomus / license-gradle-plugin

Manage your license(s)
http://www.javadude.nl
Other
409 stars 114 forks source link

Return the initial dependency when no parents have a license #150

Closed kdykeman closed 6 years ago

kdykeman commented 6 years ago

In cases where none of the parents have a dependency, it was returning the description of the terminal parent. As an example, for org.antlr:antlr-runtime:3.4, this would result in an entry in dependency-license.xml for org.sonatype.oss:oss-parent:7 which would obscure the original dependency.

kdykeman commented 6 years ago

FWIW, the failed check seems more related to Travis issues than the code change in the PR.

hierynomus commented 6 years ago

@kdykeman Thanks for the PR. I want to ask you to also add a (few) testcase(s) to it before I merge it.

kdykeman commented 6 years ago

@hierynomus it took me a bit to get back around to it, but I added what I think are appropriate tests.

kdykeman commented 6 years ago

It looks like Travis can't find oraclejdk7. FWIW, I verified locally that one of the tests fails prior to applying the change and succeeds after.

While I was at it, I added a test that didn't seem to be covered already for when one of the parents does have a license. That test expects the existing behavior.

It would be a real help to some folks using LicenseFinder if this could make it into a release soon. Let me know if there's something else I should fix up.

kdykeman commented 6 years ago

Thanks for merging! Sorry to bump, but will there be a new release coming soon?