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

[MPOM-264] Set "maven.compiler.release" on JDK 9+ #188

Merged
merged 4 commits into from
Jan 16, 2024

Conversation

kwin
Copy link
Member

@kwin kwin commented Jan 15, 2024

No description provided.

@kwin
Copy link
Member Author

kwin commented Jan 15, 2024

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

@kwin kwin requested review from hboutemy and michael-o January 15, 2024 16:32
@kwin kwin force-pushed the feature/configure-maven-compiler-release-on-JDK9+ branch from f0d7b0d to 413220e Compare January 15, 2024 18:09
<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) -->
Copy link
Member Author

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."?

Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

@kwin kwin Jan 15, 2024

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 Show resolved Hide resolved
pom.xml Outdated
@@ -525,6 +545,17 @@ under the License.
</build>
</profile>
<!-- END SNIPPET: release-profile -->
<profile>
<id>jdk9ornewer</id>
Copy link
Member

Choose a reason for hiding this comment

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

Make is simple: jdk9+?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 8ab37ce.

Copy link
Member

@slawekjaranowski slawekjaranowski left a 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"
@kwin kwin merged commit b938653 into master Jan 16, 2024
25 checks passed
@kwin kwin deleted the feature/configure-maven-compiler-release-on-JDK9+ branch January 16, 2024 09:53
jbertram added a commit to jbertram/activemq-artemis that referenced this pull request May 1, 2024
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.
jbertram added a commit to jbertram/activemq-artemis that referenced this pull request May 1, 2024
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.
jbertram added a commit to jbertram/activemq-artemis that referenced this pull request May 1, 2024
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.
jbertram added a commit to jbertram/activemq-artemis that referenced this pull request May 2, 2024
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.
jbertram added a commit to jbertram/activemq-artemis that referenced this pull request May 2, 2024
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.
jbertram added a commit to jbertram/activemq-artemis that referenced this pull request May 2, 2024
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.
jbertram added a commit to jbertram/activemq-artemis that referenced this pull request May 2, 2024
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.
jbertram added a commit to jbertram/activemq-artemis that referenced this pull request May 2, 2024
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.
jbertram added a commit to jbertram/activemq-artemis that referenced this pull request May 2, 2024
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.
jbertram added a commit to jbertram/activemq-artemis that referenced this pull request May 2, 2024
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.
jbertram added a commit to apache/activemq-artemis that referenced this pull request May 6, 2024
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.
clebertsuconic pushed a commit to clebertsuconic/activemq-artemis that referenced this pull request Jun 3, 2024
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)
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.

3 participants