Skip to content

[10.x] Check license headers with Apache RAT in the build - #1735

Open
papegaaij wants to merge 1 commit into
wicket-10.xfrom
rat-license-check-10.x
Open

papegaaij wants to merge 1 commit into
wicket-10.xfrom
rat-license-check-10.x

Conversation

@papegaaij

Copy link
Copy Markdown
Contributor

Backport of #1732 to wicket-10.x, for #1723. See #1732 for the reasoning.

Difference from master

  • Headers are added to the files as they are on 10.x. AGENTS.md, CLAUDE.md, JAVASCRIPTTESTING.md, migration-to-11.md and the benchmarks README don't exist there.
  • The user guide headers are added to 10.x's own .adoc files.
  • In pom.xml the RAT plugin is added next to 10.x's own plugin versions.
  • .rat-excludes is identical to master's.

Verification

  • mvn clean verify -Pjs-test passes, and RAT reports no issues.
  • RAT 0.18 run with the ATR's arguments on a git archive reports 0 unapproved files. Dojo is the only non-Apache license it detects, as on master.

🤖 Generated with Claude Code

Wicket checked license headers only with its own
ApacheLicenseHeaderTestCase, one test per module, each with its own ignore
lists and each covering only its module's directory. Files outside the
modules, the user guide, markdown, YAML, service files and anything
outside the file types the test knows were never checked. Apache RAT, run
over the source tree, reported 1470 files without an approved license.

The Apache Trusted Releases platform runs RAT 0.18 on every source archive
and reads its exclusions from a .rat-excludes file at the archive root.
Unapproved files are recorded as concerns the release manager has to
acknowledge before a vote can start.

The root pom now runs apache-rat-plugin 0.18 over the whole tree at
validate, reading the same .rat-excludes. Files that can carry a header now
have one: the markdown files, .asf.yaml, the service files, the user guide,
a few XML and text files and two Java files that lacked it. The
exclusions record the files that stay without one and why: third-party
code, which LICENSE covers, generated release notes, IDE settings, the
archetype's project templates, markup rendered to the browser as is,
example markup (as the examples' header test already decided) and test
data that tests compare byte for byte. These follow the ignore lists of
the existing header tests.

Locally the check also skips what Git ignores, node and node_modules, and
minified files. It takes about half a minute, so -Pfast skips it. A file
without a header that is neither committed nor ignored by Git, such as a
local note, now fails the build until it gets a header or is removed.

GitHub issue #1723

(cherry picked from commit 3569543, with headers added to the files as they are on wicket-10.x)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant