Skip to content

Remove unnecessary maven.compiler overrides and add CI check#806

Merged
wu-sheng merged 4 commits intomainfrom
fix/remove-unnecessary-compiler-overrides
Apr 16, 2026
Merged

Remove unnecessary maven.compiler overrides and add CI check#806
wu-sheng merged 4 commits intomainfrom
fix/remove-unnecessary-compiler-overrides

Conversation

@wu-sheng
Copy link
Copy Markdown
Member

Summary

  • Remove maven.compiler.release=17 from spring-ai-1.x-plugin — its source code uses no JDK 17+ language features; the provided-scope dependency on Spring AI doesn't require raising the compiler level.
  • Remove redundant maven.compiler.source/target=8 from 6 other plugins (aerospike, jedis, nats, micronaut-http-server, micronaut-http-client, tomcat-10x) since JDK 8 is already the default.
  • Add tools/plugin/check-compiler-overrides.sh CI check with an allowlist to prevent unnecessary compiler overrides in future PRs. Currently allowed: jdk-httpclient-plugin (uses JDK 11 HttpClient API) and jdk-http-plugin (resets to blank).

Test plan

  • check-compiler-overrides.sh passes locally
  • CI build passes on all platforms

… and add CI check

- Remove maven.compiler.release=17 from spring-ai-1.x-plugin (no JDK 17+ language features used)
- Remove redundant maven.compiler.source/target=8 from aerospike, jedis, nats, micronaut, tomcat plugins
- Add CI script (tools/plugin/check-compiler-overrides.sh) with allowlist to prevent future occurrences
- Update CLAUDE.md and new-plugin skill with compiler level guidance
@wu-sheng wu-sheng requested a review from peachisai April 16, 2026 01:57
@wu-sheng wu-sheng added this to the 9.7.0 milestone Apr 16, 2026
@wu-sheng wu-sheng added the bug Something isn't working label Apr 16, 2026
…mpiler.release

- Replace Map.of() (JDK 9+) with LinkedHashMap in InputMessages.java
- Set <maven.compiler.release /> to cancel parent's --release 8, allowing
  the compiler to resolve java.lang.Record from provided Spring AI classes
- Add spring-ai-1.x-plugin to compiler override allowlist
Distinguish between plugins that require JDK 11/17+ APIs vs plugins
that only need API visibility for provided deps using Record types.
…compiler.release

Same pattern as jdk-http-plugin: javadoc plugin fails on empty
maven.compiler.release value, so set failOnError=false.
@wu-sheng wu-sheng merged commit 489ec3c into main Apr 16, 2026
223 of 286 checks passed
@wu-sheng wu-sheng deleted the fix/remove-unnecessary-compiler-overrides branch April 16, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants