Skip to content

Remove apache-rat dependency completely? #15185

@dweiss

Description

@dweiss

This is a quick check if anybody minds...

I've had a few attempts to refactor apache rat code (that checks file licenses) and I have to say my conclusion is that it'd be much simpler to just write a simple, specialized task instead of bringing up rat's machinery.

What we need is very simple:

  • scan source files with some inclusion/exclusions (gradle task/ file collections would handle this),
  • check if these source files are covered under any of the approved licenses; the list of licenses is very small and they have basic substring-based matchers.
  • fail if we can't match any of the licenses.

That's it really. We don't need any fancy report, aggregation or exotic licenses. Going through ant/xml report parsing is costly and reimplementing the same on top of rat's current API proved to be a headache (for me). I'd rather just implement it as a basic incremental gradle task, with permitted license string matchers embedded inside.

If anybody can think of a reason this is a bad idea - please let me know.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions