Align Apache RAT configuration with the ATR license check#502
Open
ppkarwasz wants to merge 1 commit into
Open
Conversation
Bump `apache-rat-plugin` to `0.18` (requires Java 17) and configure it to mirror the RAT invocation of the ASF Trusted Releases platform, see `atr/tasks/checks/rat.py` in `apache/tooling-trusted-releases`: - The POM only contains the exclusions that ATR itself applies: the `MISC`, `HIDDEN_DIR` and `MAC` standard collections, the generated file patterns and the counter minimums. - The SCM and IDE standard collections are applied by the new `apache-rat-std-excludes` profile, only when the build root contains no `.rat-excludes` file, matching ATR's behavior. - When `.rat-excludes` is present, the new `apache-rat-excludes-file` profile passes it to RAT instead, like ATR does. - Project-specific exclusions move from the POM, which ATR never reads, to a new `.rat-excludes` file at the build root. Assisted-By: Claude Fable 5 <noreply@anthropic.com>
Member
Author
|
The windows build requires #504. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
During a release, the ASF Trusted Releases platform (ATR) re-checks the source archive with the Apache RAT CLI (see
atr/tasks/checks/rat.py). ATR never reads the Maven POM: the only exclusion mechanisms it honors are its own predefined exclusions and a.rat-excludesfile found in the archive. Any exclusion that lives only in the POM therefore hides a failure locally that ATR will later report against the release candidate.This PR makes the local
apache-rat-plugincheck behave like the ATR check, so a build passingverifyalso passes ATR.Changes
apache-rat-pluginfrom0.16.1(managed byorg.apache:apache) to0.18.MISC,HIDDEN_DIRandMACstandard exclusion collections,*.min.js,*.css.map, etc. fromGENERATED_FILE_SUFFIXESinatr/constants.py),LICENSE_CATEGORIES:0,LICENSE_NAMES:0andSTANDARDS:0counter minimums.${maven.multiModuleProjectDirectory}/.rat-excludes:apache-rat-std-excludes(file absent): additionally applies theMAVEN,ECLIPSE,IDEA,GITandSTANDARD_SCMScollections, as ATR does for archives without a.rat-excludesfile;apache-rat-excludes-file(file present): passes the file to RAT viainputExcludeFile, and the SCM/IDE collections are not applied, as in ATR..rat-excludesfile.Impact on downstream projects
Projects inheriting from
logging-parentno longer inherit POM-level RAT excludes beyond the ATR-predefined ones. Each project must provide its own.rat-excludesat its repository root. This is intentional: those exclusions were invisible to ATR anyway, and the file makes them effective both locally and during the ATR release check.