From d170cec151c9fcdc7b680b0af7ccf7347a420117 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Thu, 23 Jul 2026 16:00:28 +0200 Subject: [PATCH] Align Apache RAT configuration with the ATR license check 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 --- .rat-excludes | 2 + pom.xml | 102 ++++++++++++++++--- src/changelog/.12.x.x/align-rat-with-atr.xml | 10 ++ 3 files changed, 102 insertions(+), 12 deletions(-) create mode 100644 .rat-excludes create mode 100644 src/changelog/.12.x.x/align-rat-with-atr.xml diff --git a/.rat-excludes b/.rat-excludes new file mode 100644 index 00000000..a3d4845e --- /dev/null +++ b/.rat-excludes @@ -0,0 +1,2 @@ +.java-version +src/changelog/**/*.xml diff --git a/pom.xml b/pom.xml index a5c9de68..16da9842 100644 --- a/pom.xml +++ b/pom.xml @@ -217,6 +217,8 @@ 3.0.0 4.9.8.3 3.4.0 + + 0.18 1.2.1 @@ -587,21 +589,31 @@ org.apache.rat apache-rat-plugin + true + + MISC + HIDDEN_DIR + MAC + + + LICENSE_CATEGORIES:0 + LICENSE_NAMES:0 + STANDARDS:0 + - .java-version - .mvn/jvm.config - **/*.txt - - src/changelog/**/*.xml - - .github/ISSUE_TEMPLATE/*.md - .github/pull_request_template.md - - .logging-parent-bom-activator + + **/*.bundle.js + **/*.chunk.js + **/*.css.map + **/*.js.map + **/*.min.css + **/*.min.js + **/*.min.map + + .rat-excludes @@ -934,6 +946,72 @@ + + + + apache-rat-std-excludes + + + + ${maven.multiModuleProjectDirectory}/.rat-excludes + + + + + + + + org.apache.rat + apache-rat-plugin + + + MAVEN + ECLIPSE + IDEA + GIT + STANDARD_SCMS + + + + + + + + + + + + apache-rat-excludes-file + + + + ${maven.multiModuleProjectDirectory}/.rat-excludes + + + + + + + + org.apache.rat + apache-rat-plugin + + ${maven.multiModuleProjectDirectory}/.rat-excludes + + + + + + + + diff --git a/src/changelog/.12.x.x/align-rat-with-atr.xml b/src/changelog/.12.x.x/align-rat-with-atr.xml new file mode 100644 index 00000000..a67c3eaf --- /dev/null +++ b/src/changelog/.12.x.x/align-rat-with-atr.xml @@ -0,0 +1,10 @@ + + + + Update Apache RAT to `0.18` and align its configuration with the license check of the ASF Trusted Releases platform (ATR). + Project-specific exclusions must now be placed in a `.rat-excludes` file in the root directory of the build. + +