Skip to content

chore: add java 21 profile #1979

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 16, 2024
Merged

chore: add java 21 profile #1979

merged 2 commits into from
Aug 16, 2024

Conversation

mpeddada1
Copy link
Contributor

@mpeddada1 mpeddada1 commented Aug 16, 2024

As discovered in #1975, running mvn clean install in jdk 21 is results in the following error:

INFO] Compiling 157 source files with javac [debug target 1.7] to target/classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING : 
[INFO] -------------------------------------------------------------
[WARNING] bootstrap class path not set in conjunction with -source 7
[INFO] 1 warning
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] Source option 7 is no longer supported. Use 8 or later.
[ERROR] Target option 7 is no longer supported. Use 8 or later.
[INFO] 2 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Parent for the Google HTTP Client Library for Java 1.44.3-SNAPSHOT:

This is because the parent pom explicitly sets the source/target values in the maven-compiler-plugin and maven-javadoc-plugin to 1.7.

This PR introduces a profile that is activated when jdk 21 is used and overrides the source/target values to 1.8 in the maven-compiler-plugin and maven-javadoc-plugin.

@mpeddada1 mpeddada1 marked this pull request as ready for review August 16, 2024 15:19
@mpeddada1 mpeddada1 requested a review from a team as a code owner August 16, 2024 15:19
@mpeddada1 mpeddada1 merged commit afd6afc into main Aug 16, 2024
20 checks passed
@mpeddada1 mpeddada1 deleted the java21-profile branch August 16, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants