Try to use RAT 0.18 - help needed with Maven project structure - #12402
Try to use RAT 0.18 - help needed with Maven project structure#12402ottlinger wants to merge 3 commits into
Conversation
|
The other day was tinkering with same problem, and we have issues as well: Idea is that Maven POM should really not contain RAT config, merely a plugin definition with one liner config, that points to some sort of RAT config file, presumably in repository root. This way, that file would end up in source bundle as well, and could be picked up by tools like ATR is, as currently we have divergence between config used in build by Maven, ATR reports unrelated errors, etc. |
|
RAT plugin as I found, top to bottom: |
gnodet
left a comment
There was a problem hiding this comment.
Code Review
All five findings independently confirmed. This is a WIP PR where the author is requesting help with the RAT 0.18 upgrade — here are the issues to address:
-
.mvndirectory exclusion removed (pom.xml:820): The.mvn/directory contains tracked files (maven.config,readme.txt) without Apache license headers. Since.mvn/is NOT in.gitignore,<inputExcludeParsedScm>GIT</inputExcludeParsedScm>will not exclude it. The.mvnexclusion must be retained in the<inputExcludes>section. -
Hardcoded version override (
pom.xml:813):<version>0.18</version>overrides the parent-managed version (ASF parent specifies0.16.1). The inline comment acknowledges this uncertainty — needs resolution before merge. -
Spotless CI failure (
pom.xml:813): The inline XML comment<!-- Remove if correct version comes from parent -->on the same line as the<version>element causes the Spotless formatting check to fail. Moving the comment to a separate line will fix this. -
Exclusion pattern semantics (
pom.xml:822, low): Pattern changes fromdir/**todir(e.g.,src/test/projects/**→src/test/projects) rely on RAT 0.18's<inputExcludes>handling directory matching implicitly. Worth validating. -
Broad standard exclusions (
pom.xml:815, low):<inputExcludeStds><exclude>ALL</exclude></inputExcludeStds>activates all built-in exclusion sets. May be correct for the upgrade but implications should be understood, especially given the reported "many thousand new unlicensed files."
The NOTICE file change (http → https for ASF URL) is a legitimate standalone improvement that could be split into a separate trivial PR.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of gnodet
|
@gnodet thanks for adding the generator's response:
Hope that helps. Due to the change in minimal JDK version I'm still not sure if RAT0.18 can be used within your build stack as JDK17 is require to build RAT. |
gnodet
left a comment
There was a problem hiding this comment.
Thanks for the detailed explanations @ottlinger! That clarifies the RAT 0.18 changes well:
- Good to know
.mvnis already covered by RAT defaults — makes sense to remove the explicit exclusion. - & 3. Understood — the version management will be cleaner once apache/maven-apache-parent#587 lands.
- Noted on the pattern syntax being a RAT 0.18 feature.
- Makes sense to leverage RAT's inclusion config for those exclusions.
The JDK 17 minimum requirement for RAT 0.18 is indeed worth confirming against the Maven build matrix. Previous review findings stand as informational context for other reviewers.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of gnodet
Trying to add configuration for RAT 0.18, but the basic scan does not pass and reports many thousand new unlicensed files .... as I'm not sure about the Maven project layout I don't know where RAT is configured for the whole project.
Can you help out? @slachiewicz @slawekjaranowski