-
Notifications
You must be signed in to change notification settings - Fork 22
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
[MPOM-264] Set "maven.compiler.release" on JDK 9+ #188
[MPOM-264] Set "maven.compiler.release" on JDK 9+ #188
Conversation
FTR: This is a simplified version of #48 which was declined back then. Nowadays the profile is even used within Maven Parent: https://issues.apache.org/jira/browse/MPOM-447 |
f0d7b0d
to
413220e
Compare
<maven.compiler.source>${maven.compiler.target}</maven.compiler.source> | ||
<maven.compiler.target>1.7</maven.compiler.target> | ||
<maven.compiler.target>7</maven.compiler.target><!-- use version numbers without the "1." prefix (supported since javac 8) --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we enforce with https://maven.apache.org/enforcer/enforcer-rules/requireProperty.html that this property value does no longer start with "1."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if 7
is supported .... maybe it is time to switch it to 8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it is: back to 5 if javac 8 is used, https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html#BHCDIFEE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
javac 17 still supports 7, only javac 21 only supports 8+.
pom.xml
Outdated
@@ -525,6 +545,17 @@ under the License. | |||
</build> | |||
</profile> | |||
<!-- END SNIPPET: release-profile --> | |||
<profile> | |||
<id>jdk9ornewer</id> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make is simple: jdk9+
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 8ab37ce.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also should update documentation.
https://maven.apache.org/pom/asf/
Rename profile id, document property "maven.release.property"
Due to apache/maven-apache-parent#188 the property `maven.compiler.release` is now being set which precludes exporting and using any internal Java classes. Therefore this commit removed references to `--add-exports` from the build and removed any usage of the relevant classes from the code-base.
Due to apache/maven-apache-parent#188 the property `maven.compiler.release` is now being set which precludes exporting and using any internal Java classes. Therefore this commit removed references to `--add-exports` from the build and removed any usage of the relevant classes from the code-base.
Due to apache/maven-apache-parent#188 the property `maven.compiler.release` is now being set which precludes exporting and using any internal Java classes. Therefore this commit removed references to `--add-exports` from the build and removed any usage of the relevant classes from the code-base.
Due to apache/maven-apache-parent#188 the property `maven.compiler.release` is now being set which precludes exporting and using any internal Java classes. Therefore this commit removed references to `--add-exports` from the build and removed any usage of the relevant classes from the code-base.
Due to apache/maven-apache-parent#188 the property `maven.compiler.release` is now being set which precludes exporting and using any internal Java classes. Therefore this commit removed references to `--add-exports` from the build and removed any usage of the relevant classes from the code-base.
Due to apache/maven-apache-parent#188 the property `maven.compiler.release` is now being set which precludes exporting and using any internal Java classes. Therefore this commit removed references to `--add-exports` from the build, switches to reflection, and adds `--add-opens` to the runtime JVM parameters.
Due to apache/maven-apache-parent#188 the property `maven.compiler.release` is now being set which precludes exporting and using any internal Java classes. Therefore this commit removed references to `--add-exports` from the build, switches to reflection, and adds `--add-opens` to the runtime JVM parameters.
Due to apache/maven-apache-parent#188 the property `maven.compiler.release` is now being set which precludes exporting and using any internal Java classes. Therefore this commit removed references to `--add-exports` from the build, switches to reflection, and adds `--add-opens` to the runtime JVM parameters.
Due to apache/maven-apache-parent#188 the property `maven.compiler.release` is now being set which precludes exporting and using any internal Java classes. Therefore this commit removed references to `--add-exports` from the build, switches to reflection, and adds `--add-opens` to the runtime JVM parameters.
Due to apache/maven-apache-parent#188 the property `maven.compiler.release` is now being set which precludes exporting and using any internal Java classes. Therefore this commit removed references to `--add-exports` from the build, switches to reflection, and adds `--add-opens` to the runtime JVM parameters.
Due to apache/maven-apache-parent#188 the property `maven.compiler.release` is now being set which precludes exporting and using any internal Java classes. Therefore this commit removed references to `--add-exports` from the build, switches to reflection, and adds `--add-opens` to the runtime JVM parameters.
Due to apache/maven-apache-parent#188 the property `maven.compiler.release` is now being set which precludes exporting and using any internal Java classes. Therefore this commit removed references to `--add-exports` from the build, switches to reflection, and adds `--add-opens` to the runtime JVM parameters. (cherry picked from commit eac816f)
No description provided.