You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Jean-Baptiste Onofré (Jira)" <ji...@apache.org> on 2025/03/11 09:18:00 UTC
[jira] [Commented] (AMQ-9680) Review usage of -release over -target
[ https://issues.apache.org/jira/browse/AMQ-9680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17934162#comment-17934162 ]
Jean-Baptiste Onofré commented on AMQ-9680:
-------------------------------------------
I think it's already good on main and 6.1.x as we leverage the Apache POM.
> Review usage of -release over -target
> -------------------------------------
>
> Key: AMQ-9680
> URL: https://issues.apache.org/jira/browse/AMQ-9680
> Project: ActiveMQ Classic
> Issue Type: Task
> Reporter: Matt Pavlovich
> Priority: Minor
>
> -release is supposedly more reliable than -target when mixing JDK version from -target version
> maven-compiler-plugin
> {noformat}
> <maven.compiler.release>11</maven.compiler.release>
> <configuration>
> <release>8</release>
> <source>8</source>
> <target>8</target>
> </configuration>
> {noformat}
> ref: https://openjdk.org/jeps/247
> Motivation
> javac provides two command line options, -source and -target, which can be used to select the version of the Java language accepted by the compiler and the version of the class files it produces, respectively. By default, however, javac compiles against the most-recent version of the platform APIs. The compiled program can therefore accidentally use APIs only available in the current version of the platform. Such programs cannot run on older versions of the platform, regardless of the values passed to the -source and -target options. This is a long-term usability pain point, since users expect that by using these options they'll get class files that can run on the the platform version specified by -target.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact