You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Ethan Rose (Jira)" <ji...@apache.org> on 2025/09/11 22:14:00 UTC
[jira] [Updated] (HDDS-13670) Replace javac.version with maven.compiler.release
[ https://issues.apache.org/jira/browse/HDDS-13670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ethan Rose updated HDDS-13670:
------------------------------
Parent: HDDS-13674
Issue Type: Sub-task (was: Improvement)
> Replace javac.version with maven.compiler.release
> -------------------------------------------------
>
> Key: HDDS-13670
> URL: https://issues.apache.org/jira/browse/HDDS-13670
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Ethan Rose
> Assignee: Ethan Rose
> Priority: Major
>
> Ozone's top level pom.xml defines a custom field {{javac.version}} which defaults to java 8 but can be overridden manually. This looks like an artifact we inherited from hadoop and pre-java 9 era when {{maven.compiler.source}} and {{maven.compiler.target}} were set independently and we wanted one property to map them to the same value.
> As of maven compiler version 3.13.0, this is no longer necessary, even for jdk8:
> From the [docs|https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html#usage-on-jdk-8]:
> {quote}The --release option is not supported using JDK 8. However, since Compiler plugin version 3.13.0 you can use the release property also on JDK 8. The plugin will convert it to source and target automatically.
> {quote}
> We are using maven compiler plugin version 3.14.0, so we can remove our custom {{javac.version}} field and just use the standard {{maven.compiler.release}} field that devs from other maven projects would already be familiar with.
> Note that by default everything in Ozone is built with jdk8 bytecode meaning the release build we post is compatible with jdk8. To maintain this, we would still need to set a default value for {{maven.compiler.release}} in our top level pom instead of inheriting the one from the jdk, and higher bytecode version could be built by specifying {{-Dmaven.compiler.release}} explicitly in the build command.
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org