Skip to content
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

Use maven.compiler.release to build for java 8 from jdk 9+ #1619

Merged
merged 1 commit into from
Mar 24, 2021

Conversation

relud
Copy link
Contributor

@relud relud commented Mar 23, 2021

per https://www.baeldung.com/maven-java-version#java9

To cross-compile correctly, the new -release option replaces three flags: -source, -target and -bootclasspath.

Note that maven.compiler.release is only valid for jdk 9+, and when set causes maven-compiler-plugin to ignore source and target.

@relud relud requested a review from jklukas March 23, 2021 21:54
@relud

This comment has been minimized.

Copy link
Contributor

@jklukas jklukas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Am I understanding correctly that we'll still be building our production templates with JDK 8, and this change is at this point simply a convenience for development so that you can run tests, etc. locally without having to make sure you're on JDK 8?

@relud
Copy link
Contributor Author

relud commented Mar 24, 2021

Am I understanding correctly that we'll still be building our production templates with JDK 8, and this change is at this point simply a convenience for development so that you can run tests, etc. locally without having to make sure you're on JDK 8?

exactly

@relud relud merged commit ada88f7 into master Mar 24, 2021
@relud relud deleted the maven-compiler-release branch March 24, 2021 18:23
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.

None yet

2 participants