-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add support for native image build #189
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
Conversation
Adds support for native image build by registering classes for reflection and patching Atmosphere. Fixes #157
|
The Servlet 6 API patches can be removed if we update our Atmosphere fork to that version of the specification. |
|
The code has been taken and adapted from https://github.com/mcollovati/quarkus-hilla |
|
It can be tested on the integration test modules or on the Quarkus starter by running I tested it only on Linux. Needs to be tested on Windows and Mac. The PR applies the same reflection hints present in the |
deployment/src/main/java/com/vaadin/quarkus/deployment/VaadinQuarkusNativeProcessor.java
Outdated
Show resolved
Hide resolved
| .includePatterns( | ||
| "META-INF/maven/com.github.mcollovati/quarkus-hilla-commons/pom\\.properties") |
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.
Is this pom required?
If so could we have it as a com.vaadin package instead?
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.
Good catch. The path must be updated.
The point is to include it in the native image for methods like Platform.getVaadinVersion()
It can probably be removed, if the methods are used only in dev mode.
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.
fixed
Co-authored-by: caalador <[email protected]>
|
caalador
left a comment
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 could build a native image of the production it-test module in quarkus with windows, but did meet with oracle/graal issue 9727
and had to do the build as mvn package -Pproduction -Dquarkus.package.type=native -Dquarkus.native.additional-build-args=-J-Djdk.console=jdk.base
mshabarov
left a comment
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.
Tested successfully with GraalVM CE 23.0.2+7.1 on mac with the production test module.
|
This ticket/PR has been released with Vaadin 24.7.0.rc2 and is also targeting the upcoming stable 24.7.0 version. |



Adds support for native image build by registering classes for reflection and patching Atmosphere.
Fixes #157