Closed mcollovati closed 11 months ago
Requires vaadin/quarkus#119 to be merged
It can be tested locally after building the platform with the following command
mvn io.quarkus.platform:quarkus-maven-plugin:3.0.1.Final:create \
-DprojectGroupId=org.acme -DprojectArtifactId=getting-started \
-Dextensions='com.vaadin:vaadin-quarkus-extension:24.1-SNAPSHOT' \
-DwithCodestart -Dexample=vaadin-flow-codestart
If accepted, the change should be ported on 24.0 and 23.3
Good job @mcollovati once more with Quarkus! Checking the changes by eyeballs the changes seem safe to me. Unfortunately could not test as I got some platform build errors following this doc (which is very nice btw):
[INFO] Creating a new development mode bundle. This can take a while but will only run when the project setup is changed, addons are added or frontend files are modified
[ERROR] Command `/Users/pczuczor/.nvm/versions/node/v18.12.1/bin/node /Users/pczuczor/Projects/platform/vaadin-dev-bundle/node_modules/vite/bin/vite.js build` failed:
vite v4.3.7 building for production...
transforming...
✓ 293 modules transformed.
✓ built in 839ms
[vite]: Rollup failed to resolve import "@vaadin/field-base/src/styles/sr-only-styles.js" from "/Users/pczuczor/Projects/platform/vaadin-dev-bundle/node_modules/@vaadin/select/src/vaadin-select.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
error during build:
Error: [vite]: Rollup failed to resolve import "@vaadin/field-base/src/styles/sr-only-styles.js" from "/Users/pczuczor/Projects/platform/vaadin-dev-bundle/node_modules/@vaadin/select/src/vaadin-select.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
at viteWarn (file:///Users/pczuczor/Projects/platform/vaadin-dev-bundle/node_modules/vite/dist/node/chunks/dep-1f986b87.js:46597:23)
at onwarn (file:///Users/pczuczor/Projects/platform/vaadin-dev-bundle/vite.config.ts.timestamp-1684476159143-3a6c2535c188e.mjs:1159:11)
at onRollupWarning (file:///Users/pczuczor/Projects/platform/vaadin-dev-bundle/node_modules/vite/dist/node/chunks/dep-1f986b87.js:46618:9)
at onwarn (file:///Users/pczuczor/Projects/platform/vaadin-dev-bundle/node_modules/vite/dist/node/chunks/dep-1f986b87.js:46368:13)
at Object.onwarn (file:///Users/pczuczor/Projects/platform/vaadin-dev-bundle/node_modules/rollup/dist/es/shared/node-entry.js:25346:13)
at ModuleLoader.handleInvalidResolvedId (file:///Users/pczuczor/Projects/platform/vaadin-dev-bundle/node_modules/rollup/dist/es/shared/node-entry.js:23981:26)
at file:///Users/pczuczor/Projects/platform/vaadin-dev-bundle/node_modules/rollup/dist/es/shared/node-entry.js:23941:26
It would be good to have this merged so that we can then update the coordinates on Quarkus catalog and provide a working application example when creating new projects with Quarkus tooling.
@manolo or @ZheSun88 do you mind taking a look?
now the validation works. but when i run the provided way to generate the quarkus project, the vaadin.version inside the generated pom is still unspecified.
<vaadin.version>${vaadin.version}</vaadin.version>
Marco:
It seems like the problem is have the codestart in the same directory for add-on and platform-addon
So it is not predictable what you will get
now everything is working.. let us merge after validation.
The vaadin-quarkus artifact provides a codestart that provides a minimal Vaadin application when the extension is selected during a Quarkus project creation. However, that artifact has no knowledge of platform version so the codestart cannot add the necessary dependencies to the pom file. This changes generates a copy of the codestart artifact for the vaadin-quarkus-extension, pinning the platform version in the codestart metadata, to allow the correct creation of the project.