jakartaee / jakartaee/authentication
TCK: common module doesn't declare or inherit maven-compiler-plugin
- Dominant language
- Java
- Stars
- 27
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
The Authentication TCK is a multi-module Maven project. Accordingly, the top-level pom uses the `` block to define the levels of various plugins, etc. that the rest of the project should use, including:
```
org.apache.maven.plugins
maven-compiler-plugin
3.13.0
```
The `common` module, which is the first one declared/processed in the top-level pom, neither declares a `` (and thus doesn't inherit the version of compiler plugin defined there) nor defines its own usage of the compiler plugin. This results in Maven falling back on using its default levels (as defined in `maven-core.jar#META-INF/plexus/default-bindings.xml`). Prior to Maven 3.9.0, the default version of the maven-compiler-plugin is the ancient 3.1, which doesn't recognize `17` as a viable option. This results in the following failure:
```
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Source option 5 is no longer supported. Use 8 or later.
[ERROR] Target option 5 is no longer supported. Use 8 or later.
[INFO] 2 errors
[INFO] -------------------------------------------------------------
```
The `common` module needs to be updated to either a) inherit the top-level pom's plugins, b) define its own usage of the maven-compiler-plugin to a level that supports Java 17, or c) enforce a minimum Maven version of 3.9.0 (which bumps the default version of the compiler plugin to 3.11.0) instead of 3.8.6.
Contributor guide
Research direction
Inspect the common module's POM alongside the top-level POM and reproduce the Java 17 compilation failure with the affected Maven defaults. Choose one of the three stated fixes, then verify that the common module compiles without falling back to an incompatible compiler-plugin version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100