Skip to content

Retire the per-module license header tests in favour of Apache RAT - #1733

Open
papegaaij wants to merge 1 commit into
masterfrom
retire-license-header-tests
Open

papegaaij wants to merge 1 commit into
masterfrom
retire-license-header-tests

Conversation

@papegaaij

Copy link
Copy Markdown
Contributor

Part of #1723. Merge after #1732, which adds the RAT check that replaces these tests.

Every module carried an ApacheLicenceHeaderTest built on ApacheLicenseHeaderTestCase, each with its own ignore lists. With RAT checking the whole tree, they check a subset of the same thing a second time, and their ignore lists would have to be kept in step with .rat-excludes.

What changes

  • The per-module ApacheLicenceHeaderTest classes are removed.
  • ApacheLicenseHeaderTestCase is deprecated for removal. It is public API in wicket-util's main code, as is the ApacheLicenceHeaderTest next to it, so both stay with @Deprecated(since = "10.12.0, 11.0.0", forRemoval = true).
    • If 10.12.0 or 11.0.0 is released from the RC currently under vote, since needs to move to the next version.
  • The XML-prolog check goes too. The tests also checked that HTML and XML files start with an XML prolog; RAT does not replace that.

Migration

Applications that extend ApacheLicenseHeaderTestCase keep working and get a deprecation warning. There is no mechanical migration, so there is no OpenRewrite recipe.

Proposed migration guide text:

ApacheLicenseHeaderTestCase is deprecated for removal. Wicket checks its own license headers with Apache RAT; use apache-rat-plugin in your build instead.

Verification

  • mvn clean verify -Pjs-test passes.

🤖 Generated with Claude Code

Every module carried an ApacheLicenceHeaderTest built on
ApacheLicenseHeaderTestCase from wicket-util, each with its own ignore
lists. The root build now checks license headers with Apache RAT over the
whole source tree, the check the Apache Trusted Releases platform runs on a
release, so these tests check a subset of the same thing a second time and
their ignore lists have to be kept in step with .rat-excludes.

The per-module tests are removed. ApacheLicenseHeaderTestCase is public API
in wicket-util's main code, as is the ApacheLicenceHeaderTest that sits next
to it, so both stay and are deprecated for removal instead.

The tests also checked that HTML and XML files start with an XML prolog.
That check goes with them; RAT does not replace it.

An application that extends ApacheLicenseHeaderTestCase keeps working and
gets a deprecation warning. Its replacement is Apache RAT in its own build;
there is no mechanical migration, so no OpenRewrite recipe.

Proposed migration guide text: "ApacheLicenseHeaderTestCase is deprecated
for removal. Wicket checks its own license headers with Apache RAT; use
apache-rat-plugin in your build instead."

Merge after the change that adds Apache RAT to the build.

GitHub issue #1723

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.65%. Comparing base (75ba768) to head (9ef66ee).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1733      +/-   ##
============================================
- Coverage     63.17%   62.65%   -0.53%     
+ Complexity    11558    11490      -68     
============================================
  Files          1253     1254       +1     
  Lines         48635    48660      +25     
  Branches       6844     6844              
============================================
- Hits          30725    30486     -239     
- Misses        15192    15489     +297     
+ Partials       2718     2685      -33     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants