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

Clarify how to pass javac/JVM flags to the Quarkus Maven plugin #30301

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

yrodiere
Copy link
Member

@yrodiere yrodiere commented Jan 11, 2023

Fixes #8802 by documenting the solution -- there's nothing Quarkus itself can do about this.

Note the quarkus-hibernate-orm no longer loads classes during the build, so you can't reproduce the problem with that extension anymore. I wasn't able to reproduce it with JDK 17 either; I suspect JDK 17 handles --enable-preview in a smarter way, and ignores the option for files that do not rely on preview features.

Here's the easiest way I found to reproduce the problem:

  • Clone the quickstarts
  • cd hibernate-orm-rest-data-panache-quickstart
  • Change the configuration of maven-compiler-plugin: use source/target = 13 and add <compilerArgs><compilerArg>--enable-preview</compilerArg></compilerArgs>
  • Run ./mvnw clean install -DskipTests with JDK 13
  • Boom.

Setting MAVEN_OPTS=--enable-preview does indeed solve the problem.

@gsmet gsmet merged commit 3b87297 into quarkusio:main Jan 11, 2023
@quarkus-bot quarkus-bot bot added this to the 2.17 - main milestone Jan 11, 2023
@gsmet gsmet modified the milestones: 2.17 - main, 2.16.0.Final Jan 17, 2023
@yrodiere yrodiere deleted the i8802-maven-opts branch August 7, 2023 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build fail with --enable-preview and hibernate-orm
2 participants