Skip to content

Conversation

@francoisledroff
Copy link
Collaborator

@francoisledroff francoisledroff commented Jan 16, 2024

Description

By using the source and target version configuration of maven-compiler-plugin we have no way to control the usage of Java 11 specific API. The compilation will still work but the code will fail at runtime when the jar is used with Java 8.

Until Java 8, the only way to cross compile was to use source and target versions but these configuration params do not check the compatibility of the API against the specified Java version.
Starting with Java 9 we have a stricter configuration when we are cross compiling. Earlier we were using JDK 8 for compiling but since now we are using JDK 11 it is better to add this release tag to ensure Java 8 compatibility in the released jar.

Refer this link for more details: https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html

Related Issue

GH-204

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@francoisledroff francoisledroff merged commit 20ab65a into main Jan 16, 2024
Copy link
Contributor

@pulguptaAdobe pulguptaAdobe left a comment

Choose a reason for hiding this comment

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

reviewed

@francoisledroff francoisledroff deleted the GH-204 branch January 18, 2024 10:25
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.

4 participants