slachiewicz opened a new pull request, #598:
URL: https://github.com/apache/maven-parent/pull/598
Adds a temporary, JDK-activated profile that raises
`version.apache-rat-plugin` to 0.18 where the build JDK is 17 or newer.
Everything else stays on 0.16.1.
The aim is to exercise RAT 0.18 across the core projects before the ASF
parent adopts it in apache/maven-apache-parent#587, so that the JDK question is
answered with evidence rather than at the moment of the parent bump.
## Why it is scoped to a profile
RAT 0.18 is Java 17 bytecode:
```
javap -v org/apache/rat/plugin/RatCheckMojo.class # from
apache-rat-plugin-0.18.jar
major version: 61
```
`rat-check` is bound at `process-resources` for every project inheriting
this POM, and the shared CI matrix still defaults to `[ "21", "25", "8" ]`.
Raising the version unconditionally would fail the JDK 8 cell everywhere. The
profile confines 0.18 to the JDKs that can load it and leaves the JDK 8
decision to be taken separately, on its own evidence.
For reference, 0.17 is the last Java 8 line (`major version: 52`) if a
fallback is ever wanted.
## Verified
| Build JDK | Resolved version | `process-resources` |
|---|---|---|
| 25 | 0.18 | passes |
| 11 | 0.16.1 | passes |
## What this deliberately does not do
It does not migrate `<excludes>` to `<inputExcludes>`. The rename is not
equivalent, and the failure mode is silent. Measured on this project with 0.18:
| Configuration | Files scanned | Result |
|---|---|---|
| `<excludes>` (current, deprecated) | 28 | 0 unapproved |
| `<inputExcludes>` (naive rename) | 4 | 0 unapproved |
The 24 lost files are every file under `docs/`, `maven-extensions/`,
`maven-plugins/`, `maven-shared-components/` and `maven-skins/` — the rename
routes through the new engine where `excludeSubProjects` takes effect, so whole
modules stop being license-checked and the build still reports success.
Old-style `<excludes>` continues to work under 0.18 with a deprecation warning,
so there is no need to rush it.
That migration belongs in a separate change, per project, validated by
comparing RAT's scanned-file list before and after rather than the counter
totals. apache/maven#12402 shows the same trap from the other direction: a
hand-migration there dropped `.mvn/**` and rewrote `dir/**` as `dir`, producing
3298 unapproved files.
## Removing this
The profile carries a comment saying so. Drop it once the ASF parent ships
0.18 and the JDK floor is settled.
*This change was created with AI assistance.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]