From bb25955c83a7726847848c66e530c14ecf5e7fac Mon Sep 17 00:00:00 2001 From: caalador Date: Thu, 29 Feb 2024 17:01:51 +0200 Subject: [PATCH] feat: Move default frontend to src/main and enable frontend fallback (#18828) Move frontend folder from root to src/main. Enable falling back to the original frontend folder if the new one doesn't exist. Closes #18436 --- .gitignore | 1 + .../flow/plugin/maven/BuildDevBundleMojo.java | 10 ++- .../com/vaadin/gradle/VaadinSmokeTest.kt | 22 +++--- .../gradle/VaadinFlowPluginExtension.kt | 4 +- .../plugin/maven/FlowModeAbstractMojo.java | 12 ++-- .../flow/plugin/maven/GenerateNpmBOMMojo.java | 3 +- .../plugin/maven/BuildFrontendMojoTest.java | 4 +- .../plugin/maven/CleanFrontendMojoTest.java | 10 +-- .../plugin/maven/PrepareFrontendMojoTest.java | 5 +- .../flow/plugin/base/BuildFrontendUtil.java | 65 +++++++++++++++--- .../plugin/base/BuildFrontendUtilTest.java | 2 +- .../flow/server/AbstractConfiguration.java | 1 - .../vaadin/flow/server/StaticFileServer.java | 5 +- .../communication/StreamRequestHandler.java | 3 +- .../flow/server/frontend/FrontendUtils.java | 54 ++++++++++----- .../flow/server/frontend/NodeUpdater.java | 1 + .../frontend/TaskUpdateThemeImport.java | 22 +++--- .../flow/server/frontend/ThemeUtils.java | 16 +++-- .../com/vaadin/flow/server/frontend/index.ts | 2 +- .../vaadin/flow/server/frontend/tsconfig.json | 3 +- .../theme-live-reload-plugin.js | 8 +-- .../flow/server/StaticFileServerTest.java | 6 ++ .../server/frontend/BundleValidationTest.java | 32 +++++---- ...ndResourcesAreCopiedAfterCleaningTest.java | 3 +- .../server/frontend/FrontendUtilsTest.java | 4 +- .../server/frontend/NodeTasksViteTest.java | 2 +- .../frontend/TaskGenerateReactFilesTest.java | 3 +- .../frontend/TaskUpdateThemeImportTest.java | 24 ++++--- .../server/frontend/TaskUpdateViteTest.java | 3 +- .../java/com/vaadin/tests/util/TestUtil.java | 13 ++-- .../test/resources/tsconfig-reference.json | 3 +- flow-tests/pom.xml | 1 + .../main}/frontend/themes/child-theme/bg.jpg | Bin .../child-theme/font/IBMPlexMono-Regular.otf | Bin .../frontend/themes/child-theme/img/gobo.png | Bin .../themes/child-theme/img/viking.png | Bin .../frontend/themes/child-theme/styles.css | 0 .../frontend/themes/child-theme/theme.json | 0 .../themes/app-theme/components/empty | 0 .../frontend/themes/app-theme/styles.css | 0 .../frontend/themes/app-theme/theme.json | 0 .../themes/parent-theme/components/empty | 0 .../frontend/themes/parent-theme/styles.css | 0 .../uitest/ui/ComponentThemeLiveReloadIT.java | 7 +- .../frontend/fonts/ostrich-sans-regular.ttf | Bin .../main}/frontend/themes/app-theme/empty | 0 .../flow/uitest/ui/ThemeLiveReloadIT.java | 7 +- .../{ => src/main}/frontend/ts-component.ts | 0 .../{ => src/main}/frontend/index.html | 0 .../{ => src/main}/frontend/index.ts | 0 .../main}/frontend/views/about/about-view.ts | 0 .../frontend/views/another/another-view.ts | 0 .../main}/frontend/views/main/main-view.ts | 0 .../{ => src/main}/frontend/another-bundle.js | 0 .../{ => src/main}/frontend/client-router.js | 0 .../main}/frontend/css-importing-test.ts | 0 .../{ => src/main}/frontend/empty.css | 0 .../{ => src/main}/frontend/index.html | 0 .../{ => src/main}/frontend/index.js | 0 .../main}/frontend/themes/my-theme/styles.css | 0 .../vaadin/flow/uitest/ui/theme/ThemeIT.java | 4 +- .../frontend/AttachExistingElementById.js | 0 .../main}/frontend/consoleLoggingProxy.js | 0 .../main}/frontend/devtools-plugin.ts | 0 .../{ => src/main}/frontend/eager.js | 0 .../main}/frontend/externalErrorTrigger.js | 0 .../components/vaadin-radio-button.css | 0 .../components/vaadin-text-field.css | 0 .../themes/embedded-theme/docImport.css | 0 .../themes/embedded-theme/document.css | 0 .../font/ostrich-sans-regular.ttf | Bin .../frontend/themes/embedded-theme/img/bg.jpg | Bin .../frontend/themes/embedded-theme/styles.css | 0 .../frontend/themes/embedded-theme/theme.json | 0 .../main}/frontend/themes/not-used/styles.css | 0 .../{ => src/main}/frontend/index.ts | 0 .../{ => src/main}/frontend/src/Dependency.js | 0 .../main}/frontend/src/themed-component.js | 0 .../frontend/theme/themed-component-style.js | 0 .../main}/frontend/theme/themed-component.js | 0 .../src/main}/frontend/web-component.html | 0 .../{ => src/main}/frontend/src/Dependency.js | 0 .../main}/frontend/src/themed-component.js | 0 .../frontend/theme/themed-component-style.js | 0 .../main}/frontend/theme/themed-component.js | 0 .../{ => src/main}/frontend/index.ts | 0 .../test-dev-bundle-frontend-add-on/pom.xml | 6 ++ .../{ => src/main}/frontend/js/test.js | 0 .../main}/frontend/styles/my-styles.css | 0 .../{ => src/main}/frontend/test.ts | 0 .../{ => src/main}/frontend/unknownfile.js | 0 .../{ => src/main}/frontend/views/another.ts | 0 .../{ => src/main}/frontend/views/lit-view.ts | 0 .../test-dev-bundle/pom.xml | 1 + .../themes/vaadin-dev-bundle/styles.css | 0 .../themes/vaadin-dev-bundle/theme.json | 0 .../themes/embedded-theme/docImport.css | 0 .../themes/embedded-theme/document.css | 0 .../font/IBMPlexMono-Regular.otf | Bin .../font/ostrich-sans-regular.ttf | Bin .../frontend/themes/embedded-theme/img/bg.jpg | Bin .../frontend/themes/embedded-theme/styles.css | 0 .../frontend/themes/embedded-theme/theme.json | 0 .../main}/frontend/themes/not-used/styles.css | 0 .../frontend/themes/specific-theme/styles.css | 0 .../frontend/themes/specific-theme/theme.json | 0 .../other-theme/other-styles/more-styles.css | 0 .../frontend/themes/other-theme/styles.css | 0 .../frontend/themes/reusable-theme/styles.css | 0 .../frontend/themes/reusable-theme/theme.json | 0 .../specific-theme/images/hilla-logo.png | Bin .../frontend/themes/specific-theme/styles.css | 0 .../frontend/themes/specific-theme/theme.json | 0 .../other-theme/other-styles/more-styles.css | 0 .../frontend/themes/other-theme/styles.css | 0 .../frontend/themes/reusable-theme/styles.css | 0 .../frontend/themes/reusable-theme/theme.json | 0 .../frontend/themes/specific-theme/styles.css | 0 .../frontend/themes/specific-theme/theme.json | 0 .../frontend/themes/specific-theme/styles.css | 0 .../frontend/themes/specific-theme/theme.json | 0 .../test-prod-bundle/pom.xml | 1 + .../{ => src/main}/frontend/index.html | 0 .../themes/vaadin-prod-bundle/styles.css | 0 .../themes/vaadin-prod-bundle/theme.json | 0 .../{ => src/main}/frontend/index.html | 0 .../my-theme/components/my-component.css | 0 .../my-theme/fonts/ostrich-sans-regular.ttf | Bin .../frontend/themes/my-theme/imported.css | 0 .../main}/frontend/themes/my-theme/styles.css | 0 .../main}/frontend/themes/my-theme/theme.json | 0 .../components/my-parent-component.css | 0 .../frontend/themes/parent-theme/styles.css | 0 .../frontend/themes/parent-theme/theme.json | 0 .../flow/devbuild/DevBundleThemeIT.java | 7 +- .../components/vaadin-horizontal-layout.css | 0 .../other-theme/other-styles/more-styles.css | 0 .../frontend/themes/other-theme/styles.css | 0 .../frontend/themes/other-theme/theme.json | 0 .../components/vaadin-horizontal-layout.css | 0 .../frontend/themes/reusable-theme/styles.css | 0 .../frontend/themes/reusable-theme/theme.json | 0 .../components/vaadin-horizontal-layout.css | 0 .../specific-theme/images/hilla-logo.png | Bin .../frontend/themes/specific-theme/styles.css | 0 .../frontend/themes/specific-theme/theme.json | 0 .../{ => src/main}/frontend/my-component.js | 0 .../{ => src/main}/frontend/my-component.js | 0 .../{ => src/main}/frontend/my-component.js | 0 .../main}/frontend/ReactComponents.tsx | 0 .../main}/frontend/a-directory/index.js | 0 .../main}/frontend/cssimport-textfield.css | 0 .../{ => src/main}/frontend/cssimport.css | 0 .../{ => src/main}/frontend/importdir.js | 0 .../{ => src/main}/frontend/index.html | 0 .../{ => src/main}/frontend/jsonloader.js | 0 .../{ => src/main}/frontend/my.json | 0 .../{ => src/main}/frontend/routes.tsx | 0 .../{ => src/main}/frontend/testfile.css.js | 0 .../main}/frontend/testscopebuttonloader.js | 0 .../main}/frontend/testscopemaploader.js | 0 .../components/vaadin-text-field.css | 0 .../themes/vite-basics/images/plant.png | Bin .../frontend/themes/vite-basics/styles.css | 0 .../frontend/themes/vite-basics/theme.json | 0 .../java/com/vaadin/viteapp/FileAccessIT.java | 7 +- .../com/vaadin/viteapp/ReactComponentsIT.java | 6 +- .../com/vaadin/viteapp/ThemeReloadIT.java | 4 +- .../themes/vite-context-path/styles.css | 0 .../themes/vite-context-path/theme.json | 0 .../{ => src/main}/frontend/index.html | 0 .../src/main}/frontend/web-component.html | 0 .../{ => src/main}/frontend/index.html | 0 .../main}/frontend/themes/my-theme/styles.css | 0 .../src/main/frontend/web-component.html | 10 +++ .../{ => src/main}/frontend/image.css | 0 .../{ => src/main}/frontend/index.html | 0 .../themes/vite-production/images/plant.png | Bin .../themes/vite-production/styles.css | 0 .../themes/vite-production/theme.json | 0 .../{ => src/main}/frontend/yes.png | Bin .../{ => src/main}/frontend/about-view.ts | 0 .../{ => src/main}/frontend/home-view.ts | 0 .../{ => src/main}/frontend/index.html | 0 .../{ => src/main}/frontend/index.ts | 0 .../themes/my-theme/fonts/Roboto-Regular.woff | Bin .../frontend/themes/my-theme/images/bg.jpeg | Bin .../main}/frontend/themes/my-theme/styles.css | 0 .../{ => src/main}/frontend/about-view.ts | 0 .../{ => src/main}/frontend/home-view.css | 0 .../{ => src/main}/frontend/home-view.ts | 0 .../{ => src/main}/frontend/index.html | 0 .../vite-pwa/{ => src/main}/frontend/index.ts | 0 .../themes/my-theme/fonts/Roboto-Regular.woff | Bin .../frontend/themes/my-theme/images/bg.jpeg | Bin .../main}/frontend/themes/my-theme/styles.css | 0 flow-tests/test-legacy-frontend/README.md | 3 + .../frontend/themes/app-theme/styles.css | 0 .../frontend/themes/app-theme/theme.json | 0 flow-tests/test-legacy-frontend/pom.xml | 56 +++++++++++++++ .../vaadin/flow/uitest/ui/theme/AppShell.java | 29 ++++++++ .../uitest/ui/theme/UtilityClassNameView.java | 32 +++++++++ .../uitest/ui/theme/UtilityClassNameIT.java | 34 +++++++++ .../main}/frontend/component-with-theme.ts | 0 .../main}/frontend/custom-component.ts | 0 .../main}/frontend/themes/mytheme/styles.css | 0 .../themes/mytheme/styles.css.original | 0 .../uitest/ui/FrontendLiveReloadView.java | 3 +- .../flow/uitest/ui/ThemeLiveReloadView.java | 6 +- .../ui/ThemeLiveReloadWithShadowRootView.java | 6 +- .../main}/frontend/consoleLoggingProxy.js | 0 .../main}/frontend/exception-logging.js | 0 .../my-theme/client-side-component.js | 0 .../my-theme/my-component-themed.js | 0 .../my-theme/npm-themed-component.js | 0 .../{ => src/main}/frontend/lazy-component.js | 0 .../{ => src/main}/frontend/my-button.js | 0 .../main}/frontend/init-listener-component.js | 0 .../{ => src/main}/frontend/my-component.js | 0 .../{ => src/main}/frontend/ReactInput.tsx | 0 .../frontend/themes/app-theme/styles.css | 0 .../frontend/themes/other-theme/styles.css | 0 .../main}/frontend/AfterServerChanges.js | 0 .../frontend/AttachExistingDomElementById.js | 0 .../main}/frontend/AttributeTemplate.js | 0 .../{ => src/main}/frontend/BasicTypeList.js | 0 .../{ => src/main}/frontend/BeanInListing.js | 0 .../ChangeInjectedComponentTextView.js | 0 .../main}/frontend/ChildIdTemplate.js | 0 .../main}/frontend/ChildOrderTemplate.js | 0 .../{ => src/main}/frontend/ChildTemplate.js | 0 .../{ => src/main}/frontend/ClearList.js | 0 .../main}/frontend/ClearNodeChildren.js | 0 .../main}/frontend/ClientUpdateMode.js | 0 .../{ => src/main}/frontend/ConvertToBean.js | 0 .../main}/frontend/DomListenerOnAttach.js | 0 .../frontend/DomRepeatPolymerTemplate.js | 0 .../main}/frontend/ElementInitOrder.js | 0 .../{ => src/main}/frontend/EmptyLists.js | 0 .../{ => src/main}/frontend/EventHandler.js | 0 .../ExceptionsDuringPropertyUpdates.js | 0 .../{ => src/main}/frontend/HiddenTemplate.js | 0 .../main}/frontend/InjectScriptTagTemplate.js | 0 .../{ => src/main}/frontend/InjectedChild.js | 0 .../main}/frontend/InjectsJsTemplate.js | 0 .../{ => src/main}/frontend/JsGrandParent.js | 0 .../main}/frontend/JsInjectedElement.js | 0 .../main}/frontend/JsInjectedGrandChild.js | 0 .../{ => src/main}/frontend/JsSubTemplate.js | 0 .../{ => src/main}/frontend/ListBinding.js | 0 .../main}/frontend/ListInsideListBinding.js | 0 .../main}/frontend/MixinInjectsElement.js | 0 .../{ => src/main}/frontend/ModelList.js | 0 .../main}/frontend/MultiplePropsMutation.js | 0 .../main}/frontend/OneWayPolymerBinding.js | 0 .../main}/frontend/ParentIdTemplate.js | 0 .../{ => src/main}/frontend/ParentTemplate.js | 0 .../frontend/ParentTemplateInjectChild.js | 0 .../frontend/PolymerDefaultPropertyValue.js | 0 .../main}/frontend/PolymerModelProperties.js | 0 .../main}/frontend/PolymerPropertyChange.js | 0 .../PolymerPropertyMutationInObserver.js | 0 .../PropertiesUpdatedBeforeChangeEvents.js | 0 .../main}/frontend/ServerModelNullList.js | 0 .../{ => src/main}/frontend/ServerRequest.js | 0 .../{ => src/main}/frontend/SetInitialText.js | 0 .../main}/frontend/SubPropertyModel.js | 0 .../main}/frontend/TemplateMappingDetector.js | 0 .../frontend/TemplateMappingDetectorParent.js | 0 .../main}/frontend/TemplateProperties.js | 0 .../TemplateWithConnectedCallbacks.js | 0 .../main}/frontend/TemplateWithInjectedId.js | 0 .../main}/frontend/TwoWayListBinding.js | 0 .../main}/frontend/TwoWayPolymerBinding.js | 0 .../frontend/UpdatableModelProperties.js | 0 .../{ => src/main}/frontend/UpgradeElement.js | 0 .../main}/frontend/a-directory/index.js | 0 .../flow/uitest/ui/CustomCustomElement.js | 0 .../flow/uitest/ui/dependencies/eager.js | 0 .../flow/uitest/ui/dependencies/inline.js | 0 .../flow/uitest/ui/dependencies/lazy.js | 0 .../frontend/components/context-inline.js | 0 .../frontend/dependencies/eager-module.js | 0 .../main}/frontend/dependencies/eager.css | 0 .../main}/frontend/dependencies/eager.js | 0 .../main}/frontend/dependencies/inline.css | 0 .../main}/frontend/dependencies/inline.js | 0 .../main}/frontend/dependencies/lazy.css | 0 .../main}/frontend/dependencies/lazy.js | 0 .../{ => src/main}/frontend/divConnector.js | 0 .../{ => src/main}/frontend/importdir.js | 0 .../main}/frontend/in-memory-connector.js | 0 .../{ => src/main}/frontend/js-get-by-id.js | 0 .../lit-templates/AnchorInTemplate.js | 0 .../lit-templates/AttributeLitTemplate.js | 0 .../lit-templates/InjectedTemplate.js | 0 .../lit-templates/InjectingTemplate.js | 0 .../frontend/lit-templates/SetInitialText.js | 0 .../lit-templates/lit-template-inner.js | 0 .../lit-templates/lit-template-outer.js | 0 .../simple-lit-template-no-shadow-root.js | 0 .../simple-lit-template-shadow-root.js | 0 .../main}/frontend/lit-templates/test-form.js | 0 .../frontend/template-scalability-panel.js | 0 .../frontend/template-scalability-view.js | 0 .../template-without-shadow-root-view.js | 0 .../{ => src/main}/frontend/x-lazy-widget.js | 0 .../com/vaadin/flow/ClientResourceIT.java | 40 +++++++---- .../main}/frontend/themes/mytheme/styles.css | 0 .../flow/uitest/ui/AbstractThemeEditorIT.java | 6 +- .../main/frontend/themes/app-theme/styles.css | 4 ++ .../main/frontend/themes/app-theme/theme.json | 1 + .../frontend/css-loading-view/cssimport.css | 0 .../{ => src/main}/frontend/index.html | 0 .../{ => src/main}/frontend/index.ts | 0 .../components/shared/background-color.css | 0 .../components/vaadin-radio-button.css | 0 .../components/vaadin-text-field.css | 0 .../app-theme/font/IBMPlexMono-Regular.otf | Bin .../app-theme/font/ostrich-sans-regular.ttf | Bin .../themes/app-theme/icons/archive.png | Bin .../frontend/themes/app-theme/img/bg.jpg | Bin .../frontend/themes/app-theme/img/dice.jpg | Bin .../frontend/themes/app-theme/styles.css | 0 .../frontend/themes/app-theme/sub-css/sub.css | 0 .../main}/frontend/themes/app-theme/theme.css | 0 .../frontend/themes/app-theme/theme.json | 0 .../frontend/themes/app-theme/unused.css | 0 .../main}/frontend/themes/no-copy/no-copy.txt | 0 .../frontend/themes/parent-theme/styles.css | 0 .../frontend/typescript/hello-world-view.css | 0 .../frontend/typescript/hello-world-view.ts | 0 .../vaadin/flow/uitest/ui/theme/ThemeIT.java | 11 ++- .../{ => src/main}/frontend/sw.ts | 0 .../{ => src/main}/frontend/benchmark.js | 0 .../{ => src/main}/frontend/simple-view.js | 0 vaadin-dev-server/export-metadata-script.ts | 4 +- vaadin-dev-server/patch-application.js | 4 +- .../{ => src/main}/frontend/License.ts | 0 .../main}/frontend/component-picker.ts | 0 .../{ => src/main}/frontend/component-util.ts | 0 .../{ => src/main}/frontend/connection.ts | 0 .../main}/frontend/copy-to-clipboard.js | 0 .../main}/frontend/live-reload-connection.ts | 0 .../{ => src/main}/frontend/shim.ts | 0 .../{ => src/main}/frontend/styles.ts | 0 .../main}/frontend/theme-editor/api.test.ts | 0 .../main}/frontend/theme-editor/api.ts | 0 .../components/class-name-editor.test.ts | 0 .../components/class-name-editor.ts | 0 .../component-overlay-manager.test.ts | 0 .../components/component-overlay-manager.ts | 0 .../components/component-resolver.ts | 0 .../editors/base-property-editor.test.ts | 0 .../editors/base-property-editor.ts | 0 .../editors/checkbox-property-editor.test.ts | 0 .../editors/checkbox-property-editor.ts | 0 .../components/editors/color-picker.test.ts | 0 .../components/editors/color-picker.ts | 0 .../editors/color-property-editor.test.ts | 0 .../editors/color-property-editor.ts | 0 .../editors/range-property-editor.test.ts | 0 .../editors/range-property-editor.ts | 0 .../editors/text-property-editor.test.ts | 0 .../editors/text-property-editor.ts | 0 .../theme-editor/components/property-list.ts | 0 .../theme-editor/components/scope-selector.ts | 0 .../frontend/theme-editor/detector.test.ts | 0 .../main}/frontend/theme-editor/detector.ts | 0 .../frontend/theme-editor/editor.test.ts | 0 .../main}/frontend/theme-editor/editor.ts | 0 .../frontend/theme-editor/history.test.ts | 0 .../main}/frontend/theme-editor/history.ts | 0 .../main}/frontend/theme-editor/icons.ts | 0 .../metadata/components/defaults.ts | 0 .../metadata/components/generic.ts | 0 .../metadata/components/presets.ts | 0 .../components/vaadin-accordion-heading.ts | 0 .../components/vaadin-accordion-panel.ts | 0 .../metadata/components/vaadin-accordion.ts | 0 .../metadata/components/vaadin-app-layout.ts | 0 .../metadata/components/vaadin-avatar.ts | 0 .../components/vaadin-big-decimal-field.ts | 0 .../metadata/components/vaadin-board-row.ts | 0 .../metadata/components/vaadin-board.ts | 0 .../metadata/components/vaadin-button.ts | 0 .../metadata/components/vaadin-chart.ts | 0 .../components/vaadin-checkbox-group.ts | 0 .../metadata/components/vaadin-checkbox.ts | 0 .../metadata/components/vaadin-combo-box.ts | 0 .../components/vaadin-confirm-dialog.ts | 0 .../components/vaadin-cookie-consent.ts | 0 .../metadata/components/vaadin-crud.ts | 0 .../components/vaadin-custom-field.ts | 0 .../metadata/components/vaadin-date-picker.ts | 0 .../components/vaadin-date-time-picker.ts | 0 .../components/vaadin-details-summary.ts | 0 .../metadata/components/vaadin-details.ts | 0 .../metadata/components/vaadin-dialog.ts | 0 .../metadata/components/vaadin-email-field.ts | 0 .../metadata/components/vaadin-form-layout.ts | 0 .../metadata/components/vaadin-grid-pro.ts | 0 .../metadata/components/vaadin-grid.ts | 0 .../components/vaadin-horizontal-layout.ts | 0 .../metadata/components/vaadin-icon.ts | 0 .../components/vaadin-integer-field.ts | 0 .../metadata/components/vaadin-list-box.ts | 0 .../metadata/components/vaadin-login-form.ts | 0 .../components/vaadin-login-overlay.ts | 0 .../metadata/components/vaadin-map.ts | 0 .../metadata/components/vaadin-menu-bar.ts | 0 .../components/vaadin-message-input.ts | 0 .../components/vaadin-message-list.ts | 0 .../vaadin-multi-select-combo-box.ts | 0 .../components/vaadin-notification.ts | 0 .../components/vaadin-number-field.ts | 0 .../components/vaadin-password-field.ts | 0 .../components/vaadin-progress-bar.ts | 0 .../metadata/components/vaadin-radio-group.ts | 0 .../components/vaadin-rich-text-editor.ts | 0 .../metadata/components/vaadin-scroller.ts | 0 .../metadata/components/vaadin-select.ts | 0 .../components/vaadin-side-nav-item.ts | 0 .../metadata/components/vaadin-side-nav.ts | 0 .../components/vaadin-split-layout.ts | 0 .../metadata/components/vaadin-spreadsheet.ts | 0 .../metadata/components/vaadin-tab.ts | 0 .../metadata/components/vaadin-tabs.ts | 0 .../metadata/components/vaadin-tabsheet.ts | 0 .../metadata/components/vaadin-text-area.ts | 0 .../metadata/components/vaadin-text-field.ts | 0 .../metadata/components/vaadin-time-picker.ts | 0 .../metadata/components/vaadin-upload.ts | 0 .../components/vaadin-vertical-layout.ts | 0 .../components/vaadin-virtual-list.ts | 0 .../frontend/theme-editor/metadata/model.ts | 0 .../theme-editor/metadata/registry.test.ts | 0 .../theme-editor/metadata/registry.ts | 0 .../main}/frontend/theme-editor/model.test.ts | 0 .../main}/frontend/theme-editor/model.ts | 0 .../frontend/theme-editor/preview.test.ts | 0 .../main}/frontend/theme-editor/preview.ts | 0 .../main}/frontend/theme-editor/styles.ts | 0 .../frontend/theme-editor/tests/utils.ts | 0 .../main}/frontend/vaadin-dev-tools-info.ts | 0 .../main}/frontend/vaadin-dev-tools-log.ts | 0 .../main}/frontend/vaadin-dev-tools.test.ts | 0 .../main}/frontend/vaadin-dev-tools.ts | 0 .../src/vaadin-overlay-position-mixin.js | 0 .../main}/frontend/websocket-connection.ts | 0 .../devserver/startup/DevModeInitializer.java | 16 ++++- .../devserver/themeeditor/ThemeModifier.java | 6 +- .../DevModeInitializerClassLoaderTest.java | 6 +- .../startup/DevModeInitializerTest.java | 4 +- vaadin-dev-server/tsconfig.json | 2 +- vaadin-dev-server/vite.config.js | 2 +- vaadin-dev-server/web-dev-server.config.mjs | 2 +- vaadin-dev-server/web-test-runner.config.mjs | 2 +- 458 files changed, 518 insertions(+), 168 deletions(-) rename flow-tests/test-application-theme/test-reusable-as-parent-vite/{ => src/main}/frontend/themes/child-theme/bg.jpg (100%) rename flow-tests/test-application-theme/test-reusable-as-parent-vite/{ => src/main}/frontend/themes/child-theme/font/IBMPlexMono-Regular.otf (100%) rename flow-tests/test-application-theme/test-reusable-as-parent-vite/{ => src/main}/frontend/themes/child-theme/img/gobo.png (100%) rename flow-tests/test-application-theme/test-reusable-as-parent-vite/{ => src/main}/frontend/themes/child-theme/img/viking.png (100%) rename flow-tests/test-application-theme/test-reusable-as-parent-vite/{ => src/main}/frontend/themes/child-theme/styles.css (100%) rename flow-tests/test-application-theme/test-reusable-as-parent-vite/{ => src/main}/frontend/themes/child-theme/theme.json (100%) rename flow-tests/test-application-theme/test-theme-component-live-reload/{ => src/main}/frontend/themes/app-theme/components/empty (100%) rename flow-tests/test-application-theme/test-theme-component-live-reload/{ => src/main}/frontend/themes/app-theme/styles.css (100%) rename flow-tests/test-application-theme/test-theme-component-live-reload/{ => src/main}/frontend/themes/app-theme/theme.json (100%) rename flow-tests/test-application-theme/test-theme-component-live-reload/{ => src/main}/frontend/themes/parent-theme/components/empty (100%) rename flow-tests/test-application-theme/test-theme-component-live-reload/{ => src/main}/frontend/themes/parent-theme/styles.css (100%) rename flow-tests/test-application-theme/test-theme-live-reload/{ => src/main}/frontend/fonts/ostrich-sans-regular.ttf (100%) rename flow-tests/test-application-theme/test-theme-live-reload/{ => src/main}/frontend/themes/app-theme/empty (100%) rename flow-tests/test-application-theme/test-theme-reusable-vite/{ => src/main}/frontend/ts-component.ts (100%) rename flow-tests/test-ccdm-flow-navigation/{ => src/main}/frontend/index.html (100%) rename flow-tests/test-ccdm-flow-navigation/{ => src/main}/frontend/index.ts (100%) rename flow-tests/test-ccdm-flow-navigation/{ => src/main}/frontend/views/about/about-view.ts (100%) rename flow-tests/test-ccdm-flow-navigation/{ => src/main}/frontend/views/another/another-view.ts (100%) rename flow-tests/test-ccdm-flow-navigation/{ => src/main}/frontend/views/main/main-view.ts (100%) rename flow-tests/test-ccdm/{ => src/main}/frontend/another-bundle.js (100%) rename flow-tests/test-ccdm/{ => src/main}/frontend/client-router.js (100%) rename flow-tests/test-ccdm/{ => src/main}/frontend/css-importing-test.ts (100%) rename flow-tests/test-ccdm/{ => src/main}/frontend/empty.css (100%) rename flow-tests/test-ccdm/{ => src/main}/frontend/index.html (100%) rename flow-tests/test-ccdm/{ => src/main}/frontend/index.js (100%) rename flow-tests/test-ccdm/{ => src/main}/frontend/themes/my-theme/styles.css (100%) rename flow-tests/test-dev-mode/{ => src/main}/frontend/AttachExistingElementById.js (100%) rename flow-tests/test-dev-mode/{ => src/main}/frontend/consoleLoggingProxy.js (100%) rename flow-tests/test-dev-mode/{ => src/main}/frontend/devtools-plugin.ts (100%) rename flow-tests/test-dev-mode/{ => src/main}/frontend/eager.js (100%) rename flow-tests/test-dev-mode/{ => src/main}/frontend/externalErrorTrigger.js (100%) rename flow-tests/test-embedding/test-embedding-application-theme/{ => src/main}/frontend/themes/embedded-theme/components/vaadin-radio-button.css (100%) rename flow-tests/test-embedding/test-embedding-application-theme/{ => src/main}/frontend/themes/embedded-theme/components/vaadin-text-field.css (100%) rename flow-tests/test-embedding/test-embedding-application-theme/{ => src/main}/frontend/themes/embedded-theme/docImport.css (100%) rename flow-tests/test-embedding/test-embedding-application-theme/{ => src/main}/frontend/themes/embedded-theme/document.css (100%) rename flow-tests/test-embedding/test-embedding-application-theme/{ => src/main}/frontend/themes/embedded-theme/font/ostrich-sans-regular.ttf (100%) rename flow-tests/test-embedding/test-embedding-application-theme/{ => src/main}/frontend/themes/embedded-theme/img/bg.jpg (100%) rename flow-tests/test-embedding/test-embedding-application-theme/{ => src/main}/frontend/themes/embedded-theme/styles.css (100%) rename flow-tests/test-embedding/test-embedding-application-theme/{ => src/main}/frontend/themes/embedded-theme/theme.json (100%) rename flow-tests/test-embedding/test-embedding-application-theme/{ => src/main}/frontend/themes/not-used/styles.css (100%) rename flow-tests/test-embedding/test-embedding-generic/{ => src/main}/frontend/index.ts (100%) rename flow-tests/test-embedding/test-embedding-generic/{ => src/main}/frontend/src/Dependency.js (100%) rename flow-tests/test-embedding/test-embedding-generic/{ => src/main}/frontend/src/themed-component.js (100%) rename flow-tests/test-embedding/test-embedding-generic/{ => src/main}/frontend/theme/themed-component-style.js (100%) rename flow-tests/test-embedding/test-embedding-generic/{ => src/main}/frontend/theme/themed-component.js (100%) rename flow-tests/{test-frontend/vite-embedded-webcomponent-resync => test-embedding/test-embedding-generic/src/main}/frontend/web-component.html (100%) rename flow-tests/test-embedding/test-embedding-production-mode/{ => src/main}/frontend/src/Dependency.js (100%) rename flow-tests/test-embedding/test-embedding-production-mode/{ => src/main}/frontend/src/themed-component.js (100%) rename flow-tests/test-embedding/test-embedding-production-mode/{ => src/main}/frontend/theme/themed-component-style.js (100%) rename flow-tests/test-embedding/test-embedding-production-mode/{ => src/main}/frontend/theme/themed-component.js (100%) rename flow-tests/test-embedding/test-embedding-theme-variant/{ => src/main}/frontend/index.ts (100%) rename flow-tests/test-express-build/test-dev-bundle-frontend-add-on/{ => src/main}/frontend/js/test.js (100%) rename flow-tests/test-express-build/test-dev-bundle-frontend-add-on/{ => src/main}/frontend/styles/my-styles.css (100%) rename flow-tests/test-express-build/test-dev-bundle-frontend-add-on/{ => src/main}/frontend/test.ts (100%) rename flow-tests/test-express-build/test-dev-bundle-frontend-add-on/{ => src/main}/frontend/unknownfile.js (100%) rename flow-tests/test-express-build/test-dev-bundle-frontend-add-on/{ => src/main}/frontend/views/another.ts (100%) rename flow-tests/test-express-build/test-dev-bundle-frontend-add-on/{ => src/main}/frontend/views/lit-view.ts (100%) rename flow-tests/test-express-build/test-dev-bundle/{ => src/main}/frontend/themes/vaadin-dev-bundle/styles.css (100%) rename flow-tests/test-express-build/test-dev-bundle/{ => src/main}/frontend/themes/vaadin-dev-bundle/theme.json (100%) rename flow-tests/test-express-build/test-embedding-express-build/{ => src/main}/frontend/themes/embedded-theme/docImport.css (100%) rename flow-tests/test-express-build/test-embedding-express-build/{ => src/main}/frontend/themes/embedded-theme/document.css (100%) rename flow-tests/test-express-build/test-embedding-express-build/{ => src/main}/frontend/themes/embedded-theme/font/IBMPlexMono-Regular.otf (100%) rename flow-tests/test-express-build/test-embedding-express-build/{ => src/main}/frontend/themes/embedded-theme/font/ostrich-sans-regular.ttf (100%) rename flow-tests/test-express-build/test-embedding-express-build/{ => src/main}/frontend/themes/embedded-theme/img/bg.jpg (100%) rename flow-tests/test-express-build/test-embedding-express-build/{ => src/main}/frontend/themes/embedded-theme/styles.css (100%) rename flow-tests/test-express-build/test-embedding-express-build/{ => src/main}/frontend/themes/embedded-theme/theme.json (100%) rename flow-tests/test-express-build/test-embedding-express-build/{ => src/main}/frontend/themes/not-used/styles.css (100%) rename flow-tests/test-express-build/test-parent-theme-express-build/{ => src/main}/frontend/themes/specific-theme/styles.css (100%) rename flow-tests/test-express-build/test-parent-theme-express-build/{ => src/main}/frontend/themes/specific-theme/theme.json (100%) rename flow-tests/test-express-build/test-parent-theme-in-frontend-prod/{ => src/main}/frontend/themes/other-theme/other-styles/more-styles.css (100%) rename flow-tests/test-express-build/test-parent-theme-in-frontend-prod/{ => src/main}/frontend/themes/other-theme/styles.css (100%) rename flow-tests/test-express-build/test-parent-theme-in-frontend-prod/{ => src/main}/frontend/themes/reusable-theme/styles.css (100%) rename flow-tests/test-express-build/test-parent-theme-in-frontend-prod/{ => src/main}/frontend/themes/reusable-theme/theme.json (100%) rename flow-tests/test-express-build/test-parent-theme-in-frontend-prod/{ => src/main}/frontend/themes/specific-theme/images/hilla-logo.png (100%) rename flow-tests/test-express-build/test-parent-theme-in-frontend-prod/{ => src/main}/frontend/themes/specific-theme/styles.css (100%) rename flow-tests/test-express-build/test-parent-theme-in-frontend-prod/{ => src/main}/frontend/themes/specific-theme/theme.json (100%) rename flow-tests/test-express-build/test-parent-theme-in-frontend/{ => src/main}/frontend/themes/other-theme/other-styles/more-styles.css (100%) rename flow-tests/test-express-build/test-parent-theme-in-frontend/{ => src/main}/frontend/themes/other-theme/styles.css (100%) rename flow-tests/test-express-build/test-parent-theme-in-frontend/{ => src/main}/frontend/themes/reusable-theme/styles.css (100%) rename flow-tests/test-express-build/test-parent-theme-in-frontend/{ => src/main}/frontend/themes/reusable-theme/theme.json (100%) rename flow-tests/test-express-build/test-parent-theme-in-frontend/{ => src/main}/frontend/themes/specific-theme/styles.css (100%) rename flow-tests/test-express-build/test-parent-theme-in-frontend/{ => src/main}/frontend/themes/specific-theme/theme.json (100%) rename flow-tests/test-express-build/test-parent-theme-prod/{ => src/main}/frontend/themes/specific-theme/styles.css (100%) rename flow-tests/test-express-build/test-parent-theme-prod/{ => src/main}/frontend/themes/specific-theme/theme.json (100%) rename flow-tests/test-express-build/test-prod-bundle/{ => src/main}/frontend/index.html (100%) rename flow-tests/test-express-build/test-prod-bundle/{ => src/main}/frontend/themes/vaadin-prod-bundle/styles.css (100%) rename flow-tests/test-express-build/test-prod-bundle/{ => src/main}/frontend/themes/vaadin-prod-bundle/theme.json (100%) rename flow-tests/test-express-build/test-theme-dev-bundle/{ => src/main}/frontend/index.html (100%) rename flow-tests/test-express-build/test-theme-dev-bundle/{ => src/main}/frontend/themes/my-theme/components/my-component.css (100%) rename flow-tests/test-express-build/test-theme-dev-bundle/{ => src/main}/frontend/themes/my-theme/fonts/ostrich-sans-regular.ttf (100%) rename flow-tests/test-express-build/test-theme-dev-bundle/{ => src/main}/frontend/themes/my-theme/imported.css (100%) rename flow-tests/test-express-build/test-theme-dev-bundle/{ => src/main}/frontend/themes/my-theme/styles.css (100%) rename flow-tests/test-express-build/test-theme-dev-bundle/{ => src/main}/frontend/themes/my-theme/theme.json (100%) rename flow-tests/test-express-build/test-theme-dev-bundle/{ => src/main}/frontend/themes/parent-theme/components/my-parent-component.css (100%) rename flow-tests/test-express-build/test-theme-dev-bundle/{ => src/main}/frontend/themes/parent-theme/styles.css (100%) rename flow-tests/test-express-build/test-theme-dev-bundle/{ => src/main}/frontend/themes/parent-theme/theme.json (100%) rename flow-tests/test-express-build/test-theme-legacy-components-css-prod/{ => src/main}/frontend/themes/other-theme/components/vaadin-horizontal-layout.css (100%) rename flow-tests/test-express-build/test-theme-legacy-components-css-prod/{ => src/main}/frontend/themes/other-theme/other-styles/more-styles.css (100%) rename flow-tests/test-express-build/test-theme-legacy-components-css-prod/{ => src/main}/frontend/themes/other-theme/styles.css (100%) rename flow-tests/test-express-build/test-theme-legacy-components-css-prod/{ => src/main}/frontend/themes/other-theme/theme.json (100%) rename flow-tests/test-express-build/test-theme-legacy-components-css-prod/{ => src/main}/frontend/themes/reusable-theme/components/vaadin-horizontal-layout.css (100%) rename flow-tests/test-express-build/test-theme-legacy-components-css-prod/{ => src/main}/frontend/themes/reusable-theme/styles.css (100%) rename flow-tests/test-express-build/test-theme-legacy-components-css-prod/{ => src/main}/frontend/themes/reusable-theme/theme.json (100%) rename flow-tests/test-express-build/test-theme-legacy-components-css-prod/{ => src/main}/frontend/themes/specific-theme/components/vaadin-horizontal-layout.css (100%) rename flow-tests/test-express-build/test-theme-legacy-components-css-prod/{ => src/main}/frontend/themes/specific-theme/images/hilla-logo.png (100%) rename flow-tests/test-express-build/test-theme-legacy-components-css-prod/{ => src/main}/frontend/themes/specific-theme/styles.css (100%) rename flow-tests/test-express-build/test-theme-legacy-components-css-prod/{ => src/main}/frontend/themes/specific-theme/theme.json (100%) rename flow-tests/test-frontend/test-bun/{ => src/main}/frontend/my-component.js (100%) rename flow-tests/test-frontend/test-npm/{ => src/main}/frontend/my-component.js (100%) rename flow-tests/test-frontend/test-pnpm/{ => src/main}/frontend/my-component.js (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/ReactComponents.tsx (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/a-directory/index.js (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/cssimport-textfield.css (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/cssimport.css (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/importdir.js (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/index.html (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/jsonloader.js (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/my.json (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/routes.tsx (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/testfile.css.js (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/testscopebuttonloader.js (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/testscopemaploader.js (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/themes/vite-basics/components/vaadin-text-field.css (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/themes/vite-basics/images/plant.png (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/themes/vite-basics/styles.css (100%) rename flow-tests/test-frontend/vite-basics/{ => src/main}/frontend/themes/vite-basics/theme.json (100%) rename flow-tests/test-frontend/vite-context-path/{ => src/main}/frontend/themes/vite-context-path/styles.css (100%) rename flow-tests/test-frontend/vite-context-path/{ => src/main}/frontend/themes/vite-context-path/theme.json (100%) rename flow-tests/test-frontend/vite-embedded-webcomponent-resync/{ => src/main}/frontend/index.html (100%) rename flow-tests/test-frontend/{vite-embedded => vite-embedded-webcomponent-resync/src/main}/frontend/web-component.html (100%) rename flow-tests/test-frontend/vite-embedded/{ => src/main}/frontend/index.html (100%) rename flow-tests/test-frontend/vite-embedded/{ => src/main}/frontend/themes/my-theme/styles.css (100%) create mode 100644 flow-tests/test-frontend/vite-embedded/src/main/frontend/web-component.html rename flow-tests/test-frontend/vite-production/{ => src/main}/frontend/image.css (100%) rename flow-tests/test-frontend/vite-production/{ => src/main}/frontend/index.html (100%) rename flow-tests/test-frontend/vite-production/{ => src/main}/frontend/themes/vite-production/images/plant.png (100%) rename flow-tests/test-frontend/vite-production/{ => src/main}/frontend/themes/vite-production/styles.css (100%) rename flow-tests/test-frontend/vite-production/{ => src/main}/frontend/themes/vite-production/theme.json (100%) rename flow-tests/test-frontend/vite-production/{ => src/main}/frontend/yes.png (100%) rename flow-tests/test-frontend/vite-pwa-production/{ => src/main}/frontend/about-view.ts (100%) rename flow-tests/test-frontend/vite-pwa-production/{ => src/main}/frontend/home-view.ts (100%) rename flow-tests/test-frontend/vite-pwa-production/{ => src/main}/frontend/index.html (100%) rename flow-tests/test-frontend/vite-pwa-production/{ => src/main}/frontend/index.ts (100%) rename flow-tests/test-frontend/vite-pwa-production/{ => src/main}/frontend/themes/my-theme/fonts/Roboto-Regular.woff (100%) rename flow-tests/test-frontend/vite-pwa-production/{ => src/main}/frontend/themes/my-theme/images/bg.jpeg (100%) rename flow-tests/test-frontend/vite-pwa-production/{ => src/main}/frontend/themes/my-theme/styles.css (100%) rename flow-tests/test-frontend/vite-pwa/{ => src/main}/frontend/about-view.ts (100%) rename flow-tests/test-frontend/vite-pwa/{ => src/main}/frontend/home-view.css (100%) rename flow-tests/test-frontend/vite-pwa/{ => src/main}/frontend/home-view.ts (100%) rename flow-tests/test-frontend/vite-pwa/{ => src/main}/frontend/index.html (100%) rename flow-tests/test-frontend/vite-pwa/{ => src/main}/frontend/index.ts (100%) rename flow-tests/test-frontend/vite-pwa/{ => src/main}/frontend/themes/my-theme/fonts/Roboto-Regular.woff (100%) rename flow-tests/test-frontend/vite-pwa/{ => src/main}/frontend/themes/my-theme/images/bg.jpeg (100%) rename flow-tests/test-frontend/vite-pwa/{ => src/main}/frontend/themes/my-theme/styles.css (100%) create mode 100644 flow-tests/test-legacy-frontend/README.md rename flow-tests/{test-theme-no-polymer => test-legacy-frontend}/frontend/themes/app-theme/styles.css (100%) rename flow-tests/{test-theme-no-polymer => test-legacy-frontend}/frontend/themes/app-theme/theme.json (100%) create mode 100644 flow-tests/test-legacy-frontend/pom.xml create mode 100644 flow-tests/test-legacy-frontend/src/main/java/com/vaadin/flow/uitest/ui/theme/AppShell.java create mode 100644 flow-tests/test-legacy-frontend/src/main/java/com/vaadin/flow/uitest/ui/theme/UtilityClassNameView.java create mode 100644 flow-tests/test-legacy-frontend/src/test/java/com/vaadin/flow/uitest/ui/theme/UtilityClassNameIT.java rename flow-tests/test-live-reload/{ => src/main}/frontend/component-with-theme.ts (100%) rename flow-tests/test-live-reload/{ => src/main}/frontend/custom-component.ts (100%) rename flow-tests/test-live-reload/{ => src/main}/frontend/themes/mytheme/styles.css (100%) rename flow-tests/test-live-reload/{ => src/main}/frontend/themes/mytheme/styles.css.original (100%) rename flow-tests/test-misc/{ => src/main}/frontend/consoleLoggingProxy.js (100%) rename flow-tests/test-misc/{ => src/main}/frontend/exception-logging.js (100%) rename flow-tests/test-misc/{ => src/main}/frontend/legacyTheme/my-theme/client-side-component.js (100%) rename flow-tests/test-misc/{ => src/main}/frontend/legacyTheme/my-theme/my-component-themed.js (100%) rename flow-tests/test-misc/{ => src/main}/frontend/legacyTheme/my-theme/npm-themed-component.js (100%) rename flow-tests/test-npm-only-features/test-npm-bytecode-scanning/{ => src/main}/frontend/lazy-component.js (100%) rename flow-tests/test-npm-only-features/test-npm-bytecode-scanning/{ => src/main}/frontend/my-button.js (100%) rename flow-tests/test-npm-only-features/test-npm-general/{ => src/main}/frontend/init-listener-component.js (100%) rename flow-tests/test-npm-only-features/test-npm-general/{ => src/main}/frontend/my-component.js (100%) rename flow-tests/test-react-adapter/{ => src/main}/frontend/ReactInput.tsx (100%) rename flow-tests/test-redeployment/{ => src/main}/frontend/themes/app-theme/styles.css (100%) rename flow-tests/test-redeployment/{ => src/main}/frontend/themes/other-theme/styles.css (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/AfterServerChanges.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/AttachExistingDomElementById.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/AttributeTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/BasicTypeList.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/BeanInListing.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ChangeInjectedComponentTextView.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ChildIdTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ChildOrderTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ChildTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ClearList.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ClearNodeChildren.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ClientUpdateMode.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ConvertToBean.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/DomListenerOnAttach.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/DomRepeatPolymerTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ElementInitOrder.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/EmptyLists.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/EventHandler.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ExceptionsDuringPropertyUpdates.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/HiddenTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/InjectScriptTagTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/InjectedChild.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/InjectsJsTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/JsGrandParent.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/JsInjectedElement.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/JsInjectedGrandChild.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/JsSubTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ListBinding.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ListInsideListBinding.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/MixinInjectsElement.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ModelList.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/MultiplePropsMutation.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/OneWayPolymerBinding.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ParentIdTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ParentTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ParentTemplateInjectChild.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/PolymerDefaultPropertyValue.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/PolymerModelProperties.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/PolymerPropertyChange.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/PolymerPropertyMutationInObserver.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/PropertiesUpdatedBeforeChangeEvents.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ServerModelNullList.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/ServerRequest.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/SetInitialText.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/SubPropertyModel.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/TemplateMappingDetector.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/TemplateMappingDetectorParent.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/TemplateProperties.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/TemplateWithConnectedCallbacks.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/TemplateWithInjectedId.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/TwoWayListBinding.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/TwoWayPolymerBinding.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/UpdatableModelProperties.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/UpgradeElement.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/a-directory/index.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/com/vaadin/flow/uitest/ui/CustomCustomElement.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/com/vaadin/flow/uitest/ui/dependencies/eager.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/com/vaadin/flow/uitest/ui/dependencies/inline.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/com/vaadin/flow/uitest/ui/dependencies/lazy.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/components/context-inline.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/dependencies/eager-module.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/dependencies/eager.css (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/dependencies/eager.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/dependencies/inline.css (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/dependencies/inline.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/dependencies/lazy.css (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/dependencies/lazy.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/divConnector.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/importdir.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/in-memory-connector.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/js-get-by-id.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/lit-templates/AnchorInTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/lit-templates/AttributeLitTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/lit-templates/InjectedTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/lit-templates/InjectingTemplate.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/lit-templates/SetInitialText.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/lit-templates/lit-template-inner.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/lit-templates/lit-template-outer.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/lit-templates/simple-lit-template-no-shadow-root.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/lit-templates/simple-lit-template-shadow-root.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/lit-templates/test-form.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/template-scalability-panel.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/template-scalability-view.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/template-without-shadow-root-view.js (100%) rename flow-tests/test-root-context/{ => src/main}/frontend/x-lazy-widget.js (100%) rename flow-tests/test-theme-editor/{ => src/main}/frontend/themes/mytheme/styles.css (100%) create mode 100644 flow-tests/test-theme-no-polymer/src/main/frontend/themes/app-theme/styles.css create mode 100644 flow-tests/test-theme-no-polymer/src/main/frontend/themes/app-theme/theme.json rename flow-tests/test-themes/{ => src/main}/frontend/css-loading-view/cssimport.css (100%) rename flow-tests/test-themes/{ => src/main}/frontend/index.html (100%) rename flow-tests/test-themes/{ => src/main}/frontend/index.ts (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/app-theme/components/shared/background-color.css (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/app-theme/components/vaadin-radio-button.css (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/app-theme/components/vaadin-text-field.css (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/app-theme/font/IBMPlexMono-Regular.otf (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/app-theme/font/ostrich-sans-regular.ttf (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/app-theme/icons/archive.png (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/app-theme/img/bg.jpg (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/app-theme/img/dice.jpg (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/app-theme/styles.css (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/app-theme/sub-css/sub.css (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/app-theme/theme.css (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/app-theme/theme.json (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/app-theme/unused.css (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/no-copy/no-copy.txt (100%) rename flow-tests/test-themes/{ => src/main}/frontend/themes/parent-theme/styles.css (100%) rename flow-tests/test-themes/{ => src/main}/frontend/typescript/hello-world-view.css (100%) rename flow-tests/test-themes/{ => src/main}/frontend/typescript/hello-world-view.ts (100%) rename flow-tests/test-webpush/{ => src/main}/frontend/sw.ts (100%) rename flow-tests/vaadin-spring-tests/test-spring-boot-reload-time/{ => src/main}/frontend/benchmark.js (100%) rename flow-tests/vaadin-spring-tests/test-spring-white-list/{ => src/main}/frontend/simple-view.js (100%) rename vaadin-dev-server/{ => src/main}/frontend/License.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/component-picker.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/component-util.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/connection.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/copy-to-clipboard.js (100%) mode change 100755 => 100644 rename vaadin-dev-server/{ => src/main}/frontend/live-reload-connection.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/shim.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/styles.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/api.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/api.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/class-name-editor.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/class-name-editor.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/component-overlay-manager.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/component-overlay-manager.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/component-resolver.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/editors/base-property-editor.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/editors/base-property-editor.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/editors/checkbox-property-editor.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/editors/checkbox-property-editor.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/editors/color-picker.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/editors/color-picker.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/editors/color-property-editor.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/editors/color-property-editor.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/editors/range-property-editor.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/editors/range-property-editor.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/editors/text-property-editor.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/editors/text-property-editor.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/property-list.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/components/scope-selector.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/detector.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/detector.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/editor.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/editor.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/history.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/history.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/icons.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/defaults.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/generic.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/presets.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-accordion-heading.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-accordion-panel.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-accordion.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-app-layout.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-avatar.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-big-decimal-field.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-board-row.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-board.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-button.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-chart.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-checkbox-group.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-checkbox.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-combo-box.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-confirm-dialog.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-cookie-consent.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-crud.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-custom-field.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-date-picker.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-date-time-picker.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-details-summary.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-details.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-dialog.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-email-field.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-form-layout.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-grid-pro.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-grid.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-horizontal-layout.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-icon.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-integer-field.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-list-box.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-login-form.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-login-overlay.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-map.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-menu-bar.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-message-input.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-message-list.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-multi-select-combo-box.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-notification.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-number-field.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-password-field.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-progress-bar.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-radio-group.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-rich-text-editor.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-scroller.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-select.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-side-nav-item.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-side-nav.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-split-layout.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-spreadsheet.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-tab.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-tabs.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-tabsheet.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-text-area.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-text-field.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-time-picker.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-upload.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-vertical-layout.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/components/vaadin-virtual-list.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/model.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/registry.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/metadata/registry.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/model.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/model.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/preview.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/preview.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/styles.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/theme-editor/tests/utils.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/vaadin-dev-tools-info.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/vaadin-dev-tools-log.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/vaadin-dev-tools.test.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/vaadin-dev-tools.ts (100%) rename vaadin-dev-server/{ => src/main}/frontend/vendor/@vaadin/overlay/src/vaadin-overlay-position-mixin.js (100%) rename vaadin-dev-server/{ => src/main}/frontend/websocket-connection.ts (100%) diff --git a/.gitignore b/.gitignore index a2ebc12e686..f690c90663d 100644 --- a/.gitignore +++ b/.gitignore @@ -98,3 +98,4 @@ vaadin-dev-server/src/main/resources/META-INF/frontend vaadin-dev-server/src/main/resources/META-INF/metadata /flow-tests/**/frontend/routes.tsx +flow-tests/**/src/main/bundles/* diff --git a/flow-plugins/flow-dev-bundle-plugin/src/main/java/com/vaadin/flow/plugin/maven/BuildDevBundleMojo.java b/flow-plugins/flow-dev-bundle-plugin/src/main/java/com/vaadin/flow/plugin/maven/BuildDevBundleMojo.java index 7e31d207251..6e42d632d4b 100644 --- a/flow-plugins/flow-dev-bundle-plugin/src/main/java/com/vaadin/flow/plugin/maven/BuildDevBundleMojo.java +++ b/flow-plugins/flow-dev-bundle-plugin/src/main/java/com/vaadin/flow/plugin/maven/BuildDevBundleMojo.java @@ -164,6 +164,12 @@ public class BuildDevBundleMojo extends AbstractMojo @Parameter(property = InitParameters.REACT_ENABLE, defaultValue = "true") private boolean reactEnable; + /** + * A directory with project's frontend source files. + */ + @Parameter(defaultValue = "${project.basedir}/src/main/" + FRONTEND) + private File frontendDirectory; + @Override public void execute() throws MojoFailureException { long start = System.nanoTime(); @@ -262,12 +268,12 @@ public boolean eagerServerLoad() { @Override public File frontendDirectory() { - return new File(projectBasedir, FRONTEND); + return frontendDirectory; } @Override public File generatedTsFolder() { - return new File(projectBasedir, FRONTEND + "/generated"); + return new File(frontendDirectory(), "generated"); } @Override diff --git a/flow-plugins/flow-gradle-plugin/src/functionalTest/kotlin/com/vaadin/gradle/VaadinSmokeTest.kt b/flow-plugins/flow-gradle-plugin/src/functionalTest/kotlin/com/vaadin/gradle/VaadinSmokeTest.kt index 2448d43d9a7..f0975a43c5b 100644 --- a/flow-plugins/flow-gradle-plugin/src/functionalTest/kotlin/com/vaadin/gradle/VaadinSmokeTest.kt +++ b/flow-plugins/flow-gradle-plugin/src/functionalTest/kotlin/com/vaadin/gradle/VaadinSmokeTest.kt @@ -135,10 +135,10 @@ class VaadinSmokeTest : AbstractGradleTest() { */ @Test fun vaadinPrepareFrontendDeletesFrontendGeneratedFolder() { - val generatedFolder = testProject.newFolder("frontend/generated") - val generatedFile = testProject.newFile("frontend/generated/index.ts") - val generatedFlowFolder = testProject.newFolder("frontend/generated/flow") - val generatedOldFlowFile = testProject.newFolder("frontend/generated/flow/extra.js") + val generatedFolder = testProject.newFolder(FrontendUtils.DEFAULT_PROJECT_FRONTEND_GENERATED_DIR) + val generatedFile = testProject.newFile(FrontendUtils.DEFAULT_PROJECT_FRONTEND_GENERATED_DIR + "index.ts") + val generatedFlowFolder = testProject.newFolder(FrontendUtils.DEFAULT_PROJECT_FRONTEND_GENERATED_DIR + "flow") + val generatedOldFlowFile = testProject.newFolder(FrontendUtils.DEFAULT_PROJECT_FRONTEND_GENERATED_DIR + "/flow/extra.js") testProject.build("vaadinPrepareFrontend") expect(true) { generatedFolder.exists() } expect(false) { generatedFile.exists() } @@ -166,8 +166,8 @@ class VaadinSmokeTest : AbstractGradleTest() { */ @Test fun vaadinCleanDeletesGeneratedFolder() { - val generatedFolder = testProject.newFolder("frontend/generated") - val generatedFile = testProject.newFile("frontend/generated/index.ts") + val generatedFolder = testProject.newFolder(FrontendUtils.DEFAULT_PROJECT_FRONTEND_GENERATED_DIR) + val generatedFile = testProject.newFile(FrontendUtils.DEFAULT_PROJECT_FRONTEND_GENERATED_DIR + "index.ts") testProject.build("vaadinClean") expect(false) { generatedFile.exists() } expect(false) { generatedFolder.exists() } @@ -317,11 +317,11 @@ class VaadinSmokeTest : AbstractGradleTest() { result.expectTaskSucceded("vaadinBuildFrontend") expect(false) { - File(testProject.dir, "frontend/generated/index.ts").exists() + File(testProject.dir, FrontendUtils.DEFAULT_PROJECT_FRONTEND_GENERATED_DIR + "index.ts").exists() } expect(true) { // Only generated for executing project or building bundle - File(testProject.dir, "src/main/frontend/generated/index.tsx").exists() + File(testProject.dir, FrontendUtils.DEFAULT_PROJECT_FRONTEND_GENERATED_DIR + "index.tsx").exists() } } @@ -365,7 +365,7 @@ class VaadinSmokeTest : AbstractGradleTest() { result.expectTaskSucceded("vaadinPrepareFrontend") result.expectTaskSucceded("vaadinBuildFrontend") - val cssFile = File(testProject.dir, "frontend/generated/jar-resources/mystyle.css") + val cssFile = File(testProject.dir, FrontendUtils.DEFAULT_PROJECT_FRONTEND_GENERATED_DIR + "jar-resources/mystyle.css") expect(true, cssFile.toString()) { cssFile.exists() } } @@ -403,7 +403,7 @@ class VaadinSmokeTest : AbstractGradleTest() { } private fun enableHilla() { - testProject.newFolder("frontend") - testProject.newFile("frontend/index.ts") + testProject.newFolder(FrontendUtils.DEFAULT_FRONTEND_DIR) + testProject.newFile(FrontendUtils.DEFAULT_FRONTEND_DIR + "index.ts") } } diff --git a/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/VaadinFlowPluginExtension.kt b/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/VaadinFlowPluginExtension.kt index c9a550d8f32..d4eebea6121 100644 --- a/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/VaadinFlowPluginExtension.kt +++ b/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/VaadinFlowPluginExtension.kt @@ -313,7 +313,7 @@ public class PluginEffectiveConfiguration( .convention(project.projectDir) public val frontendDirectory: Provider = extension.frontendDirectory - .convention(File(project.projectDir, "frontend")) + .convention(File(project.projectDir, FrontendUtils.DEFAULT_FRONTEND_DIR)) public val generateBundle: Provider = extension.generateBundle .convention(true) @@ -362,7 +362,7 @@ public class PluginEffectiveConfiguration( .convention(File(project.projectDir, "src/main/resources")) public val generatedTsFolder: Property = extension.generatedTsFolder - .convention(File(project.projectDir, "frontend/generated")) + .convention(File(frontendDirectory.get(), FrontendUtils.GENERATED)) public val nodeVersion: Property = extension.nodeVersion .convention(FrontendTools.DEFAULT_NODE_VERSION) diff --git a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FlowModeAbstractMojo.java b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FlowModeAbstractMojo.java index 4395b2f9469..8c041358d1a 100644 --- a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FlowModeAbstractMojo.java +++ b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FlowModeAbstractMojo.java @@ -18,6 +18,7 @@ import static com.vaadin.flow.server.Constants.VAADIN_SERVLET_RESOURCES; import static com.vaadin.flow.server.Constants.VAADIN_WEBAPP_RESOURCES; import static com.vaadin.flow.server.frontend.FrontendUtils.FRONTEND; +import static com.vaadin.flow.server.frontend.FrontendUtils.GENERATED; import java.io.File; import java.net.URI; @@ -74,13 +75,13 @@ public abstract class FlowModeAbstractMojo extends AbstractMojo /** * A directory with project's frontend source files. */ - @Parameter(defaultValue = "${project.basedir}/" + FRONTEND) + @Parameter(defaultValue = "${project.basedir}/src/main/" + FRONTEND) private File frontendDirectory; /** * The folder where flow will put TS API files for client projects. */ - @Parameter(defaultValue = "${project.basedir}/" + FRONTEND + "/generated") + @Parameter(defaultValue = "${null}") private File generatedTsFolder; /** @@ -298,14 +299,15 @@ public boolean eagerServerLoad() { @Override public File frontendDirectory() { - return frontendDirectory; } @Override public File generatedTsFolder() { - - return generatedTsFolder; + if (generatedTsFolder != null) { + return generatedTsFolder; + } + return new File(frontendDirectory(), GENERATED); } @Override diff --git a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/GenerateNpmBOMMojo.java b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/GenerateNpmBOMMojo.java index 7d824f2d071..702a0a8723e 100644 --- a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/GenerateNpmBOMMojo.java +++ b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/GenerateNpmBOMMojo.java @@ -211,7 +211,8 @@ private Properties getProperties() { } private boolean createDirectoryIfNotExists() { - int lastIndex = outputFilePath.lastIndexOf('/'); + int lastIndex = outputFilePath + .lastIndexOf(FrontendUtils.isWindows() ? '\\' : '/'); File directory = new File(outputFilePath.substring(0, lastIndex)); return directory.exists() || directory.mkdirs(); } diff --git a/flow-plugins/flow-maven-plugin/src/test/java/com/vaadin/flow/plugin/maven/BuildFrontendMojoTest.java b/flow-plugins/flow-maven-plugin/src/test/java/com/vaadin/flow/plugin/maven/BuildFrontendMojoTest.java index d2feb420cb0..7d0d21fbc5a 100644 --- a/flow-plugins/flow-maven-plugin/src/test/java/com/vaadin/flow/plugin/maven/BuildFrontendMojoTest.java +++ b/flow-plugins/flow-maven-plugin/src/test/java/com/vaadin/flow/plugin/maven/BuildFrontendMojoTest.java @@ -149,7 +149,7 @@ public void setup() throws Exception { defaultJavaSource = new File(".", "src/test/java"); openApiJsonFile = new File(npmFolder, "target/classes/com/vaadin/hilla/openapi.json"); - generatedTsFolder = new File(npmFolder, "frontend/generated"); + generatedTsFolder = new File(npmFolder, "src/main/frontend/generated"); Assert.assertTrue("Failed to create a test project resources", projectFrontendResourcesDirectory.mkdirs()); @@ -469,7 +469,7 @@ public void existingTokenFile_parametersShouldBeRemoved() JsonObject initialBuildInfo = Json.createObject(); initialBuildInfo.put(SERVLET_PARAMETER_PRODUCTION_MODE, false); initialBuildInfo.put(Constants.NPM_TOKEN, "npm"); - initialBuildInfo.put(Constants.FRONTEND_TOKEN, "frontend"); + initialBuildInfo.put(Constants.FRONTEND_TOKEN, "src/main/frontend"); initialBuildInfo.put(InitParameters.SERVLET_PARAMETER_ENABLE_PNPM, true); diff --git a/flow-plugins/flow-maven-plugin/src/test/java/com/vaadin/flow/plugin/maven/CleanFrontendMojoTest.java b/flow-plugins/flow-maven-plugin/src/test/java/com/vaadin/flow/plugin/maven/CleanFrontendMojoTest.java index 2964bed21d4..47213c76d1e 100644 --- a/flow-plugins/flow-maven-plugin/src/test/java/com/vaadin/flow/plugin/maven/CleanFrontendMojoTest.java +++ b/flow-plugins/flow-maven-plugin/src/test/java/com/vaadin/flow/plugin/maven/CleanFrontendMojoTest.java @@ -65,7 +65,8 @@ public void setup() throws Exception { Mockito.when(project.getBasedir()).thenReturn(projectBase); packageJson = new File(projectBase, PACKAGE_JSON).getAbsolutePath(); - frontendGenerated = new File(projectBase, "frontend/generated"); + frontendGenerated = new File(projectBase, + "src/main/frontend/generated"); ReflectionUtils.setVariableValueInObject(mojo, Constants.NPM_TOKEN, projectBase); @@ -75,7 +76,7 @@ public void setup() throws Exception { "resourceOutputDirectory", new File(projectBase, VAADIN_SERVLET_RESOURCES)); ReflectionUtils.setVariableValueInObject(mojo, "frontendDirectory", - new File(projectBase, "frontend")); + new File(projectBase, "src/main/frontend")); ReflectionUtils.setVariableValueInObject(mojo, "openApiJsonFile", new File(projectBase, @@ -301,8 +302,9 @@ private void enableHilla() throws IOException { .resolve("test-classes/com/vaadin/hilla")); Files.createFile(Paths.get(projectBase.toString(), "target").resolve( "test-classes/com/vaadin/hilla/EndpointController.class")); - Files.createDirectories(Paths.get(projectBase.toString(), "frontend")); - Files.createFile(Paths.get(projectBase.toString(), "frontend") + Files.createDirectories( + Paths.get(projectBase.toString(), "src/main/frontend")); + Files.createFile(Paths.get(projectBase.toString(), "src/main/frontend") .resolve("index.ts")); } diff --git a/flow-plugins/flow-maven-plugin/src/test/java/com/vaadin/flow/plugin/maven/PrepareFrontendMojoTest.java b/flow-plugins/flow-maven-plugin/src/test/java/com/vaadin/flow/plugin/maven/PrepareFrontendMojoTest.java index 5d8267a7165..71f29c7d203 100644 --- a/flow-plugins/flow-maven-plugin/src/test/java/com/vaadin/flow/plugin/maven/PrepareFrontendMojoTest.java +++ b/flow-plugins/flow-maven-plugin/src/test/java/com/vaadin/flow/plugin/maven/PrepareFrontendMojoTest.java @@ -102,7 +102,8 @@ public void setup() throws Exception { VAADIN_SERVLET_RESOURCES); defaultJavaSource = new File(".", "src/test/java"); defaultJavaResource = new File(".", "src/test/resources"); - generatedTsFolder = new File(projectBase, "frontend/generated"); + generatedTsFolder = new File(projectBase, + "src/main/frontend/generated"); ReflectionUtils.setVariableValueInObject(mojo, Constants.NPM_TOKEN, projectBase); @@ -111,7 +112,7 @@ public void setup() throws Exception { ReflectionUtils.setVariableValueInObject(mojo, "resourceOutputDirectory", resourceOutputDirectory); ReflectionUtils.setVariableValueInObject(mojo, "frontendDirectory", - new File(projectBase, "frontend")); + new File(projectBase, "src/main/frontend")); ReflectionUtils.setVariableValueInObject(mojo, "openApiJsonFile", new File(projectBase, diff --git a/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/BuildFrontendUtil.java b/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/BuildFrontendUtil.java index 4890ba9736c..66689fccdd8 100644 --- a/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/BuildFrontendUtil.java +++ b/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/BuildFrontendUtil.java @@ -22,7 +22,6 @@ import static com.vaadin.flow.server.Constants.FRONTEND_TOKEN; import static com.vaadin.flow.server.Constants.JAVA_RESOURCE_FOLDER_TOKEN; import static com.vaadin.flow.server.Constants.NPM_TOKEN; -import static com.vaadin.flow.server.Constants.PACKAGE_JSON; import static com.vaadin.flow.server.Constants.PROJECT_FRONTEND_GENERATED_DIR_TOKEN; import static com.vaadin.flow.server.InitParameters.FRONTEND_HOTDEPLOY; import static com.vaadin.flow.server.InitParameters.NODE_DOWNLOAD_ROOT; @@ -30,6 +29,9 @@ import static com.vaadin.flow.server.InitParameters.REACT_ENABLE; import static com.vaadin.flow.server.InitParameters.SERVLET_PARAMETER_INITIAL_UIDL; import static com.vaadin.flow.server.InitParameters.SERVLET_PARAMETER_PRODUCTION_MODE; +import static com.vaadin.flow.server.frontend.FrontendUtils.DEFAULT_FRONTEND_DIR; +import static com.vaadin.flow.server.frontend.FrontendUtils.GENERATED; +import static com.vaadin.flow.server.frontend.FrontendUtils.LEGACY_FRONTEND_DIR; import static com.vaadin.flow.server.frontend.FrontendUtils.NODE_MODULES; import static com.vaadin.flow.server.frontend.FrontendUtils.TOKEN_FILE; @@ -145,13 +147,14 @@ public static void prepareFrontend(PluginAdapterBase adapter) Lookup lookup = adapter.createLookup(classFinder); Options options = new Options(lookup, adapter.npmFolder()) - .withFrontendDirectory(adapter.frontendDirectory()) + .withFrontendDirectory(getFrontendDirectory(adapter)) .withBuildDirectory(adapter.buildFolder()) .withJarFrontendResourcesFolder( getJarFrontendResourcesFolder(adapter)) .createMissingPackageJson(true).enableImportsUpdate(false) .enablePackagesUpdate(false).withRunNpmInstall(false) - .withFrontendGeneratedFolder(adapter.generatedTsFolder()) + .withFrontendGeneratedFolder( + getGeneratedFrontendDirectory(adapter)) .withNodeVersion(adapter.nodeVersion()) .withNodeDownloadRoot(nodeDownloadRootURI) .setNodeAutoUpdate(adapter.nodeAutoUpdate()) @@ -179,7 +182,8 @@ public static void prepareFrontend(PluginAdapterBase adapter) private static File getJarFrontendResourcesFolder( PluginAdapterBase adapter) { return new File( - new File(adapter.frontendDirectory(), FrontendUtils.GENERATED), + new File(getFrontendDirectory(adapter), + FrontendUtils.GENERATED), FrontendUtils.JAR_RESOURCES_FOLDER); } @@ -228,7 +232,7 @@ public static File propagateBuildInfo(PluginAdapterBase adapter) { e); } buildInfo.put(FRONTEND_TOKEN, - adapter.frontendDirectory().getAbsolutePath()); + getFrontendDirectory(adapter).getAbsolutePath()); buildInfo.put(CONNECT_JAVA_SOURCE_FOLDER_TOKEN, adapter.javaSourceFolder().getAbsolutePath()); buildInfo.put(JAVA_RESOURCE_FOLDER_TOKEN, @@ -238,7 +242,7 @@ public static File propagateBuildInfo(PluginAdapterBase adapter) { buildInfo.put(CONNECT_OPEN_API_FILE_TOKEN, adapter.openApiJsonFile().getAbsolutePath()); buildInfo.put(PROJECT_FRONTEND_GENERATED_DIR_TOKEN, - adapter.generatedTsFolder().getAbsolutePath()); + getGeneratedFrontendDirectory(adapter).getAbsolutePath()); buildInfo.put(InitParameters.SERVLET_PARAMETER_ENABLE_PNPM, adapter.pnpmEnable()); @@ -302,7 +306,7 @@ public static void runNodeUpdater(PluginAdapterBuild adapter) try { Options options = new com.vaadin.flow.server.frontend.Options( lookup, adapter.npmFolder()) - .withFrontendDirectory(adapter.frontendDirectory()) + .withFrontendDirectory(getFrontendDirectory(adapter)) .withBuildDirectory(adapter.buildFolder()) .withRunNpmInstall(adapter.runNpmInstall()) .withWebpack(adapter.webpackOutputDirectory(), @@ -320,7 +324,8 @@ public static void runNodeUpdater(PluginAdapterBuild adapter) .withEnablePnpm(adapter.pnpmEnable()) .withEnableBun(adapter.bunEnable()) .useGlobalPnpm(adapter.useGlobalPnpm()) - .withFrontendGeneratedFolder(adapter.generatedTsFolder()) + .withFrontendGeneratedFolder( + getGeneratedFrontendDirectory(adapter)) .withHomeNodeExecRequired(adapter.requireHomeNodeExec()) .withNodeVersion(adapter.nodeVersion()) .withNodeDownloadRoot(nodeDownloadRootURI) @@ -367,7 +372,7 @@ public static void runDevBuildNodeUpdater(PluginAdapterBuild adapter) try { Options options = new com.vaadin.flow.server.frontend.Options( lookup, adapter.npmFolder()).withProductionMode(false) - .withFrontendDirectory(adapter.frontendDirectory()) + .withFrontendDirectory(getFrontendDirectory(adapter)) .withBuildDirectory(adapter.buildFolder()) .withRunNpmInstall(adapter.runNpmInstall()) .withWebpack(adapter.webpackOutputDirectory(), @@ -384,7 +389,8 @@ public static void runDevBuildNodeUpdater(PluginAdapterBuild adapter) .withEnablePnpm(adapter.pnpmEnable()) .withEnableBun(adapter.bunEnable()) .useGlobalPnpm(adapter.useGlobalPnpm()) - .withFrontendGeneratedFolder(adapter.generatedTsFolder()) + .withFrontendGeneratedFolder( + getGeneratedFrontendDirectory(adapter)) .withHomeNodeExecRequired(adapter.requireHomeNodeExec()) .withNodeVersion(adapter.nodeVersion()) .withNodeDownloadRoot(nodeDownloadRootURI) @@ -407,6 +413,45 @@ public static void runDevBuildNodeUpdater(PluginAdapterBuild adapter) } } + /** + * Get the legacy frontend folder if available and new folder doesn't exist. + * + * @param adapter + * PluginAdapterBase + * @return correct folder or legacy folder if not user defined + */ + private static File getFrontendDirectory(PluginAdapterBase adapter) { + File frontendDir = adapter.frontendDirectory(); + if (!frontendDir.exists() && frontendDir.toPath() + .endsWith(DEFAULT_FRONTEND_DIR.substring(2))) { + File legacy = new File(adapter.npmFolder(), LEGACY_FRONTEND_DIR); + if (legacy.exists()) { + return legacy; + } + } + return frontendDir; + } + + /** + * The generated folder should be under frontend folder and will be moved to + * the legacy package if not changed by the user. + * + * @param adapter + * PluginAdapterBase + * @return correct generated folder as child to frontend + */ + private static File getGeneratedFrontendDirectory( + PluginAdapterBase adapter) { + if (adapter.generatedTsFolder().toPath() + .startsWith(adapter.frontendDirectory().toPath())) { + // Possibly move frontend folder. + File frontendDirectory = getFrontendDirectory(adapter); + return new File(frontendDirectory, GENERATED); + } + // Return given generated folder + return adapter.generatedTsFolder(); + } + /** * Execute the frontend build with the wanted build system. * diff --git a/flow-plugins/flow-plugin-base/src/test/java/com/vaadin/flow/plugin/base/BuildFrontendUtilTest.java b/flow-plugins/flow-plugin-base/src/test/java/com/vaadin/flow/plugin/base/BuildFrontendUtilTest.java index 57064e35ec5..fc035a013ec 100644 --- a/flow-plugins/flow-plugin-base/src/test/java/com/vaadin/flow/plugin/base/BuildFrontendUtilTest.java +++ b/flow-plugins/flow-plugin-base/src/test/java/com/vaadin/flow/plugin/base/BuildFrontendUtilTest.java @@ -61,7 +61,7 @@ public void setup() throws IOException { adapter = Mockito.mock(PluginAdapterBuild.class); Mockito.when(adapter.npmFolder()).thenReturn(baseDir); Mockito.when(adapter.generatedTsFolder()) - .thenReturn(new File(baseDir, "frontend/generated")); + .thenReturn(new File(baseDir, "src/main/frontend/generated")); Mockito.when(adapter.projectBaseDirectory()) .thenReturn(tmpDir.getRoot().toPath()); ClassFinder classFinder = Mockito.mock(ClassFinder.class); diff --git a/flow-server/src/main/java/com/vaadin/flow/server/AbstractConfiguration.java b/flow-server/src/main/java/com/vaadin/flow/server/AbstractConfiguration.java index 219729004c2..2d4a58fdfc9 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/AbstractConfiguration.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/AbstractConfiguration.java @@ -20,7 +20,6 @@ import java.nio.file.Path; import java.nio.file.Paths; -import com.vaadin.flow.internal.hilla.EndpointRequestUtil; import com.vaadin.flow.server.frontend.BundleUtils; import com.vaadin.flow.server.frontend.FileIOUtils; import com.vaadin.flow.server.frontend.FrontendUtils; diff --git a/flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java b/flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java index 0de374dca4c..93ec132e354 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java @@ -376,9 +376,8 @@ private static URL findAssetInFrontendThemesOrDevBundle( .getDeploymentConfiguration(); // First, look for the theme assets in the {project.root}/frontend/ // themes/my-theme folder - File frontendFolder = new File( - deploymentConfiguration.getProjectFolder(), - FrontendUtils.FRONTEND); + File frontendFolder = FrontendUtils + .getProjectFrontendDir(deploymentConfiguration); File assetInFrontendThemes = new File(frontendFolder, assetPath); if (assetInFrontendThemes.exists()) { return assetInFrontendThemes.toURI().toURL(); diff --git a/flow-server/src/main/java/com/vaadin/flow/server/communication/StreamRequestHandler.java b/flow-server/src/main/java/com/vaadin/flow/server/communication/StreamRequestHandler.java index 84107f43387..b4656f2b78b 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/communication/StreamRequestHandler.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/communication/StreamRequestHandler.java @@ -33,6 +33,7 @@ import com.vaadin.flow.server.VaadinRequest; import com.vaadin.flow.server.VaadinResponse; import com.vaadin.flow.server.VaadinSession; +import com.vaadin.flow.server.frontend.FrontendUtils; import static com.vaadin.flow.server.communication.StreamReceiverHandler.DEFAULT_FILE_COUNT_MAX; import static com.vaadin.flow.server.communication.StreamReceiverHandler.DEFAULT_FILE_SIZE_MAX; @@ -159,7 +160,7 @@ public static String generateURI(String name, String id) { } private static Optional getPathUri(String path) { - int index = path.lastIndexOf('/'); + int index = path.lastIndexOf(FrontendUtils.isWindows() ? '\\' : '/'); boolean hasPrefix = index >= 0; if (!hasPrefix) { getLogger().info("Unsupported path structure, path={}", path); diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendUtils.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendUtils.java index 0fe5ba5c8cf..7aa67852721 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendUtils.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendUtils.java @@ -109,9 +109,19 @@ public class FrontendUtils { * Path of the folder containing application frontend source files, it needs * to be relative to the {@link FrontendUtils#DEFAULT_NODE_DIR} * - * By default it is /frontend in the project folder. + * By default it is /src/main/frontend in the project folder. */ public static final String DEFAULT_FRONTEND_DIR = DEFAULT_NODE_DIR + + "src/main/" + FRONTEND; + + /** + * Path of the old folder containing application frontend source files, it + * needs to be relative to the {@link FrontendUtils#DEFAULT_NODE_DIR} + * + * By default the old folder is /frontend in the project + * folder. + */ + public static final String LEGACY_FRONTEND_DIR = DEFAULT_NODE_DIR + FRONTEND; /** @@ -505,8 +515,7 @@ private static Optional activeDevModeHandler( private static InputStream getFileFromFrontendDir( AbstractConfiguration config, String path) { - File file = new File(new File(config.getProjectFolder(), "frontend"), - path); + File file = new File(getProjectFrontendDir(config), path); if (file.exists()) { try { return Files.newInputStream(file.toPath()); @@ -556,7 +565,8 @@ public static InputStream getFrontendFileFromDevModeHandler( if (devModeHandler.isPresent()) { try { File frontendFile = resolveFrontendPath( - devModeHandler.get().getProjectRoot(), path); + devModeHandler.get().getProjectRoot(), + service.getDeploymentConfiguration(), path); return frontendFile == null ? null : new FileInputStream(frontendFile); } catch (IOException e) { @@ -568,19 +578,36 @@ public static InputStream getFrontendFileFromDevModeHandler( /** * Looks up the frontend resource at the given path. If the path starts with - * {@code ./}, first look in {@code frontend}, then in - * {@value FrontendUtils#JAR_RESOURCES_FOLDER}. If the path does not start - * with {@code ./}, look in {@code node_modules} instead. + * {@code ./}, first look in {@value FrontendUtils#DEFAULT_FRONTEND_DIR}, + * then in {@value FrontendUtils#JAR_RESOURCES_FOLDER}. If the path does not + * start with {@code ./}, look in {@code node_modules} instead. * * @param projectRoot * the project root folder. + * @param deploymentConfiguration + * the active deployment configuration * @param path * the file path. * @return an existing {@link File} , or null if the file doesn't exist. */ - public static File resolveFrontendPath(File projectRoot, String path) { + public static File resolveFrontendPath(File projectRoot, + DeploymentConfiguration deploymentConfiguration, String path) { return resolveFrontendPath(projectRoot, path, - new File(projectRoot, FrontendUtils.FRONTEND)); + getFrontendFolder(projectRoot, deploymentConfiguration)); + } + + private static File getFrontendFolder(File projectRoot, + AbstractConfiguration deploymentConfiguration) { + String frontendFolderPath = deploymentConfiguration.getStringProperty( + FrontendUtils.PARAM_FRONTEND_DIR, + FrontendUtils.DEFAULT_FRONTEND_DIR); + + File f = new File(frontendFolderPath); + if (f.isAbsolute()) { + return f; + } + + return new File(projectRoot, frontendFolderPath); } /** @@ -669,13 +696,8 @@ private static String buildTooOldString(String tool, String version, */ public static File getProjectFrontendDir( AbstractConfiguration configuration) { - String propertyValue = configuration - .getStringProperty(PARAM_FRONTEND_DIR, DEFAULT_FRONTEND_DIR); - File f = new File(propertyValue); - if (f.isAbsolute()) { - return f; - } - return new File(configuration.getProjectFolder(), propertyValue); + return getFrontendFolder(configuration.getProjectFolder(), + configuration); } /** diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/NodeUpdater.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/NodeUpdater.java index 7b1a6e6b96b..1f2535feaca 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/NodeUpdater.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/NodeUpdater.java @@ -171,6 +171,7 @@ JsonObject getPlatformPinnedDependencies() throws IOException { private JsonObject getFilteredVersionsFromResource(URL versionsResource, String versionsOrigin) throws IOException { JsonObject versionsJson; + try (InputStream content = versionsResource.openStream()) { VersionsJsonConverter convert = new VersionsJsonConverter( Json.parse( diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskUpdateThemeImport.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskUpdateThemeImport.java index 35a5e854467..7b640dc8ae6 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskUpdateThemeImport.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskUpdateThemeImport.java @@ -36,7 +36,7 @@ * Task generating the theme definition file 'theme.js' for importing * application theme into the generated frontend directory. * - * Default directory is ' ./frontend/generated' + * Default directory is ' ./src/main/frontend/generated' * *

* For internal use only. May be renamed or removed in a future release. @@ -45,14 +45,13 @@ */ public class TaskUpdateThemeImport implements FallibleCommand { - private static final String JAR_RESOURCES = "frontend/" - + FrontendUtils.GENERATED + FrontendUtils.JAR_RESOURCES_FOLDER; public static final String APPLICATION_META_INF_RESOURCES = "src/main/resources/META-INF/resources"; public static final String APPLICATION_STATIC_RESOURCES = "src/main/resources/static"; private static final String EXPORT_MODULES_DEF = "export declare const applyTheme: (target: Node) => void;"; private final File themeImportFile; private final File themeImportFileDefinition; + private final String generatedFolder; private final ThemeDefinition theme; private final Options options; @@ -61,6 +60,9 @@ public class TaskUpdateThemeImport implements FallibleCommand { this.options = options; File frontendGeneratedFolder = new File(options.getFrontendDirectory(), GENERATED); + generatedFolder = options.getNpmFolder().toPath() + .relativize(frontendGeneratedFolder.toPath()).toString() + .replaceAll("\\\\", "/"); themeImportFile = new File(frontendGeneratedFolder, THEME_IMPORTS_NAME); themeImportFileDefinition = new File(frontendGeneratedFolder, THEME_IMPORTS_D_TS_NAME); @@ -125,8 +127,11 @@ private void verifyThemeDirectoryExistence() if (existingAppThemeDirectories.size() >= 2) { boolean themeFoundInJar = existingAppThemeDirectories.stream() - .map(File::getPath).anyMatch(path -> path - .contains(Paths.get(JAR_RESOURCES).toString())); + .map(File::getPath) + .anyMatch(path -> path.contains(Paths + .get(generatedFolder, + FrontendUtils.JAR_RESOURCES_FOLDER) + .toString())); if (themeFoundInJar) { String errorMessage = "Theme '%s' should not exist inside a " @@ -154,7 +159,7 @@ private void verifyThemeDirectoryExistence() private List getAppThemePossiblePaths(String themePath) { String frontendTheme = String.join("/", options.getNpmFolder().toPath() .relativize(options.getFrontendDirectory().toPath()).toString(), - themePath); + themePath).replaceAll("\\\\", "/"); String themePathInMetaInfResources = String.join("/", APPLICATION_META_INF_RESOURCES, themePath); @@ -162,8 +167,9 @@ private List getAppThemePossiblePaths(String themePath) { String themePathInStaticResources = String.join("/", APPLICATION_STATIC_RESOURCES, themePath); - String themePathInClassPathResources = String.join("", JAR_RESOURCES, - "/", themePath); + String themePathInClassPathResources = String.join("", + generatedFolder + "/" + FrontendUtils.JAR_RESOURCES_FOLDER, "/", + themePath); return Arrays.asList(frontendTheme, themePathInMetaInfResources, themePathInStaticResources, themePathInClassPathResources); diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/ThemeUtils.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/ThemeUtils.java index 926cf64ec02..79a8c21cf14 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/ThemeUtils.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/ThemeUtils.java @@ -77,10 +77,18 @@ public static Optional getThemeName(VaadinContext context) { if (config.isProductionMode()) { return getThemeAnnotation(context).map(Theme::value); } else { - File themeJs = new File(config.getProjectFolder(), - FrontendUtils.FRONTEND + FrontendUtils.GENERATED - + FrontendUtils.THEME_IMPORTS_NAME); - + File themeJs; + String frontendFolderPath = config.getStringProperty( + FrontendUtils.PARAM_FRONTEND_DIR, + FrontendUtils.DEFAULT_FRONTEND_DIR); + if (frontendFolderPath.startsWith("./")) { + themeJs = Paths.get(config.getProjectFolder().getPath(), + frontendFolderPath, FrontendUtils.GENERATED, + FrontendUtils.THEME_IMPORTS_NAME).toFile(); + } else { + themeJs = Paths.get(frontendFolderPath, FrontendUtils.GENERATED, + FrontendUtils.THEME_IMPORTS_NAME).toFile(); + } if (!themeJs.exists()) { return Optional.empty(); } diff --git a/flow-server/src/main/resources/com/vaadin/flow/server/frontend/index.ts b/flow-server/src/main/resources/com/vaadin/flow/server/frontend/index.ts index 1b1823bb8e8..f8cdca344a4 100644 --- a/flow-server/src/main/resources/com/vaadin/flow/server/frontend/index.ts +++ b/flow-server/src/main/resources/com/vaadin/flow/server/frontend/index.ts @@ -2,7 +2,7 @@ * This file is auto-generated by Vaadin. * If you want to customize the entry point, you can copy this file or create * your own `index.ts` in your frontend directory. - * By default, the `index.ts` file should be in `./frontend/` folder. + * By default, the `index.ts` file should be in `./src/main/frontend/` folder. * * NOTE: * - You need to restart the dev-server after adding the new `index.ts` file. diff --git a/flow-server/src/main/resources/com/vaadin/flow/server/frontend/tsconfig.json b/flow-server/src/main/resources/com/vaadin/flow/server/frontend/tsconfig.json index 1d3096d9d6f..fbca9968dcc 100644 --- a/flow-server/src/main/resources/com/vaadin/flow/server/frontend/tsconfig.json +++ b/flow-server/src/main/resources/com/vaadin/flow/server/frontend/tsconfig.json @@ -34,6 +34,7 @@ "types.d.ts" ], "exclude": [ - "frontend/generated/jar-resources/**" + "frontend/generated/jar-resources/**", + "src/main/frontend/generated/jar-resources/**" ] } diff --git a/flow-server/src/main/resources/plugins/theme-live-reload-plugin/theme-live-reload-plugin.js b/flow-server/src/main/resources/plugins/theme-live-reload-plugin/theme-live-reload-plugin.js index 21e41562e93..8c25430573b 100644 --- a/flow-server/src/main/resources/plugins/theme-live-reload-plugin/theme-live-reload-plugin.js +++ b/flow-server/src/main/resources/plugins/theme-live-reload-plugin/theme-live-reload-plugin.js @@ -85,13 +85,11 @@ class ThemeLiveReloadPlugin { "Custom theme component style sheet '" + deletedComponentStyleFile + "' has been deleted.\n\n" + - "You should also delete './frontend/generated/theme-" + + "You should also delete './src/main/frontend/generated/theme-" + themeName + - ".generated.js' (simultaneously) with the component stylesheet'.\n" + + ".generated.js' or './frontend/generated/theme-"+themeName+".generated.js' (simultaneously) with the component stylesheet'.\n" + "Otherwise it will cause a webpack compilation error 'no such file or directory', as component style sheets are referenced from " + - "'./frontend/generated/theme-" + - themeName + - ".generated.js'.\n\n" + + "the 'theme-" + themeName + ".generated.js'.\n\n" + "If you encounter a 'no such file or directory' error in your application, just click on the overlay (or refresh the browser page), and it should disappear.\n\n" + 'It should then be possible to continue working on the application and theming.\n' + "If it doesn't help, you need to restart the application." diff --git a/flow-server/src/test/java/com/vaadin/flow/server/StaticFileServerTest.java b/flow-server/src/test/java/com/vaadin/flow/server/StaticFileServerTest.java index 56e8c269522..b73a01e7c74 100644 --- a/flow-server/src/test/java/com/vaadin/flow/server/StaticFileServerTest.java +++ b/flow-server/src/test/java/com/vaadin/flow/server/StaticFileServerTest.java @@ -78,6 +78,8 @@ import static com.vaadin.flow.server.Constants.STATISTICS_JSON_DEFAULT; import static com.vaadin.flow.server.Constants.VAADIN_SERVLET_RESOURCES; import static com.vaadin.flow.server.InitParameters.SERVLET_PARAMETER_STATISTICS_JSON; +import static com.vaadin.flow.server.frontend.FrontendUtils.DEFAULT_FRONTEND_DIR; +import static com.vaadin.flow.server.frontend.FrontendUtils.PARAM_FRONTEND_DIR; @NotThreadSafe public class StaticFileServerTest implements Serializable { @@ -1208,6 +1210,8 @@ public void serveStaticResource_projectThemeResourceRequest_serveFromFrontend() Mockito.when(configuration.getProjectFolder()) .thenReturn(projectRootFolder); Mockito.when(configuration.getBuildFolder()).thenReturn("target"); + Mockito.when(configuration.getStringProperty(PARAM_FRONTEND_DIR, + DEFAULT_FRONTEND_DIR)).thenReturn(DEFAULT_FRONTEND_DIR); setupRequestURI("", "", "/VAADIN/themes/my-theme/styles.css"); Assert.assertTrue(fileServer.serveStaticResource(request, response)); @@ -1227,6 +1231,8 @@ public void serveStaticResource_externalThemeResourceRequest_serveFromBundle() Mockito.when(configuration.getProjectFolder()) .thenReturn(projectRootFolder); Mockito.when(configuration.getBuildFolder()).thenReturn("target"); + Mockito.when(configuration.getStringProperty(PARAM_FRONTEND_DIR, + DEFAULT_FRONTEND_DIR)).thenReturn(DEFAULT_FRONTEND_DIR); setupRequestURI("", "", "/VAADIN/themes/my-theme/styles.css"); Assert.assertTrue(fileServer.serveStaticResource(request, response)); diff --git a/flow-server/src/test/java/com/vaadin/flow/server/frontend/BundleValidationTest.java b/flow-server/src/test/java/com/vaadin/flow/server/frontend/BundleValidationTest.java index 84fc219a038..b4242854096 100644 --- a/flow-server/src/test/java/com/vaadin/flow/server/frontend/BundleValidationTest.java +++ b/flow-server/src/test/java/com/vaadin/flow/server/frontend/BundleValidationTest.java @@ -43,6 +43,7 @@ import static com.vaadin.flow.server.Constants.DEV_BUNDLE_JAR_PATH; import static com.vaadin.flow.server.Constants.PROD_BUNDLE_JAR_PATH; +import static com.vaadin.flow.server.frontend.FrontendUtils.DEFAULT_FRONTEND_DIR; @RunWith(Parameterized.class) public class BundleValidationTest { @@ -977,7 +978,7 @@ public void cssImportWithInline_statsAndImportsMatchAndNoBundleRebuild() createPackageJsonStub(BLANK_PACKAGE_JSON_WITH_HASH); File stylesheetFile = new File(temporaryFolder.getRoot(), - "frontend/my-styles.css"); + DEFAULT_FRONTEND_DIR + "my-styles.css"); FileUtils.forceMkdir(stylesheetFile.getParentFile()); boolean created = stylesheetFile.createNewFile(); Assert.assertTrue(created); @@ -1107,7 +1108,8 @@ public void reusedTheme_newlyAddedTheme_noThemeJson_noBundleRebuild() // create custom-theme folder with no theme.json File jarResourcesFolder = new File(temporaryFolder.getRoot(), - "frontend/generated/jar-resources/themes/custom-theme"); + DEFAULT_FRONTEND_DIR + + "generated/jar-resources/themes/custom-theme"); boolean created = jarResourcesFolder.mkdirs(); Assert.assertTrue(created); @@ -1265,8 +1267,8 @@ public void themeJsonUpdates_containsParentTheme_noBundleRebuild() createPackageJsonStub(BLANK_PACKAGE_JSON_WITH_HASH); createProjectThemeJsonStub("{\"parent\": \"my-parent-theme\"}", "my-theme"); - new File(temporaryFolder.getRoot(), "frontend/themes/my-parent-theme") - .mkdirs(); + new File(temporaryFolder.getRoot(), + DEFAULT_FRONTEND_DIR + "themes/my-parent-theme").mkdirs(); final FrontendDependenciesScanner depScanner = Mockito .mock(FrontendDependenciesScanner.class); @@ -1301,8 +1303,8 @@ public void themeJsonUpdates_statsHasThemeJson_projectHasNoThemeJson_noBundleReb Mockito.when(themeDefinition.getName()).thenReturn("my-theme"); Mockito.when(depScanner.getThemeDefinition()) .thenReturn(themeDefinition); - new File(temporaryFolder.getRoot(), "frontend/themes/my-theme") - .mkdirs(); + new File(temporaryFolder.getRoot(), + DEFAULT_FRONTEND_DIR + "themes/my-theme").mkdirs(); JsonObject stats = getBasicStats(); stats.getObject(THEME_JSON_CONTENTS).put(bundleLocation, @@ -1488,7 +1490,8 @@ public void projectThemeComponentsCSS_contentsAdded_bundleRebuild() false, false); Assert.assertTrue( "Should rebuild when Shadow DOM Stylesheets are present " - + " in 'frontend//components' folder", + + " in '" + DEFAULT_FRONTEND_DIR + + "/components' folder", needsBuild); } @@ -1649,7 +1652,8 @@ public void projectParentInJarThemeComponentsCSS_removedFromProject_bundleRebuil public void indexTsAdded_rebuildRequired() throws IOException { createPackageJsonStub(BLANK_PACKAGE_JSON_WITH_HASH); - File frontendFolder = temporaryFolder.newFolder(FrontendUtils.FRONTEND); + File frontendFolder = temporaryFolder + .newFolder(FrontendUtils.DEFAULT_FRONTEND_DIR); File indexTs = new File(frontendFolder, FrontendUtils.INDEX_TS); indexTs.createNewFile(); @@ -1673,7 +1677,8 @@ public void indexTsAdded_rebuildRequired() throws IOException { public void changeInIndexTs_rebuildRequired() throws IOException { createPackageJsonStub("{\"dependencies\": {}, " + "\"vaadin\": { \"hash\": \"aHash\"} }"); - File frontendFolder = temporaryFolder.newFolder(FrontendUtils.FRONTEND); + File frontendFolder = temporaryFolder + .newFolder(FrontendUtils.DEFAULT_FRONTEND_DIR); File indexTs = new File(frontendFolder, FrontendUtils.INDEX_TS); indexTs.createNewFile(); @@ -2265,8 +2270,9 @@ private void createProjectThemeJsonStub(String content, String theme) private void createThemeJsonStub(String content, String theme, boolean projectTheme) throws IOException { String themeLocation = projectTheme ? "" : "generated/jar-resources/"; - File themeJson = new File(temporaryFolder.getRoot(), "frontend/" - + themeLocation + "themes/" + theme + "/theme.json"); + File themeJson = new File(temporaryFolder.getRoot(), + DEFAULT_FRONTEND_DIR + themeLocation + "themes/" + theme + + "/theme.json"); FileUtils.forceMkdir(themeJson.getParentFile()); boolean created = themeJson.createNewFile(); Assert.assertTrue(created); @@ -2275,7 +2281,7 @@ private void createThemeJsonStub(String content, String theme, private void createProjectFrontendFileStub() throws IOException { File frontendFile = new File(temporaryFolder.getRoot(), - "frontend/views/lit-view.ts"); + DEFAULT_FRONTEND_DIR + "views/lit-view.ts"); FileUtils.forceMkdir(frontendFile.getParentFile()); boolean created = frontendFile.createNewFile(); Assert.assertTrue(created); @@ -2359,7 +2365,7 @@ private boolean checkBundleRebuildForThemeComponentsCSS( + "themes/" + ((useParentTheme) ? "parent-theme" : "my-theme") + "/components/"; File stylesheetFile = new File(temporaryFolder.getRoot(), - "frontend/" + themeLocation + "vaadin-text-field.css"); + DEFAULT_FRONTEND_DIR + themeLocation + "vaadin-text-field.css"); FileUtils.forceMkdir(stylesheetFile.getParentFile()); boolean created = stylesheetFile.createNewFile(); Assert.assertTrue(created); diff --git a/flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendResourcesAreCopiedAfterCleaningTest.java b/flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendResourcesAreCopiedAfterCleaningTest.java index 421317a241d..c19afe519f8 100644 --- a/flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendResourcesAreCopiedAfterCleaningTest.java +++ b/flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendResourcesAreCopiedAfterCleaningTest.java @@ -78,7 +78,8 @@ private void assertCopiedFrontendFileAmount(int fileCount) private File getJarFrontendResourcesFolder() { return new File(npmFolder, - Paths.get("frontend", FrontendUtils.GENERATED, + Paths.get(FrontendUtils.DEFAULT_FRONTEND_DIR, + FrontendUtils.GENERATED, FrontendUtils.JAR_RESOURCES_FOLDER).toString()); } diff --git a/flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendUtilsTest.java b/flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendUtilsTest.java index 65581094219..463cfed27ce 100644 --- a/flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendUtilsTest.java +++ b/flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendUtilsTest.java @@ -501,7 +501,7 @@ public void isReactRouterRequired_doesntImportVaadinRouter_true() @Test public void isReactRouterRequired_noIndexTsFile_true() throws IOException { - File frontend = tmpDir.newFolder("frontend"); + File frontend = tmpDir.newFolder(FrontendUtils.DEFAULT_FRONTEND_DIR); Assert.assertTrue("react-router expected when index.ts isn't there", FrontendUtils.isReactRouterRequired(frontend)); } @@ -653,7 +653,7 @@ public void isHillaViewsUsed_noViews_false() throws IOException { private File prepareFrontendForRoutesFile(String fileName, String content) throws IOException { - File frontend = tmpDir.newFolder("frontend"); + File frontend = tmpDir.newFolder(FrontendUtils.DEFAULT_FRONTEND_DIR); FileUtils.write(new File(frontend, fileName), content, StandardCharsets.UTF_8); return frontend; diff --git a/flow-server/src/test/java/com/vaadin/flow/server/frontend/NodeTasksViteTest.java b/flow-server/src/test/java/com/vaadin/flow/server/frontend/NodeTasksViteTest.java index 92561598e9d..d07888deb25 100644 --- a/flow-server/src/test/java/com/vaadin/flow/server/frontend/NodeTasksViteTest.java +++ b/flow-server/src/test/java/com/vaadin/flow/server/frontend/NodeTasksViteTest.java @@ -228,7 +228,7 @@ public void should_BeAbleToCustomizeFolders() throws Exception { } private File getFrontendFolder() { - return new File(userDir, "frontend"); + return new File(userDir, FrontendUtils.DEFAULT_FRONTEND_DIR); } private File getJarFrontendResourcesFolder() { diff --git a/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskGenerateReactFilesTest.java b/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskGenerateReactFilesTest.java index c20108d2667..742f03b037f 100644 --- a/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskGenerateReactFilesTest.java +++ b/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskGenerateReactFilesTest.java @@ -57,7 +57,8 @@ public void setup() throws IOException { options = new MockOptions(classFinder, temporaryFolder.getRoot()) .withBuildDirectory("target"); - frontend = temporaryFolder.newFolder("frontend"); + frontend = temporaryFolder + .newFolder(FrontendUtils.DEFAULT_FRONTEND_DIR); options.withFrontendDirectory(frontend); routesTsx = new File(frontend, "routes.tsx"); } diff --git a/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskUpdateThemeImportTest.java b/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskUpdateThemeImportTest.java index 5f5d20dc783..d743cb973f5 100644 --- a/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskUpdateThemeImportTest.java +++ b/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskUpdateThemeImportTest.java @@ -247,8 +247,9 @@ public void taskExecuted_customThemeFolderExistsInBothFrontendAndInClasspath_thr File themeDir = new File(frontendDirectory, CUSTOM_THEME_PATH); Assert.assertTrue(themeDir.mkdirs()); - String classPathThemePath = "frontend/" + FrontendUtils.GENERATED - + FrontendUtils.JAR_RESOURCES_FOLDER + "/" + CUSTOM_THEME_PATH; + String classPathThemePath = DEFAULT_FRONTEND_DIR + + FrontendUtils.GENERATED + FrontendUtils.JAR_RESOURCES_FOLDER + + "/" + CUSTOM_THEME_PATH; File classPathThemeDir = new File(projectRoot, classPathThemePath); Assert.assertTrue(classPathThemeDir.mkdirs()); @@ -270,8 +271,9 @@ public void taskExecuted_customThemeFolderExistsInBothMetaInfResourcesAndInClass File themeDir = new File(projectRoot, metaInfResources); Assert.assertTrue(themeDir.mkdirs()); - String classPathThemePath = "frontend/" + FrontendUtils.GENERATED - + FrontendUtils.JAR_RESOURCES_FOLDER + "/" + CUSTOM_THEME_PATH; + String classPathThemePath = DEFAULT_FRONTEND_DIR + + FrontendUtils.GENERATED + FrontendUtils.JAR_RESOURCES_FOLDER + + "/" + CUSTOM_THEME_PATH; File classPathThemeDir = new File(projectRoot, classPathThemePath); Assert.assertTrue(classPathThemeDir.mkdirs()); @@ -293,8 +295,9 @@ public void taskExecuted_customThemeFolderExistsInBothStaticResourcesAndInClassp File themeDir = new File(projectRoot, staticResources); Assert.assertTrue(themeDir.mkdirs()); - String classPathThemePath = "frontend/" + FrontendUtils.GENERATED - + FrontendUtils.JAR_RESOURCES_FOLDER + "/" + CUSTOM_THEME_PATH; + String classPathThemePath = DEFAULT_FRONTEND_DIR + + FrontendUtils.GENERATED + FrontendUtils.JAR_RESOURCES_FOLDER + + "/" + CUSTOM_THEME_PATH; File classPathThemeDir = new File(projectRoot, classPathThemePath); Assert.assertTrue(classPathThemeDir.mkdirs()); @@ -406,8 +409,9 @@ public void taskExecuted_customThemeFolderExistsInFrontendAndStaticAndMetaInfRes @Test public void taskExecuted_customThemeFolderExistsInClassPathAndStaticAndMetaInfResources_throwsException() { - String classPathThemePath = "frontend/" + FrontendUtils.GENERATED - + FrontendUtils.JAR_RESOURCES_FOLDER + "/" + CUSTOM_THEME_PATH; + String classPathThemePath = DEFAULT_FRONTEND_DIR + + FrontendUtils.GENERATED + FrontendUtils.JAR_RESOURCES_FOLDER + + "/" + CUSTOM_THEME_PATH; File classPathThemeDir = new File(projectRoot, classPathThemePath); Assert.assertTrue(classPathThemeDir.mkdirs()); @@ -424,8 +428,8 @@ public void taskExecuted_customThemeFolderExistsInClassPathAndStaticAndMetaInfRe ExecutionFailedException e = Assert.assertThrows( ExecutionFailedException.class, taskUpdateThemeImport::execute); - Assert.assertTrue(e.getMessage() - .contains(String.format( + Assert.assertTrue(e.getMessage(), + e.getMessage().contains(String.format( "Theme '%s' should not exist inside a " + "jar and in the project at the same time.", CUSTOM_THEME_NAME))); diff --git a/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskUpdateViteTest.java b/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskUpdateViteTest.java index 999f2827f6f..52554890178 100644 --- a/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskUpdateViteTest.java +++ b/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskUpdateViteTest.java @@ -96,7 +96,8 @@ public void usedSettings_matchThoseCreatedToSettingsFile() String template = IOUtils.toString(generatedConfigFile.toURI(), StandardCharsets.UTF_8); - options.withFrontendDirectory(temporaryFolder.newFolder("frontend")) + options.withFrontendDirectory( + temporaryFolder.newFolder(FrontendUtils.DEFAULT_FRONTEND_DIR)) .withBuildDirectory("target").withJarFrontendResourcesFolder( temporaryFolder.newFolder("resources")); diff --git a/flow-server/src/test/java/com/vaadin/tests/util/TestUtil.java b/flow-server/src/test/java/com/vaadin/tests/util/TestUtil.java index 1baa3d48e08..1405eb3bc0d 100644 --- a/flow-server/src/test/java/com/vaadin/tests/util/TestUtil.java +++ b/flow-server/src/test/java/com/vaadin/tests/util/TestUtil.java @@ -13,7 +13,9 @@ import com.vaadin.flow.server.Constants; import com.vaadin.flow.server.communication.IndexHtmlRequestHandlerTest; +import com.vaadin.flow.server.frontend.FrontendUtils; +import static com.vaadin.flow.server.frontend.FrontendUtils.DEFAULT_FRONTEND_DIR; import static com.vaadin.flow.server.frontend.FrontendUtils.INDEX_HTML; import static com.vaadin.flow.server.frontend.FrontendUtils.THEME_IMPORTS_NAME; import static com.vaadin.flow.server.frontend.FrontendUtils.WEB_COMPONENT_HTML; @@ -99,7 +101,8 @@ public static void createStubFileInFrontend(File projectRootFolder, .getResourceAsStream("frontend/" + stubFileName)) { String indexHtmlContent = IOUtils .toString(Objects.requireNonNull(indexStream), UTF_8); - File indexHtml = new File(new File(projectRootFolder, "frontend"), + File indexHtml = new File( + new File(projectRootFolder, DEFAULT_FRONTEND_DIR), stubFileName); FileUtils.forceMkdirParent(indexHtml); FileUtils.writeStringToFile(indexHtml, indexHtmlContent, UTF_8); @@ -129,14 +132,14 @@ public static void createThemeJs(File projectRootFolder) throws IOException { String content = "import {applyTheme as _applyTheme} from './theme-my-theme.generated.js';" + "export const applyTheme = _applyTheme;"; - createStubFile(projectRootFolder, - "frontend/generated/" + THEME_IMPORTS_NAME, content); + createStubFile(projectRootFolder, FrontendUtils.DEFAULT_FRONTEND_DIR + + "generated/" + THEME_IMPORTS_NAME, content); } public static void createStyleCssStubInFrontend(File projectRootFolder, String themeName, String content) throws IOException { - createStubFile(projectRootFolder, - "frontend/themes/" + themeName + "/styles.css", content); + createStubFile(projectRootFolder, FrontendUtils.DEFAULT_FRONTEND_DIR + + "themes/" + themeName + "/styles.css", content); } public static void createStubFile(File projectRootFolder, diff --git a/flow-server/src/test/resources/tsconfig-reference.json b/flow-server/src/test/resources/tsconfig-reference.json index 1d3096d9d6f..fbca9968dcc 100644 --- a/flow-server/src/test/resources/tsconfig-reference.json +++ b/flow-server/src/test/resources/tsconfig-reference.json @@ -34,6 +34,7 @@ "types.d.ts" ], "exclude": [ - "frontend/generated/jar-resources/**" + "frontend/generated/jar-resources/**", + "src/main/frontend/generated/jar-resources/**" ] } diff --git a/flow-tests/pom.xml b/flow-tests/pom.xml index 1fc2b965f35..dd8932d946a 100644 --- a/flow-tests/pom.xml +++ b/flow-tests/pom.xml @@ -336,6 +336,7 @@ test-react-router/pom-production.xml test-react-adapter test-react-adapter/pom-production.xml + test-legacy-frontend diff --git a/flow-tests/test-application-theme/test-reusable-as-parent-vite/frontend/themes/child-theme/bg.jpg b/flow-tests/test-application-theme/test-reusable-as-parent-vite/src/main/frontend/themes/child-theme/bg.jpg similarity index 100% rename from flow-tests/test-application-theme/test-reusable-as-parent-vite/frontend/themes/child-theme/bg.jpg rename to flow-tests/test-application-theme/test-reusable-as-parent-vite/src/main/frontend/themes/child-theme/bg.jpg diff --git a/flow-tests/test-application-theme/test-reusable-as-parent-vite/frontend/themes/child-theme/font/IBMPlexMono-Regular.otf b/flow-tests/test-application-theme/test-reusable-as-parent-vite/src/main/frontend/themes/child-theme/font/IBMPlexMono-Regular.otf similarity index 100% rename from flow-tests/test-application-theme/test-reusable-as-parent-vite/frontend/themes/child-theme/font/IBMPlexMono-Regular.otf rename to flow-tests/test-application-theme/test-reusable-as-parent-vite/src/main/frontend/themes/child-theme/font/IBMPlexMono-Regular.otf diff --git a/flow-tests/test-application-theme/test-reusable-as-parent-vite/frontend/themes/child-theme/img/gobo.png b/flow-tests/test-application-theme/test-reusable-as-parent-vite/src/main/frontend/themes/child-theme/img/gobo.png similarity index 100% rename from flow-tests/test-application-theme/test-reusable-as-parent-vite/frontend/themes/child-theme/img/gobo.png rename to flow-tests/test-application-theme/test-reusable-as-parent-vite/src/main/frontend/themes/child-theme/img/gobo.png diff --git a/flow-tests/test-application-theme/test-reusable-as-parent-vite/frontend/themes/child-theme/img/viking.png b/flow-tests/test-application-theme/test-reusable-as-parent-vite/src/main/frontend/themes/child-theme/img/viking.png similarity index 100% rename from flow-tests/test-application-theme/test-reusable-as-parent-vite/frontend/themes/child-theme/img/viking.png rename to flow-tests/test-application-theme/test-reusable-as-parent-vite/src/main/frontend/themes/child-theme/img/viking.png diff --git a/flow-tests/test-application-theme/test-reusable-as-parent-vite/frontend/themes/child-theme/styles.css b/flow-tests/test-application-theme/test-reusable-as-parent-vite/src/main/frontend/themes/child-theme/styles.css similarity index 100% rename from flow-tests/test-application-theme/test-reusable-as-parent-vite/frontend/themes/child-theme/styles.css rename to flow-tests/test-application-theme/test-reusable-as-parent-vite/src/main/frontend/themes/child-theme/styles.css diff --git a/flow-tests/test-application-theme/test-reusable-as-parent-vite/frontend/themes/child-theme/theme.json b/flow-tests/test-application-theme/test-reusable-as-parent-vite/src/main/frontend/themes/child-theme/theme.json similarity index 100% rename from flow-tests/test-application-theme/test-reusable-as-parent-vite/frontend/themes/child-theme/theme.json rename to flow-tests/test-application-theme/test-reusable-as-parent-vite/src/main/frontend/themes/child-theme/theme.json diff --git a/flow-tests/test-application-theme/test-theme-component-live-reload/frontend/themes/app-theme/components/empty b/flow-tests/test-application-theme/test-theme-component-live-reload/src/main/frontend/themes/app-theme/components/empty similarity index 100% rename from flow-tests/test-application-theme/test-theme-component-live-reload/frontend/themes/app-theme/components/empty rename to flow-tests/test-application-theme/test-theme-component-live-reload/src/main/frontend/themes/app-theme/components/empty diff --git a/flow-tests/test-application-theme/test-theme-component-live-reload/frontend/themes/app-theme/styles.css b/flow-tests/test-application-theme/test-theme-component-live-reload/src/main/frontend/themes/app-theme/styles.css similarity index 100% rename from flow-tests/test-application-theme/test-theme-component-live-reload/frontend/themes/app-theme/styles.css rename to flow-tests/test-application-theme/test-theme-component-live-reload/src/main/frontend/themes/app-theme/styles.css diff --git a/flow-tests/test-application-theme/test-theme-component-live-reload/frontend/themes/app-theme/theme.json b/flow-tests/test-application-theme/test-theme-component-live-reload/src/main/frontend/themes/app-theme/theme.json similarity index 100% rename from flow-tests/test-application-theme/test-theme-component-live-reload/frontend/themes/app-theme/theme.json rename to flow-tests/test-application-theme/test-theme-component-live-reload/src/main/frontend/themes/app-theme/theme.json diff --git a/flow-tests/test-application-theme/test-theme-component-live-reload/frontend/themes/parent-theme/components/empty b/flow-tests/test-application-theme/test-theme-component-live-reload/src/main/frontend/themes/parent-theme/components/empty similarity index 100% rename from flow-tests/test-application-theme/test-theme-component-live-reload/frontend/themes/parent-theme/components/empty rename to flow-tests/test-application-theme/test-theme-component-live-reload/src/main/frontend/themes/parent-theme/components/empty diff --git a/flow-tests/test-application-theme/test-theme-component-live-reload/frontend/themes/parent-theme/styles.css b/flow-tests/test-application-theme/test-theme-component-live-reload/src/main/frontend/themes/parent-theme/styles.css similarity index 100% rename from flow-tests/test-application-theme/test-theme-component-live-reload/frontend/themes/parent-theme/styles.css rename to flow-tests/test-application-theme/test-theme-component-live-reload/src/main/frontend/themes/parent-theme/styles.css diff --git a/flow-tests/test-application-theme/test-theme-component-live-reload/src/test/java/com/vaadin/flow/uitest/ui/ComponentThemeLiveReloadIT.java b/flow-tests/test-application-theme/test-theme-component-live-reload/src/test/java/com/vaadin/flow/uitest/ui/ComponentThemeLiveReloadIT.java index c70d3c17dee..ee0e038529a 100644 --- a/flow-tests/test-application-theme/test-theme-component-live-reload/src/test/java/com/vaadin/flow/uitest/ui/ComponentThemeLiveReloadIT.java +++ b/flow-tests/test-application-theme/test-theme-component-live-reload/src/test/java/com/vaadin/flow/uitest/ui/ComponentThemeLiveReloadIT.java @@ -34,6 +34,7 @@ import org.openqa.selenium.support.ui.ExpectedCondition; import com.vaadin.flow.component.html.testbench.DivElement; +import com.vaadin.flow.server.frontend.FrontendUtils; import com.vaadin.flow.testutil.ChromeBrowserTest; import com.vaadin.testbench.TestBenchElement; @@ -47,14 +48,16 @@ public class ComponentThemeLiveReloadIT extends ChromeBrowserTest { private static final String OTHER_BORDER_RADIUS = "6px"; private static final String PARENT_BORDER_RADIUS = "9px"; - private static final String THEMES_FOLDER = "frontend/themes/"; + private static final String THEMES_FOLDER = FrontendUtils.DEFAULT_FRONTEND_DIR + + "/themes/"; private static final String CURRENT_THEME = "app-theme"; private static final String PARENT_THEME = "parent-theme"; private static final String CURRENT_THEME_FOLDER = THEMES_FOLDER + CURRENT_THEME + "/"; private static final String PARENT_THEME_FOLDER = THEMES_FOLDER + PARENT_THEME + "/"; - private static final String THEME_GENERATED_PATTERN = "frontend/generated/theme-%s.generated.js"; + private static final String THEME_GENERATED_PATTERN = FrontendUtils.DEFAULT_FRONTEND_DIR + + "/generated/theme-%s.generated.js"; private static final String COMPONENT_STYLE_SHEET = "components/vaadin-text-field.css"; private File currentThemeComponentCSSFile; diff --git a/flow-tests/test-application-theme/test-theme-live-reload/frontend/fonts/ostrich-sans-regular.ttf b/flow-tests/test-application-theme/test-theme-live-reload/src/main/frontend/fonts/ostrich-sans-regular.ttf similarity index 100% rename from flow-tests/test-application-theme/test-theme-live-reload/frontend/fonts/ostrich-sans-regular.ttf rename to flow-tests/test-application-theme/test-theme-live-reload/src/main/frontend/fonts/ostrich-sans-regular.ttf diff --git a/flow-tests/test-application-theme/test-theme-live-reload/frontend/themes/app-theme/empty b/flow-tests/test-application-theme/test-theme-live-reload/src/main/frontend/themes/app-theme/empty similarity index 100% rename from flow-tests/test-application-theme/test-theme-live-reload/frontend/themes/app-theme/empty rename to flow-tests/test-application-theme/test-theme-live-reload/src/main/frontend/themes/app-theme/empty diff --git a/flow-tests/test-application-theme/test-theme-live-reload/src/test/java/com/vaadin/flow/uitest/ui/ThemeLiveReloadIT.java b/flow-tests/test-application-theme/test-theme-live-reload/src/test/java/com/vaadin/flow/uitest/ui/ThemeLiveReloadIT.java index 7081d5762c9..98bcae06d5a 100644 --- a/flow-tests/test-application-theme/test-theme-live-reload/src/test/java/com/vaadin/flow/uitest/ui/ThemeLiveReloadIT.java +++ b/flow-tests/test-application-theme/test-theme-live-reload/src/test/java/com/vaadin/flow/uitest/ui/ThemeLiveReloadIT.java @@ -30,13 +30,15 @@ import org.openqa.selenium.StaleElementReferenceException; import org.openqa.selenium.WebElement; +import com.vaadin.flow.server.frontend.FrontendUtils; import com.vaadin.flow.testutil.ChromeBrowserTest; @NotThreadSafe public class ThemeLiveReloadIT extends ChromeBrowserTest { private static final String RED_COLOR = "rgba(255, 0, 0, 1)"; - private static final String THEME_FOLDER = "frontend/themes/app-theme/"; + private static final String THEME_FOLDER = FrontendUtils.DEFAULT_FRONTEND_DIR + + "/themes/app-theme/"; private File baseDir; private File testStylesCSSFile; @@ -156,7 +158,8 @@ private void createStylesCssWithFontAndRedBackground() { private void copyFontFile() { try { File copyFontFrom = new File(baseDir, - "frontend/fonts/ostrich-sans-regular.ttf"); + FrontendUtils.DEFAULT_FRONTEND_DIR + + "/fonts/ostrich-sans-regular.ttf"); FileUtils.copyFile(copyFontFrom, fontFile); waitUntil(driver -> fontFile.exists()); } catch (IOException e) { diff --git a/flow-tests/test-application-theme/test-theme-reusable-vite/frontend/ts-component.ts b/flow-tests/test-application-theme/test-theme-reusable-vite/src/main/frontend/ts-component.ts similarity index 100% rename from flow-tests/test-application-theme/test-theme-reusable-vite/frontend/ts-component.ts rename to flow-tests/test-application-theme/test-theme-reusable-vite/src/main/frontend/ts-component.ts diff --git a/flow-tests/test-ccdm-flow-navigation/frontend/index.html b/flow-tests/test-ccdm-flow-navigation/src/main/frontend/index.html similarity index 100% rename from flow-tests/test-ccdm-flow-navigation/frontend/index.html rename to flow-tests/test-ccdm-flow-navigation/src/main/frontend/index.html diff --git a/flow-tests/test-ccdm-flow-navigation/frontend/index.ts b/flow-tests/test-ccdm-flow-navigation/src/main/frontend/index.ts similarity index 100% rename from flow-tests/test-ccdm-flow-navigation/frontend/index.ts rename to flow-tests/test-ccdm-flow-navigation/src/main/frontend/index.ts diff --git a/flow-tests/test-ccdm-flow-navigation/frontend/views/about/about-view.ts b/flow-tests/test-ccdm-flow-navigation/src/main/frontend/views/about/about-view.ts similarity index 100% rename from flow-tests/test-ccdm-flow-navigation/frontend/views/about/about-view.ts rename to flow-tests/test-ccdm-flow-navigation/src/main/frontend/views/about/about-view.ts diff --git a/flow-tests/test-ccdm-flow-navigation/frontend/views/another/another-view.ts b/flow-tests/test-ccdm-flow-navigation/src/main/frontend/views/another/another-view.ts similarity index 100% rename from flow-tests/test-ccdm-flow-navigation/frontend/views/another/another-view.ts rename to flow-tests/test-ccdm-flow-navigation/src/main/frontend/views/another/another-view.ts diff --git a/flow-tests/test-ccdm-flow-navigation/frontend/views/main/main-view.ts b/flow-tests/test-ccdm-flow-navigation/src/main/frontend/views/main/main-view.ts similarity index 100% rename from flow-tests/test-ccdm-flow-navigation/frontend/views/main/main-view.ts rename to flow-tests/test-ccdm-flow-navigation/src/main/frontend/views/main/main-view.ts diff --git a/flow-tests/test-ccdm/frontend/another-bundle.js b/flow-tests/test-ccdm/src/main/frontend/another-bundle.js similarity index 100% rename from flow-tests/test-ccdm/frontend/another-bundle.js rename to flow-tests/test-ccdm/src/main/frontend/another-bundle.js diff --git a/flow-tests/test-ccdm/frontend/client-router.js b/flow-tests/test-ccdm/src/main/frontend/client-router.js similarity index 100% rename from flow-tests/test-ccdm/frontend/client-router.js rename to flow-tests/test-ccdm/src/main/frontend/client-router.js diff --git a/flow-tests/test-ccdm/frontend/css-importing-test.ts b/flow-tests/test-ccdm/src/main/frontend/css-importing-test.ts similarity index 100% rename from flow-tests/test-ccdm/frontend/css-importing-test.ts rename to flow-tests/test-ccdm/src/main/frontend/css-importing-test.ts diff --git a/flow-tests/test-ccdm/frontend/empty.css b/flow-tests/test-ccdm/src/main/frontend/empty.css similarity index 100% rename from flow-tests/test-ccdm/frontend/empty.css rename to flow-tests/test-ccdm/src/main/frontend/empty.css diff --git a/flow-tests/test-ccdm/frontend/index.html b/flow-tests/test-ccdm/src/main/frontend/index.html similarity index 100% rename from flow-tests/test-ccdm/frontend/index.html rename to flow-tests/test-ccdm/src/main/frontend/index.html diff --git a/flow-tests/test-ccdm/frontend/index.js b/flow-tests/test-ccdm/src/main/frontend/index.js similarity index 100% rename from flow-tests/test-ccdm/frontend/index.js rename to flow-tests/test-ccdm/src/main/frontend/index.js diff --git a/flow-tests/test-ccdm/frontend/themes/my-theme/styles.css b/flow-tests/test-ccdm/src/main/frontend/themes/my-theme/styles.css similarity index 100% rename from flow-tests/test-ccdm/frontend/themes/my-theme/styles.css rename to flow-tests/test-ccdm/src/main/frontend/themes/my-theme/styles.css diff --git a/flow-tests/test-custom-frontend-directory/test-themes-custom-frontend-directory/src/test/java/com/vaadin/flow/uitest/ui/theme/ThemeIT.java b/flow-tests/test-custom-frontend-directory/test-themes-custom-frontend-directory/src/test/java/com/vaadin/flow/uitest/ui/theme/ThemeIT.java index 80c3a26f250..6eefd92518f 100644 --- a/flow-tests/test-custom-frontend-directory/test-themes-custom-frontend-directory/src/test/java/com/vaadin/flow/uitest/ui/theme/ThemeIT.java +++ b/flow-tests/test-custom-frontend-directory/test-themes-custom-frontend-directory/src/test/java/com/vaadin/flow/uitest/ui/theme/ThemeIT.java @@ -27,6 +27,7 @@ import com.vaadin.flow.component.html.testbench.ImageElement; import com.vaadin.flow.component.html.testbench.SpanElement; +import com.vaadin.flow.server.frontend.FrontendUtils; import com.vaadin.flow.testutil.ChromeBrowserTest; import com.vaadin.testbench.TestBenchElement; @@ -286,7 +287,8 @@ public void customFrontendDirectory_generatedFilesNotInDefaultFrontendFolder() { File baseDir = new File(System.getProperty("user.dir", ".")); File expectedGeneratedFolder = new File(baseDir, "side-src/main/frontend/generated"); - File defaultGeneratedFolder = new File(baseDir, "frontend/generated"); + File defaultGeneratedFolder = new File(baseDir, + FrontendUtils.DEFAULT_FRONTEND_DIR + "generated"); String[] generatedFiles = { "theme.d.ts", "theme.js", "theme-app-theme.generated.js", diff --git a/flow-tests/test-dev-mode/frontend/AttachExistingElementById.js b/flow-tests/test-dev-mode/src/main/frontend/AttachExistingElementById.js similarity index 100% rename from flow-tests/test-dev-mode/frontend/AttachExistingElementById.js rename to flow-tests/test-dev-mode/src/main/frontend/AttachExistingElementById.js diff --git a/flow-tests/test-dev-mode/frontend/consoleLoggingProxy.js b/flow-tests/test-dev-mode/src/main/frontend/consoleLoggingProxy.js similarity index 100% rename from flow-tests/test-dev-mode/frontend/consoleLoggingProxy.js rename to flow-tests/test-dev-mode/src/main/frontend/consoleLoggingProxy.js diff --git a/flow-tests/test-dev-mode/frontend/devtools-plugin.ts b/flow-tests/test-dev-mode/src/main/frontend/devtools-plugin.ts similarity index 100% rename from flow-tests/test-dev-mode/frontend/devtools-plugin.ts rename to flow-tests/test-dev-mode/src/main/frontend/devtools-plugin.ts diff --git a/flow-tests/test-dev-mode/frontend/eager.js b/flow-tests/test-dev-mode/src/main/frontend/eager.js similarity index 100% rename from flow-tests/test-dev-mode/frontend/eager.js rename to flow-tests/test-dev-mode/src/main/frontend/eager.js diff --git a/flow-tests/test-dev-mode/frontend/externalErrorTrigger.js b/flow-tests/test-dev-mode/src/main/frontend/externalErrorTrigger.js similarity index 100% rename from flow-tests/test-dev-mode/frontend/externalErrorTrigger.js rename to flow-tests/test-dev-mode/src/main/frontend/externalErrorTrigger.js diff --git a/flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/components/vaadin-radio-button.css b/flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/components/vaadin-radio-button.css similarity index 100% rename from flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/components/vaadin-radio-button.css rename to flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/components/vaadin-radio-button.css diff --git a/flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/components/vaadin-text-field.css b/flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/components/vaadin-text-field.css similarity index 100% rename from flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/components/vaadin-text-field.css rename to flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/components/vaadin-text-field.css diff --git a/flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/docImport.css b/flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/docImport.css similarity index 100% rename from flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/docImport.css rename to flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/docImport.css diff --git a/flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/document.css b/flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/document.css similarity index 100% rename from flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/document.css rename to flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/document.css diff --git a/flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/font/ostrich-sans-regular.ttf b/flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/font/ostrich-sans-regular.ttf similarity index 100% rename from flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/font/ostrich-sans-regular.ttf rename to flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/font/ostrich-sans-regular.ttf diff --git a/flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/img/bg.jpg b/flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/img/bg.jpg similarity index 100% rename from flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/img/bg.jpg rename to flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/img/bg.jpg diff --git a/flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/styles.css b/flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/styles.css similarity index 100% rename from flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/styles.css rename to flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/styles.css diff --git a/flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/theme.json b/flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/theme.json similarity index 100% rename from flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/embedded-theme/theme.json rename to flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/embedded-theme/theme.json diff --git a/flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/not-used/styles.css b/flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/not-used/styles.css similarity index 100% rename from flow-tests/test-embedding/test-embedding-application-theme/frontend/themes/not-used/styles.css rename to flow-tests/test-embedding/test-embedding-application-theme/src/main/frontend/themes/not-used/styles.css diff --git a/flow-tests/test-embedding/test-embedding-generic/frontend/index.ts b/flow-tests/test-embedding/test-embedding-generic/src/main/frontend/index.ts similarity index 100% rename from flow-tests/test-embedding/test-embedding-generic/frontend/index.ts rename to flow-tests/test-embedding/test-embedding-generic/src/main/frontend/index.ts diff --git a/flow-tests/test-embedding/test-embedding-generic/frontend/src/Dependency.js b/flow-tests/test-embedding/test-embedding-generic/src/main/frontend/src/Dependency.js similarity index 100% rename from flow-tests/test-embedding/test-embedding-generic/frontend/src/Dependency.js rename to flow-tests/test-embedding/test-embedding-generic/src/main/frontend/src/Dependency.js diff --git a/flow-tests/test-embedding/test-embedding-generic/frontend/src/themed-component.js b/flow-tests/test-embedding/test-embedding-generic/src/main/frontend/src/themed-component.js similarity index 100% rename from flow-tests/test-embedding/test-embedding-generic/frontend/src/themed-component.js rename to flow-tests/test-embedding/test-embedding-generic/src/main/frontend/src/themed-component.js diff --git a/flow-tests/test-embedding/test-embedding-generic/frontend/theme/themed-component-style.js b/flow-tests/test-embedding/test-embedding-generic/src/main/frontend/theme/themed-component-style.js similarity index 100% rename from flow-tests/test-embedding/test-embedding-generic/frontend/theme/themed-component-style.js rename to flow-tests/test-embedding/test-embedding-generic/src/main/frontend/theme/themed-component-style.js diff --git a/flow-tests/test-embedding/test-embedding-generic/frontend/theme/themed-component.js b/flow-tests/test-embedding/test-embedding-generic/src/main/frontend/theme/themed-component.js similarity index 100% rename from flow-tests/test-embedding/test-embedding-generic/frontend/theme/themed-component.js rename to flow-tests/test-embedding/test-embedding-generic/src/main/frontend/theme/themed-component.js diff --git a/flow-tests/test-frontend/vite-embedded-webcomponent-resync/frontend/web-component.html b/flow-tests/test-embedding/test-embedding-generic/src/main/frontend/web-component.html similarity index 100% rename from flow-tests/test-frontend/vite-embedded-webcomponent-resync/frontend/web-component.html rename to flow-tests/test-embedding/test-embedding-generic/src/main/frontend/web-component.html diff --git a/flow-tests/test-embedding/test-embedding-production-mode/frontend/src/Dependency.js b/flow-tests/test-embedding/test-embedding-production-mode/src/main/frontend/src/Dependency.js similarity index 100% rename from flow-tests/test-embedding/test-embedding-production-mode/frontend/src/Dependency.js rename to flow-tests/test-embedding/test-embedding-production-mode/src/main/frontend/src/Dependency.js diff --git a/flow-tests/test-embedding/test-embedding-production-mode/frontend/src/themed-component.js b/flow-tests/test-embedding/test-embedding-production-mode/src/main/frontend/src/themed-component.js similarity index 100% rename from flow-tests/test-embedding/test-embedding-production-mode/frontend/src/themed-component.js rename to flow-tests/test-embedding/test-embedding-production-mode/src/main/frontend/src/themed-component.js diff --git a/flow-tests/test-embedding/test-embedding-production-mode/frontend/theme/themed-component-style.js b/flow-tests/test-embedding/test-embedding-production-mode/src/main/frontend/theme/themed-component-style.js similarity index 100% rename from flow-tests/test-embedding/test-embedding-production-mode/frontend/theme/themed-component-style.js rename to flow-tests/test-embedding/test-embedding-production-mode/src/main/frontend/theme/themed-component-style.js diff --git a/flow-tests/test-embedding/test-embedding-production-mode/frontend/theme/themed-component.js b/flow-tests/test-embedding/test-embedding-production-mode/src/main/frontend/theme/themed-component.js similarity index 100% rename from flow-tests/test-embedding/test-embedding-production-mode/frontend/theme/themed-component.js rename to flow-tests/test-embedding/test-embedding-production-mode/src/main/frontend/theme/themed-component.js diff --git a/flow-tests/test-embedding/test-embedding-theme-variant/frontend/index.ts b/flow-tests/test-embedding/test-embedding-theme-variant/src/main/frontend/index.ts similarity index 100% rename from flow-tests/test-embedding/test-embedding-theme-variant/frontend/index.ts rename to flow-tests/test-embedding/test-embedding-theme-variant/src/main/frontend/index.ts diff --git a/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/pom.xml b/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/pom.xml index 35f4bcb8461..b7a23cce2df 100644 --- a/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/pom.xml +++ b/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/pom.xml @@ -143,6 +143,12 @@ ** + + ${project.basedir}/src/main/frontend/generated + + ** + + diff --git a/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/frontend/js/test.js b/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/src/main/frontend/js/test.js similarity index 100% rename from flow-tests/test-express-build/test-dev-bundle-frontend-add-on/frontend/js/test.js rename to flow-tests/test-express-build/test-dev-bundle-frontend-add-on/src/main/frontend/js/test.js diff --git a/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/frontend/styles/my-styles.css b/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/src/main/frontend/styles/my-styles.css similarity index 100% rename from flow-tests/test-express-build/test-dev-bundle-frontend-add-on/frontend/styles/my-styles.css rename to flow-tests/test-express-build/test-dev-bundle-frontend-add-on/src/main/frontend/styles/my-styles.css diff --git a/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/frontend/test.ts b/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/src/main/frontend/test.ts similarity index 100% rename from flow-tests/test-express-build/test-dev-bundle-frontend-add-on/frontend/test.ts rename to flow-tests/test-express-build/test-dev-bundle-frontend-add-on/src/main/frontend/test.ts diff --git a/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/frontend/unknownfile.js b/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/src/main/frontend/unknownfile.js similarity index 100% rename from flow-tests/test-express-build/test-dev-bundle-frontend-add-on/frontend/unknownfile.js rename to flow-tests/test-express-build/test-dev-bundle-frontend-add-on/src/main/frontend/unknownfile.js diff --git a/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/frontend/views/another.ts b/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/src/main/frontend/views/another.ts similarity index 100% rename from flow-tests/test-express-build/test-dev-bundle-frontend-add-on/frontend/views/another.ts rename to flow-tests/test-express-build/test-dev-bundle-frontend-add-on/src/main/frontend/views/another.ts diff --git a/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/frontend/views/lit-view.ts b/flow-tests/test-express-build/test-dev-bundle-frontend-add-on/src/main/frontend/views/lit-view.ts similarity index 100% rename from flow-tests/test-express-build/test-dev-bundle-frontend-add-on/frontend/views/lit-view.ts rename to flow-tests/test-express-build/test-dev-bundle-frontend-add-on/src/main/frontend/views/lit-view.ts diff --git a/flow-tests/test-express-build/test-dev-bundle/pom.xml b/flow-tests/test-express-build/test-dev-bundle/pom.xml index 4e1b037c07a..2f2284d00cf 100644 --- a/flow-tests/test-express-build/test-dev-bundle/pom.xml +++ b/flow-tests/test-express-build/test-dev-bundle/pom.xml @@ -104,6 +104,7 @@ ${project.basedir}/src/main/bundles ${project.basedir}/frontend/generated + ${project.basedir}/src/main/frontend/generated diff --git a/flow-tests/test-express-build/test-dev-bundle/frontend/themes/vaadin-dev-bundle/styles.css b/flow-tests/test-express-build/test-dev-bundle/src/main/frontend/themes/vaadin-dev-bundle/styles.css similarity index 100% rename from flow-tests/test-express-build/test-dev-bundle/frontend/themes/vaadin-dev-bundle/styles.css rename to flow-tests/test-express-build/test-dev-bundle/src/main/frontend/themes/vaadin-dev-bundle/styles.css diff --git a/flow-tests/test-express-build/test-dev-bundle/frontend/themes/vaadin-dev-bundle/theme.json b/flow-tests/test-express-build/test-dev-bundle/src/main/frontend/themes/vaadin-dev-bundle/theme.json similarity index 100% rename from flow-tests/test-express-build/test-dev-bundle/frontend/themes/vaadin-dev-bundle/theme.json rename to flow-tests/test-express-build/test-dev-bundle/src/main/frontend/themes/vaadin-dev-bundle/theme.json diff --git a/flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/docImport.css b/flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/docImport.css similarity index 100% rename from flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/docImport.css rename to flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/docImport.css diff --git a/flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/document.css b/flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/document.css similarity index 100% rename from flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/document.css rename to flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/document.css diff --git a/flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/font/IBMPlexMono-Regular.otf b/flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/font/IBMPlexMono-Regular.otf similarity index 100% rename from flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/font/IBMPlexMono-Regular.otf rename to flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/font/IBMPlexMono-Regular.otf diff --git a/flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/font/ostrich-sans-regular.ttf b/flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/font/ostrich-sans-regular.ttf similarity index 100% rename from flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/font/ostrich-sans-regular.ttf rename to flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/font/ostrich-sans-regular.ttf diff --git a/flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/img/bg.jpg b/flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/img/bg.jpg similarity index 100% rename from flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/img/bg.jpg rename to flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/img/bg.jpg diff --git a/flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/styles.css b/flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/styles.css rename to flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/styles.css diff --git a/flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/theme.json b/flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/theme.json similarity index 100% rename from flow-tests/test-express-build/test-embedding-express-build/frontend/themes/embedded-theme/theme.json rename to flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/embedded-theme/theme.json diff --git a/flow-tests/test-express-build/test-embedding-express-build/frontend/themes/not-used/styles.css b/flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/not-used/styles.css similarity index 100% rename from flow-tests/test-express-build/test-embedding-express-build/frontend/themes/not-used/styles.css rename to flow-tests/test-express-build/test-embedding-express-build/src/main/frontend/themes/not-used/styles.css diff --git a/flow-tests/test-express-build/test-parent-theme-express-build/frontend/themes/specific-theme/styles.css b/flow-tests/test-express-build/test-parent-theme-express-build/src/main/frontend/themes/specific-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-express-build/frontend/themes/specific-theme/styles.css rename to flow-tests/test-express-build/test-parent-theme-express-build/src/main/frontend/themes/specific-theme/styles.css diff --git a/flow-tests/test-express-build/test-parent-theme-express-build/frontend/themes/specific-theme/theme.json b/flow-tests/test-express-build/test-parent-theme-express-build/src/main/frontend/themes/specific-theme/theme.json similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-express-build/frontend/themes/specific-theme/theme.json rename to flow-tests/test-express-build/test-parent-theme-express-build/src/main/frontend/themes/specific-theme/theme.json diff --git a/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/other-theme/other-styles/more-styles.css b/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/other-theme/other-styles/more-styles.css similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/other-theme/other-styles/more-styles.css rename to flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/other-theme/other-styles/more-styles.css diff --git a/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/other-theme/styles.css b/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/other-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/other-theme/styles.css rename to flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/other-theme/styles.css diff --git a/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/reusable-theme/styles.css b/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/reusable-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/reusable-theme/styles.css rename to flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/reusable-theme/styles.css diff --git a/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/reusable-theme/theme.json b/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/reusable-theme/theme.json similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/reusable-theme/theme.json rename to flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/reusable-theme/theme.json diff --git a/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/specific-theme/images/hilla-logo.png b/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/specific-theme/images/hilla-logo.png similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/specific-theme/images/hilla-logo.png rename to flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/specific-theme/images/hilla-logo.png diff --git a/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/specific-theme/styles.css b/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/specific-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/specific-theme/styles.css rename to flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/specific-theme/styles.css diff --git a/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/specific-theme/theme.json b/flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/specific-theme/theme.json similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-in-frontend-prod/frontend/themes/specific-theme/theme.json rename to flow-tests/test-express-build/test-parent-theme-in-frontend-prod/src/main/frontend/themes/specific-theme/theme.json diff --git a/flow-tests/test-express-build/test-parent-theme-in-frontend/frontend/themes/other-theme/other-styles/more-styles.css b/flow-tests/test-express-build/test-parent-theme-in-frontend/src/main/frontend/themes/other-theme/other-styles/more-styles.css similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-in-frontend/frontend/themes/other-theme/other-styles/more-styles.css rename to flow-tests/test-express-build/test-parent-theme-in-frontend/src/main/frontend/themes/other-theme/other-styles/more-styles.css diff --git a/flow-tests/test-express-build/test-parent-theme-in-frontend/frontend/themes/other-theme/styles.css b/flow-tests/test-express-build/test-parent-theme-in-frontend/src/main/frontend/themes/other-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-in-frontend/frontend/themes/other-theme/styles.css rename to flow-tests/test-express-build/test-parent-theme-in-frontend/src/main/frontend/themes/other-theme/styles.css diff --git a/flow-tests/test-express-build/test-parent-theme-in-frontend/frontend/themes/reusable-theme/styles.css b/flow-tests/test-express-build/test-parent-theme-in-frontend/src/main/frontend/themes/reusable-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-in-frontend/frontend/themes/reusable-theme/styles.css rename to flow-tests/test-express-build/test-parent-theme-in-frontend/src/main/frontend/themes/reusable-theme/styles.css diff --git a/flow-tests/test-express-build/test-parent-theme-in-frontend/frontend/themes/reusable-theme/theme.json b/flow-tests/test-express-build/test-parent-theme-in-frontend/src/main/frontend/themes/reusable-theme/theme.json similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-in-frontend/frontend/themes/reusable-theme/theme.json rename to flow-tests/test-express-build/test-parent-theme-in-frontend/src/main/frontend/themes/reusable-theme/theme.json diff --git a/flow-tests/test-express-build/test-parent-theme-in-frontend/frontend/themes/specific-theme/styles.css b/flow-tests/test-express-build/test-parent-theme-in-frontend/src/main/frontend/themes/specific-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-in-frontend/frontend/themes/specific-theme/styles.css rename to flow-tests/test-express-build/test-parent-theme-in-frontend/src/main/frontend/themes/specific-theme/styles.css diff --git a/flow-tests/test-express-build/test-parent-theme-in-frontend/frontend/themes/specific-theme/theme.json b/flow-tests/test-express-build/test-parent-theme-in-frontend/src/main/frontend/themes/specific-theme/theme.json similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-in-frontend/frontend/themes/specific-theme/theme.json rename to flow-tests/test-express-build/test-parent-theme-in-frontend/src/main/frontend/themes/specific-theme/theme.json diff --git a/flow-tests/test-express-build/test-parent-theme-prod/frontend/themes/specific-theme/styles.css b/flow-tests/test-express-build/test-parent-theme-prod/src/main/frontend/themes/specific-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-prod/frontend/themes/specific-theme/styles.css rename to flow-tests/test-express-build/test-parent-theme-prod/src/main/frontend/themes/specific-theme/styles.css diff --git a/flow-tests/test-express-build/test-parent-theme-prod/frontend/themes/specific-theme/theme.json b/flow-tests/test-express-build/test-parent-theme-prod/src/main/frontend/themes/specific-theme/theme.json similarity index 100% rename from flow-tests/test-express-build/test-parent-theme-prod/frontend/themes/specific-theme/theme.json rename to flow-tests/test-express-build/test-parent-theme-prod/src/main/frontend/themes/specific-theme/theme.json diff --git a/flow-tests/test-express-build/test-prod-bundle/pom.xml b/flow-tests/test-express-build/test-prod-bundle/pom.xml index 601a15fd566..6981d6bc41d 100644 --- a/flow-tests/test-express-build/test-prod-bundle/pom.xml +++ b/flow-tests/test-express-build/test-prod-bundle/pom.xml @@ -101,6 +101,7 @@ ${project.basedir}/frontend/generated + ${project.basedir}/src/main/frontend/generated diff --git a/flow-tests/test-express-build/test-prod-bundle/frontend/index.html b/flow-tests/test-express-build/test-prod-bundle/src/main/frontend/index.html similarity index 100% rename from flow-tests/test-express-build/test-prod-bundle/frontend/index.html rename to flow-tests/test-express-build/test-prod-bundle/src/main/frontend/index.html diff --git a/flow-tests/test-express-build/test-prod-bundle/frontend/themes/vaadin-prod-bundle/styles.css b/flow-tests/test-express-build/test-prod-bundle/src/main/frontend/themes/vaadin-prod-bundle/styles.css similarity index 100% rename from flow-tests/test-express-build/test-prod-bundle/frontend/themes/vaadin-prod-bundle/styles.css rename to flow-tests/test-express-build/test-prod-bundle/src/main/frontend/themes/vaadin-prod-bundle/styles.css diff --git a/flow-tests/test-express-build/test-prod-bundle/frontend/themes/vaadin-prod-bundle/theme.json b/flow-tests/test-express-build/test-prod-bundle/src/main/frontend/themes/vaadin-prod-bundle/theme.json similarity index 100% rename from flow-tests/test-express-build/test-prod-bundle/frontend/themes/vaadin-prod-bundle/theme.json rename to flow-tests/test-express-build/test-prod-bundle/src/main/frontend/themes/vaadin-prod-bundle/theme.json diff --git a/flow-tests/test-express-build/test-theme-dev-bundle/frontend/index.html b/flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/index.html similarity index 100% rename from flow-tests/test-express-build/test-theme-dev-bundle/frontend/index.html rename to flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/index.html diff --git a/flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/my-theme/components/my-component.css b/flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/my-theme/components/my-component.css similarity index 100% rename from flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/my-theme/components/my-component.css rename to flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/my-theme/components/my-component.css diff --git a/flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/my-theme/fonts/ostrich-sans-regular.ttf b/flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/my-theme/fonts/ostrich-sans-regular.ttf similarity index 100% rename from flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/my-theme/fonts/ostrich-sans-regular.ttf rename to flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/my-theme/fonts/ostrich-sans-regular.ttf diff --git a/flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/my-theme/imported.css b/flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/my-theme/imported.css similarity index 100% rename from flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/my-theme/imported.css rename to flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/my-theme/imported.css diff --git a/flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/my-theme/styles.css b/flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/my-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/my-theme/styles.css rename to flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/my-theme/styles.css diff --git a/flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/my-theme/theme.json b/flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/my-theme/theme.json similarity index 100% rename from flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/my-theme/theme.json rename to flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/my-theme/theme.json diff --git a/flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/parent-theme/components/my-parent-component.css b/flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/parent-theme/components/my-parent-component.css similarity index 100% rename from flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/parent-theme/components/my-parent-component.css rename to flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/parent-theme/components/my-parent-component.css diff --git a/flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/parent-theme/styles.css b/flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/parent-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/parent-theme/styles.css rename to flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/parent-theme/styles.css diff --git a/flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/parent-theme/theme.json b/flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/parent-theme/theme.json similarity index 100% rename from flow-tests/test-express-build/test-theme-dev-bundle/frontend/themes/parent-theme/theme.json rename to flow-tests/test-express-build/test-theme-dev-bundle/src/main/frontend/themes/parent-theme/theme.json diff --git a/flow-tests/test-express-build/test-theme-dev-bundle/src/test/java/com/vaadin/flow/devbuild/DevBundleThemeIT.java b/flow-tests/test-express-build/test-theme-dev-bundle/src/test/java/com/vaadin/flow/devbuild/DevBundleThemeIT.java index 93b08f2f1ac..8d1ce055cd5 100644 --- a/flow-tests/test-express-build/test-theme-dev-bundle/src/test/java/com/vaadin/flow/devbuild/DevBundleThemeIT.java +++ b/flow-tests/test-express-build/test-theme-dev-bundle/src/test/java/com/vaadin/flow/devbuild/DevBundleThemeIT.java @@ -31,6 +31,7 @@ import org.openqa.selenium.WebElement; import com.vaadin.flow.server.Constants; +import com.vaadin.flow.server.frontend.FrontendUtils; import com.vaadin.flow.testutil.ChromeBrowserTest; import elemental.json.Json; @@ -42,7 +43,8 @@ public class DevBundleThemeIT extends ChromeBrowserTest { private static final String RED_COLOR = "rgba(255, 0, 0, 1)"; private static final String GREEN_COLOR = "rgba(0, 255, 0, 1)"; private static final String BLUE_COLOR = "rgba(0, 0, 255, 1)"; - private static final String THEME_FOLDER = "frontend/themes/my-theme/"; + private static final String THEME_FOLDER = FrontendUtils.DEFAULT_FRONTEND_DIR + + "themes/my-theme/"; private File fontFile; @@ -57,8 +59,7 @@ public void init() { File bundle = new File(baseDir, "target/" + Constants.DEV_BUNDLE_LOCATION); statsJson = new File(bundle, "config/stats.json"); - themeAssetsInBundle = new File(baseDir, "target/" - + Constants.DEV_BUNDLE_LOCATION + "/assets/themes/my-theme"); + themeAssetsInBundle = new File(bundle, "/assets/themes/my-theme"); final File themeFolder = new File(baseDir, THEME_FOLDER); fontFile = new File(themeFolder, "fonts/ostrich-sans-regular.ttf"); stylesCss = new File(themeFolder, "styles.css"); diff --git a/flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/other-theme/components/vaadin-horizontal-layout.css b/flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/other-theme/components/vaadin-horizontal-layout.css similarity index 100% rename from flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/other-theme/components/vaadin-horizontal-layout.css rename to flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/other-theme/components/vaadin-horizontal-layout.css diff --git a/flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/other-theme/other-styles/more-styles.css b/flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/other-theme/other-styles/more-styles.css similarity index 100% rename from flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/other-theme/other-styles/more-styles.css rename to flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/other-theme/other-styles/more-styles.css diff --git a/flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/other-theme/styles.css b/flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/other-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/other-theme/styles.css rename to flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/other-theme/styles.css diff --git a/flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/other-theme/theme.json b/flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/other-theme/theme.json similarity index 100% rename from flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/other-theme/theme.json rename to flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/other-theme/theme.json diff --git a/flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/reusable-theme/components/vaadin-horizontal-layout.css b/flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/reusable-theme/components/vaadin-horizontal-layout.css similarity index 100% rename from flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/reusable-theme/components/vaadin-horizontal-layout.css rename to flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/reusable-theme/components/vaadin-horizontal-layout.css diff --git a/flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/reusable-theme/styles.css b/flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/reusable-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/reusable-theme/styles.css rename to flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/reusable-theme/styles.css diff --git a/flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/reusable-theme/theme.json b/flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/reusable-theme/theme.json similarity index 100% rename from flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/reusable-theme/theme.json rename to flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/reusable-theme/theme.json diff --git a/flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/specific-theme/components/vaadin-horizontal-layout.css b/flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/specific-theme/components/vaadin-horizontal-layout.css similarity index 100% rename from flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/specific-theme/components/vaadin-horizontal-layout.css rename to flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/specific-theme/components/vaadin-horizontal-layout.css diff --git a/flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/specific-theme/images/hilla-logo.png b/flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/specific-theme/images/hilla-logo.png similarity index 100% rename from flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/specific-theme/images/hilla-logo.png rename to flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/specific-theme/images/hilla-logo.png diff --git a/flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/specific-theme/styles.css b/flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/specific-theme/styles.css similarity index 100% rename from flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/specific-theme/styles.css rename to flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/specific-theme/styles.css diff --git a/flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/specific-theme/theme.json b/flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/specific-theme/theme.json similarity index 100% rename from flow-tests/test-express-build/test-theme-legacy-components-css-prod/frontend/themes/specific-theme/theme.json rename to flow-tests/test-express-build/test-theme-legacy-components-css-prod/src/main/frontend/themes/specific-theme/theme.json diff --git a/flow-tests/test-frontend/test-bun/frontend/my-component.js b/flow-tests/test-frontend/test-bun/src/main/frontend/my-component.js similarity index 100% rename from flow-tests/test-frontend/test-bun/frontend/my-component.js rename to flow-tests/test-frontend/test-bun/src/main/frontend/my-component.js diff --git a/flow-tests/test-frontend/test-npm/frontend/my-component.js b/flow-tests/test-frontend/test-npm/src/main/frontend/my-component.js similarity index 100% rename from flow-tests/test-frontend/test-npm/frontend/my-component.js rename to flow-tests/test-frontend/test-npm/src/main/frontend/my-component.js diff --git a/flow-tests/test-frontend/test-pnpm/frontend/my-component.js b/flow-tests/test-frontend/test-pnpm/src/main/frontend/my-component.js similarity index 100% rename from flow-tests/test-frontend/test-pnpm/frontend/my-component.js rename to flow-tests/test-frontend/test-pnpm/src/main/frontend/my-component.js diff --git a/flow-tests/test-frontend/vite-basics/frontend/ReactComponents.tsx b/flow-tests/test-frontend/vite-basics/src/main/frontend/ReactComponents.tsx similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/ReactComponents.tsx rename to flow-tests/test-frontend/vite-basics/src/main/frontend/ReactComponents.tsx diff --git a/flow-tests/test-frontend/vite-basics/frontend/a-directory/index.js b/flow-tests/test-frontend/vite-basics/src/main/frontend/a-directory/index.js similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/a-directory/index.js rename to flow-tests/test-frontend/vite-basics/src/main/frontend/a-directory/index.js diff --git a/flow-tests/test-frontend/vite-basics/frontend/cssimport-textfield.css b/flow-tests/test-frontend/vite-basics/src/main/frontend/cssimport-textfield.css similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/cssimport-textfield.css rename to flow-tests/test-frontend/vite-basics/src/main/frontend/cssimport-textfield.css diff --git a/flow-tests/test-frontend/vite-basics/frontend/cssimport.css b/flow-tests/test-frontend/vite-basics/src/main/frontend/cssimport.css similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/cssimport.css rename to flow-tests/test-frontend/vite-basics/src/main/frontend/cssimport.css diff --git a/flow-tests/test-frontend/vite-basics/frontend/importdir.js b/flow-tests/test-frontend/vite-basics/src/main/frontend/importdir.js similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/importdir.js rename to flow-tests/test-frontend/vite-basics/src/main/frontend/importdir.js diff --git a/flow-tests/test-frontend/vite-basics/frontend/index.html b/flow-tests/test-frontend/vite-basics/src/main/frontend/index.html similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/index.html rename to flow-tests/test-frontend/vite-basics/src/main/frontend/index.html diff --git a/flow-tests/test-frontend/vite-basics/frontend/jsonloader.js b/flow-tests/test-frontend/vite-basics/src/main/frontend/jsonloader.js similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/jsonloader.js rename to flow-tests/test-frontend/vite-basics/src/main/frontend/jsonloader.js diff --git a/flow-tests/test-frontend/vite-basics/frontend/my.json b/flow-tests/test-frontend/vite-basics/src/main/frontend/my.json similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/my.json rename to flow-tests/test-frontend/vite-basics/src/main/frontend/my.json diff --git a/flow-tests/test-frontend/vite-basics/frontend/routes.tsx b/flow-tests/test-frontend/vite-basics/src/main/frontend/routes.tsx similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/routes.tsx rename to flow-tests/test-frontend/vite-basics/src/main/frontend/routes.tsx diff --git a/flow-tests/test-frontend/vite-basics/frontend/testfile.css.js b/flow-tests/test-frontend/vite-basics/src/main/frontend/testfile.css.js similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/testfile.css.js rename to flow-tests/test-frontend/vite-basics/src/main/frontend/testfile.css.js diff --git a/flow-tests/test-frontend/vite-basics/frontend/testscopebuttonloader.js b/flow-tests/test-frontend/vite-basics/src/main/frontend/testscopebuttonloader.js similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/testscopebuttonloader.js rename to flow-tests/test-frontend/vite-basics/src/main/frontend/testscopebuttonloader.js diff --git a/flow-tests/test-frontend/vite-basics/frontend/testscopemaploader.js b/flow-tests/test-frontend/vite-basics/src/main/frontend/testscopemaploader.js similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/testscopemaploader.js rename to flow-tests/test-frontend/vite-basics/src/main/frontend/testscopemaploader.js diff --git a/flow-tests/test-frontend/vite-basics/frontend/themes/vite-basics/components/vaadin-text-field.css b/flow-tests/test-frontend/vite-basics/src/main/frontend/themes/vite-basics/components/vaadin-text-field.css similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/themes/vite-basics/components/vaadin-text-field.css rename to flow-tests/test-frontend/vite-basics/src/main/frontend/themes/vite-basics/components/vaadin-text-field.css diff --git a/flow-tests/test-frontend/vite-basics/frontend/themes/vite-basics/images/plant.png b/flow-tests/test-frontend/vite-basics/src/main/frontend/themes/vite-basics/images/plant.png similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/themes/vite-basics/images/plant.png rename to flow-tests/test-frontend/vite-basics/src/main/frontend/themes/vite-basics/images/plant.png diff --git a/flow-tests/test-frontend/vite-basics/frontend/themes/vite-basics/styles.css b/flow-tests/test-frontend/vite-basics/src/main/frontend/themes/vite-basics/styles.css similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/themes/vite-basics/styles.css rename to flow-tests/test-frontend/vite-basics/src/main/frontend/themes/vite-basics/styles.css diff --git a/flow-tests/test-frontend/vite-basics/frontend/themes/vite-basics/theme.json b/flow-tests/test-frontend/vite-basics/src/main/frontend/themes/vite-basics/theme.json similarity index 100% rename from flow-tests/test-frontend/vite-basics/frontend/themes/vite-basics/theme.json rename to flow-tests/test-frontend/vite-basics/src/main/frontend/themes/vite-basics/theme.json diff --git a/flow-tests/test-frontend/vite-basics/src/test/java/com/vaadin/viteapp/FileAccessIT.java b/flow-tests/test-frontend/vite-basics/src/test/java/com/vaadin/viteapp/FileAccessIT.java index 4fe64dbc9f5..7145ccaf55c 100644 --- a/flow-tests/test-frontend/vite-basics/src/test/java/com/vaadin/viteapp/FileAccessIT.java +++ b/flow-tests/test-frontend/vite-basics/src/test/java/com/vaadin/viteapp/FileAccessIT.java @@ -8,6 +8,8 @@ import org.junit.Assert; import org.junit.Test; +import com.vaadin.flow.server.frontend.FrontendUtils; + public class FileAccessIT extends ViteDevModeIT { @Test @@ -16,7 +18,7 @@ public void expectedFoldersAccessible() throws Exception { * This just tests a few sample folders to see that there is not a * fundamental problem */ - assertAllowed("frontend/jsonloader.js"); + assertAllowed(FrontendUtils.DEFAULT_FRONTEND_DIR + "jsonloader.js"); } private void assertAllowed(String fileInProject) throws IOException { @@ -61,6 +63,9 @@ private URL getFsUrl(String fileInProject) throws IOException { if (!currentPath.startsWith("/")) { currentPath = "/" + currentPath; } + if (currentPath.endsWith("/")) { + currentPath = currentPath.substring(0, currentPath.length() - 1); + } return new URL("http://localhost:8888/VAADIN/@fs" + currentPath + "/" + fileInProject); } diff --git a/flow-tests/test-frontend/vite-basics/src/test/java/com/vaadin/viteapp/ReactComponentsIT.java b/flow-tests/test-frontend/vite-basics/src/test/java/com/vaadin/viteapp/ReactComponentsIT.java index 2d0b782b3f5..67bfed3e196 100644 --- a/flow-tests/test-frontend/vite-basics/src/test/java/com/vaadin/viteapp/ReactComponentsIT.java +++ b/flow-tests/test-frontend/vite-basics/src/test/java/com/vaadin/viteapp/ReactComponentsIT.java @@ -7,6 +7,7 @@ import org.junit.Before; import org.junit.Test; +import com.vaadin.flow.server.frontend.FrontendUtils; import com.vaadin.flow.testutil.ChromeBrowserTest; import com.vaadin.testbench.TestBenchElement; @@ -32,7 +33,10 @@ public void functionLocationsAvailable() { String expected = element.getAttribute("data-expected"); Long line = Long.parseLong(expected.split("_")[0]); Long column = Long.parseLong(expected.split("_")[1]); - String filenameEnd = "vite-basics/frontend/ReactComponents.tsx"; + String filenameEnd = "vite-basics/src/main/frontend/ReactComponents.tsx"; + if (FrontendUtils.isWindows()) { + filenameEnd = filenameEnd.replaceAll("/", "\\\\"); + } Map result = (Map) executeScript( """ diff --git a/flow-tests/test-frontend/vite-basics/src/test/java/com/vaadin/viteapp/ThemeReloadIT.java b/flow-tests/test-frontend/vite-basics/src/test/java/com/vaadin/viteapp/ThemeReloadIT.java index 86d16ce55b4..7c97fbe4402 100644 --- a/flow-tests/test-frontend/vite-basics/src/test/java/com/vaadin/viteapp/ThemeReloadIT.java +++ b/flow-tests/test-frontend/vite-basics/src/test/java/com/vaadin/viteapp/ThemeReloadIT.java @@ -4,6 +4,7 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; +import com.vaadin.flow.server.frontend.FrontendUtils; import com.vaadin.testbench.TestBenchElement; import org.apache.commons.io.FileUtils; @@ -21,7 +22,8 @@ public void updateStyle_changeIsReloaded() throws IOException { Assert.assertEquals("rgba(0, 0, 255, 1)", header.getCssValue("color")); File baseDir = new File(System.getProperty("user.dir", ".")); - File themeFolder = new File(baseDir, "frontend/themes/vite-basics/"); + File themeFolder = new File(baseDir, + FrontendUtils.DEFAULT_FRONTEND_DIR + "themes/vite-basics/"); File stylesCss = new File(themeFolder, "styles.css"); final String stylesContent = FileUtils.readFileToString(stylesCss, StandardCharsets.UTF_8); diff --git a/flow-tests/test-frontend/vite-context-path/frontend/themes/vite-context-path/styles.css b/flow-tests/test-frontend/vite-context-path/src/main/frontend/themes/vite-context-path/styles.css similarity index 100% rename from flow-tests/test-frontend/vite-context-path/frontend/themes/vite-context-path/styles.css rename to flow-tests/test-frontend/vite-context-path/src/main/frontend/themes/vite-context-path/styles.css diff --git a/flow-tests/test-frontend/vite-context-path/frontend/themes/vite-context-path/theme.json b/flow-tests/test-frontend/vite-context-path/src/main/frontend/themes/vite-context-path/theme.json similarity index 100% rename from flow-tests/test-frontend/vite-context-path/frontend/themes/vite-context-path/theme.json rename to flow-tests/test-frontend/vite-context-path/src/main/frontend/themes/vite-context-path/theme.json diff --git a/flow-tests/test-frontend/vite-embedded-webcomponent-resync/frontend/index.html b/flow-tests/test-frontend/vite-embedded-webcomponent-resync/src/main/frontend/index.html similarity index 100% rename from flow-tests/test-frontend/vite-embedded-webcomponent-resync/frontend/index.html rename to flow-tests/test-frontend/vite-embedded-webcomponent-resync/src/main/frontend/index.html diff --git a/flow-tests/test-frontend/vite-embedded/frontend/web-component.html b/flow-tests/test-frontend/vite-embedded-webcomponent-resync/src/main/frontend/web-component.html similarity index 100% rename from flow-tests/test-frontend/vite-embedded/frontend/web-component.html rename to flow-tests/test-frontend/vite-embedded-webcomponent-resync/src/main/frontend/web-component.html diff --git a/flow-tests/test-frontend/vite-embedded/frontend/index.html b/flow-tests/test-frontend/vite-embedded/src/main/frontend/index.html similarity index 100% rename from flow-tests/test-frontend/vite-embedded/frontend/index.html rename to flow-tests/test-frontend/vite-embedded/src/main/frontend/index.html diff --git a/flow-tests/test-frontend/vite-embedded/frontend/themes/my-theme/styles.css b/flow-tests/test-frontend/vite-embedded/src/main/frontend/themes/my-theme/styles.css similarity index 100% rename from flow-tests/test-frontend/vite-embedded/frontend/themes/my-theme/styles.css rename to flow-tests/test-frontend/vite-embedded/src/main/frontend/themes/my-theme/styles.css diff --git a/flow-tests/test-frontend/vite-embedded/src/main/frontend/web-component.html b/flow-tests/test-frontend/vite-embedded/src/main/frontend/web-component.html new file mode 100644 index 00000000000..fd598bbbadf --- /dev/null +++ b/flow-tests/test-frontend/vite-embedded/src/main/frontend/web-component.html @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/flow-tests/test-frontend/vite-production/frontend/image.css b/flow-tests/test-frontend/vite-production/src/main/frontend/image.css similarity index 100% rename from flow-tests/test-frontend/vite-production/frontend/image.css rename to flow-tests/test-frontend/vite-production/src/main/frontend/image.css diff --git a/flow-tests/test-frontend/vite-production/frontend/index.html b/flow-tests/test-frontend/vite-production/src/main/frontend/index.html similarity index 100% rename from flow-tests/test-frontend/vite-production/frontend/index.html rename to flow-tests/test-frontend/vite-production/src/main/frontend/index.html diff --git a/flow-tests/test-frontend/vite-production/frontend/themes/vite-production/images/plant.png b/flow-tests/test-frontend/vite-production/src/main/frontend/themes/vite-production/images/plant.png similarity index 100% rename from flow-tests/test-frontend/vite-production/frontend/themes/vite-production/images/plant.png rename to flow-tests/test-frontend/vite-production/src/main/frontend/themes/vite-production/images/plant.png diff --git a/flow-tests/test-frontend/vite-production/frontend/themes/vite-production/styles.css b/flow-tests/test-frontend/vite-production/src/main/frontend/themes/vite-production/styles.css similarity index 100% rename from flow-tests/test-frontend/vite-production/frontend/themes/vite-production/styles.css rename to flow-tests/test-frontend/vite-production/src/main/frontend/themes/vite-production/styles.css diff --git a/flow-tests/test-frontend/vite-production/frontend/themes/vite-production/theme.json b/flow-tests/test-frontend/vite-production/src/main/frontend/themes/vite-production/theme.json similarity index 100% rename from flow-tests/test-frontend/vite-production/frontend/themes/vite-production/theme.json rename to flow-tests/test-frontend/vite-production/src/main/frontend/themes/vite-production/theme.json diff --git a/flow-tests/test-frontend/vite-production/frontend/yes.png b/flow-tests/test-frontend/vite-production/src/main/frontend/yes.png similarity index 100% rename from flow-tests/test-frontend/vite-production/frontend/yes.png rename to flow-tests/test-frontend/vite-production/src/main/frontend/yes.png diff --git a/flow-tests/test-frontend/vite-pwa-production/frontend/about-view.ts b/flow-tests/test-frontend/vite-pwa-production/src/main/frontend/about-view.ts similarity index 100% rename from flow-tests/test-frontend/vite-pwa-production/frontend/about-view.ts rename to flow-tests/test-frontend/vite-pwa-production/src/main/frontend/about-view.ts diff --git a/flow-tests/test-frontend/vite-pwa-production/frontend/home-view.ts b/flow-tests/test-frontend/vite-pwa-production/src/main/frontend/home-view.ts similarity index 100% rename from flow-tests/test-frontend/vite-pwa-production/frontend/home-view.ts rename to flow-tests/test-frontend/vite-pwa-production/src/main/frontend/home-view.ts diff --git a/flow-tests/test-frontend/vite-pwa-production/frontend/index.html b/flow-tests/test-frontend/vite-pwa-production/src/main/frontend/index.html similarity index 100% rename from flow-tests/test-frontend/vite-pwa-production/frontend/index.html rename to flow-tests/test-frontend/vite-pwa-production/src/main/frontend/index.html diff --git a/flow-tests/test-frontend/vite-pwa-production/frontend/index.ts b/flow-tests/test-frontend/vite-pwa-production/src/main/frontend/index.ts similarity index 100% rename from flow-tests/test-frontend/vite-pwa-production/frontend/index.ts rename to flow-tests/test-frontend/vite-pwa-production/src/main/frontend/index.ts diff --git a/flow-tests/test-frontend/vite-pwa-production/frontend/themes/my-theme/fonts/Roboto-Regular.woff b/flow-tests/test-frontend/vite-pwa-production/src/main/frontend/themes/my-theme/fonts/Roboto-Regular.woff similarity index 100% rename from flow-tests/test-frontend/vite-pwa-production/frontend/themes/my-theme/fonts/Roboto-Regular.woff rename to flow-tests/test-frontend/vite-pwa-production/src/main/frontend/themes/my-theme/fonts/Roboto-Regular.woff diff --git a/flow-tests/test-frontend/vite-pwa-production/frontend/themes/my-theme/images/bg.jpeg b/flow-tests/test-frontend/vite-pwa-production/src/main/frontend/themes/my-theme/images/bg.jpeg similarity index 100% rename from flow-tests/test-frontend/vite-pwa-production/frontend/themes/my-theme/images/bg.jpeg rename to flow-tests/test-frontend/vite-pwa-production/src/main/frontend/themes/my-theme/images/bg.jpeg diff --git a/flow-tests/test-frontend/vite-pwa-production/frontend/themes/my-theme/styles.css b/flow-tests/test-frontend/vite-pwa-production/src/main/frontend/themes/my-theme/styles.css similarity index 100% rename from flow-tests/test-frontend/vite-pwa-production/frontend/themes/my-theme/styles.css rename to flow-tests/test-frontend/vite-pwa-production/src/main/frontend/themes/my-theme/styles.css diff --git a/flow-tests/test-frontend/vite-pwa/frontend/about-view.ts b/flow-tests/test-frontend/vite-pwa/src/main/frontend/about-view.ts similarity index 100% rename from flow-tests/test-frontend/vite-pwa/frontend/about-view.ts rename to flow-tests/test-frontend/vite-pwa/src/main/frontend/about-view.ts diff --git a/flow-tests/test-frontend/vite-pwa/frontend/home-view.css b/flow-tests/test-frontend/vite-pwa/src/main/frontend/home-view.css similarity index 100% rename from flow-tests/test-frontend/vite-pwa/frontend/home-view.css rename to flow-tests/test-frontend/vite-pwa/src/main/frontend/home-view.css diff --git a/flow-tests/test-frontend/vite-pwa/frontend/home-view.ts b/flow-tests/test-frontend/vite-pwa/src/main/frontend/home-view.ts similarity index 100% rename from flow-tests/test-frontend/vite-pwa/frontend/home-view.ts rename to flow-tests/test-frontend/vite-pwa/src/main/frontend/home-view.ts diff --git a/flow-tests/test-frontend/vite-pwa/frontend/index.html b/flow-tests/test-frontend/vite-pwa/src/main/frontend/index.html similarity index 100% rename from flow-tests/test-frontend/vite-pwa/frontend/index.html rename to flow-tests/test-frontend/vite-pwa/src/main/frontend/index.html diff --git a/flow-tests/test-frontend/vite-pwa/frontend/index.ts b/flow-tests/test-frontend/vite-pwa/src/main/frontend/index.ts similarity index 100% rename from flow-tests/test-frontend/vite-pwa/frontend/index.ts rename to flow-tests/test-frontend/vite-pwa/src/main/frontend/index.ts diff --git a/flow-tests/test-frontend/vite-pwa/frontend/themes/my-theme/fonts/Roboto-Regular.woff b/flow-tests/test-frontend/vite-pwa/src/main/frontend/themes/my-theme/fonts/Roboto-Regular.woff similarity index 100% rename from flow-tests/test-frontend/vite-pwa/frontend/themes/my-theme/fonts/Roboto-Regular.woff rename to flow-tests/test-frontend/vite-pwa/src/main/frontend/themes/my-theme/fonts/Roboto-Regular.woff diff --git a/flow-tests/test-frontend/vite-pwa/frontend/themes/my-theme/images/bg.jpeg b/flow-tests/test-frontend/vite-pwa/src/main/frontend/themes/my-theme/images/bg.jpeg similarity index 100% rename from flow-tests/test-frontend/vite-pwa/frontend/themes/my-theme/images/bg.jpeg rename to flow-tests/test-frontend/vite-pwa/src/main/frontend/themes/my-theme/images/bg.jpeg diff --git a/flow-tests/test-frontend/vite-pwa/frontend/themes/my-theme/styles.css b/flow-tests/test-frontend/vite-pwa/src/main/frontend/themes/my-theme/styles.css similarity index 100% rename from flow-tests/test-frontend/vite-pwa/frontend/themes/my-theme/styles.css rename to flow-tests/test-frontend/vite-pwa/src/main/frontend/themes/my-theme/styles.css diff --git a/flow-tests/test-legacy-frontend/README.md b/flow-tests/test-legacy-frontend/README.md new file mode 100644 index 00000000000..1713e1e9d65 --- /dev/null +++ b/flow-tests/test-legacy-frontend/README.md @@ -0,0 +1,3 @@ +This module is for testing the automatic selection of the +legacy frontend folder instead of the new src/main/frontend that +is the new default location. diff --git a/flow-tests/test-theme-no-polymer/frontend/themes/app-theme/styles.css b/flow-tests/test-legacy-frontend/frontend/themes/app-theme/styles.css similarity index 100% rename from flow-tests/test-theme-no-polymer/frontend/themes/app-theme/styles.css rename to flow-tests/test-legacy-frontend/frontend/themes/app-theme/styles.css diff --git a/flow-tests/test-theme-no-polymer/frontend/themes/app-theme/theme.json b/flow-tests/test-legacy-frontend/frontend/themes/app-theme/theme.json similarity index 100% rename from flow-tests/test-theme-no-polymer/frontend/themes/app-theme/theme.json rename to flow-tests/test-legacy-frontend/frontend/themes/app-theme/theme.json diff --git a/flow-tests/test-legacy-frontend/pom.xml b/flow-tests/test-legacy-frontend/pom.xml new file mode 100644 index 00000000000..5f910d74b45 --- /dev/null +++ b/flow-tests/test-legacy-frontend/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + + com.vaadin + flow-tests + 24.4-SNAPSHOT + + flow-test-legacy-frontend + Flow custom theme in legacy frontend folder + war + + true + + + + + com.vaadin + flow-test-common + ${project.version} + + + com.vaadin + flow-html-components-testbench + ${project.version} + test + + + com.vaadin + flow-test-lumo + ${project.version} + + + + + + + com.vaadin + flow-maven-plugin + + + + prepare-frontend + build-frontend + + + + + + org.eclipse.jetty.ee10 + jetty-ee10-maven-plugin + + + + + diff --git a/flow-tests/test-legacy-frontend/src/main/java/com/vaadin/flow/uitest/ui/theme/AppShell.java b/flow-tests/test-legacy-frontend/src/main/java/com/vaadin/flow/uitest/ui/theme/AppShell.java new file mode 100644 index 00000000000..fc9acec588e --- /dev/null +++ b/flow-tests/test-legacy-frontend/src/main/java/com/vaadin/flow/uitest/ui/theme/AppShell.java @@ -0,0 +1,29 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.vaadin.flow.uitest.ui.theme; + +import com.vaadin.flow.component.dependency.NpmPackage; +import com.vaadin.flow.component.page.AppShellConfigurator; +import com.vaadin.flow.theme.Theme; + +import com.vaadin.flow.uitest.ui.dependencies.TestVersion; + +@Theme(value = "app-theme") +@NpmPackage(value = "@vaadin/vaadin-themable-mixin", version = TestVersion.VAADIN) +@NpmPackage(value = "@fortawesome/fontawesome-free", version = TestVersion.FONTAWESOME) +public class AppShell implements AppShellConfigurator { +} diff --git a/flow-tests/test-legacy-frontend/src/main/java/com/vaadin/flow/uitest/ui/theme/UtilityClassNameView.java b/flow-tests/test-legacy-frontend/src/main/java/com/vaadin/flow/uitest/ui/theme/UtilityClassNameView.java new file mode 100644 index 00000000000..562589a0ad4 --- /dev/null +++ b/flow-tests/test-legacy-frontend/src/main/java/com/vaadin/flow/uitest/ui/theme/UtilityClassNameView.java @@ -0,0 +1,32 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.vaadin.flow.uitest.ui.theme; + +import com.vaadin.flow.component.html.Div; +import com.vaadin.flow.component.html.Span; +import com.vaadin.flow.router.Route; + +@Route("com.vaadin.flow.uitest.ui.theme.UtilityClassNameView") +public class UtilityClassNameView extends Div { + + public UtilityClassNameView() { + Span styleHeader = new Span("Primary color"); + styleHeader.setClassName("text-primary"); + styleHeader.setId("primary"); + add(styleHeader); + } +} diff --git a/flow-tests/test-legacy-frontend/src/test/java/com/vaadin/flow/uitest/ui/theme/UtilityClassNameIT.java b/flow-tests/test-legacy-frontend/src/test/java/com/vaadin/flow/uitest/ui/theme/UtilityClassNameIT.java new file mode 100644 index 00000000000..4952505302a --- /dev/null +++ b/flow-tests/test-legacy-frontend/src/test/java/com/vaadin/flow/uitest/ui/theme/UtilityClassNameIT.java @@ -0,0 +1,34 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.flow.uitest.ui.theme; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.flow.component.html.testbench.SpanElement; +import com.vaadin.flow.testutil.ChromeBrowserTest; + +public class UtilityClassNameIT extends ChromeBrowserTest { + + @Test + public void lumoUtils_customStylesHaveBeenExpanded() { + open(); + checkLogsForErrors(); + + SpanElement primary = $(SpanElement.class).id("primary"); + Assert.assertEquals("rgba(0, 128, 0, 1)", primary.getCssValue("color")); + } +} diff --git a/flow-tests/test-live-reload/frontend/component-with-theme.ts b/flow-tests/test-live-reload/src/main/frontend/component-with-theme.ts similarity index 100% rename from flow-tests/test-live-reload/frontend/component-with-theme.ts rename to flow-tests/test-live-reload/src/main/frontend/component-with-theme.ts diff --git a/flow-tests/test-live-reload/frontend/custom-component.ts b/flow-tests/test-live-reload/src/main/frontend/custom-component.ts similarity index 100% rename from flow-tests/test-live-reload/frontend/custom-component.ts rename to flow-tests/test-live-reload/src/main/frontend/custom-component.ts diff --git a/flow-tests/test-live-reload/frontend/themes/mytheme/styles.css b/flow-tests/test-live-reload/src/main/frontend/themes/mytheme/styles.css similarity index 100% rename from flow-tests/test-live-reload/frontend/themes/mytheme/styles.css rename to flow-tests/test-live-reload/src/main/frontend/themes/mytheme/styles.css diff --git a/flow-tests/test-live-reload/frontend/themes/mytheme/styles.css.original b/flow-tests/test-live-reload/src/main/frontend/themes/mytheme/styles.css.original similarity index 100% rename from flow-tests/test-live-reload/frontend/themes/mytheme/styles.css.original rename to flow-tests/test-live-reload/src/main/frontend/themes/mytheme/styles.css.original diff --git a/flow-tests/test-live-reload/src/main/java/com/vaadin/flow/uitest/ui/FrontendLiveReloadView.java b/flow-tests/test-live-reload/src/main/java/com/vaadin/flow/uitest/ui/FrontendLiveReloadView.java index 9041fd542a2..0b0ca84139e 100644 --- a/flow-tests/test-live-reload/src/main/java/com/vaadin/flow/uitest/ui/FrontendLiveReloadView.java +++ b/flow-tests/test-live-reload/src/main/java/com/vaadin/flow/uitest/ui/FrontendLiveReloadView.java @@ -91,7 +91,8 @@ public static void replaceFrontendFile(VaadinService vaadinService, try { if (frontendFileBackup == null) { // make a backup so it can be restored at teardown - frontendFileBackup = File.createTempFile("frontend", "ts"); + frontendFileBackup = File.createTempFile( + FrontendUtils.DEFAULT_FRONTEND_DIR, "ts"); FileUtils.copyFile(frontendFile, frontendFileBackup); } FileUtils.write(frontendFile, code, StandardCharsets.UTF_8); diff --git a/flow-tests/test-live-reload/src/main/java/com/vaadin/flow/uitest/ui/ThemeLiveReloadView.java b/flow-tests/test-live-reload/src/main/java/com/vaadin/flow/uitest/ui/ThemeLiveReloadView.java index 514bd26bb1f..ddec5e0e84a 100644 --- a/flow-tests/test-live-reload/src/main/java/com/vaadin/flow/uitest/ui/ThemeLiveReloadView.java +++ b/flow-tests/test-live-reload/src/main/java/com/vaadin/flow/uitest/ui/ThemeLiveReloadView.java @@ -7,6 +7,7 @@ import com.vaadin.flow.component.html.Span; import com.vaadin.flow.router.Route; import com.vaadin.flow.server.VaadinService; +import com.vaadin.flow.server.frontend.FrontendUtils; import com.vaadin.flow.server.startup.ApplicationConfiguration; import com.vaadin.flow.uitest.servlet.ViewTestLayout; @@ -17,8 +18,9 @@ public ThemeLiveReloadView() { ApplicationConfiguration appConf = ApplicationConfiguration .get(VaadinService.getCurrent().getContext()); Path stylesPath = Paths.get( - appConf.getProjectFolder().getAbsolutePath(), "frontend", - "themes", "mytheme", "styles.css"); + appConf.getProjectFolder().getAbsolutePath(), + FrontendUtils.DEFAULT_FRONTEND_DIR, "themes", "mytheme", + "styles.css"); Span span = new Span(stylesPath.toString()); span.setId("styles.css"); add(span); diff --git a/flow-tests/test-live-reload/src/main/java/com/vaadin/flow/uitest/ui/ThemeLiveReloadWithShadowRootView.java b/flow-tests/test-live-reload/src/main/java/com/vaadin/flow/uitest/ui/ThemeLiveReloadWithShadowRootView.java index 006937a6e49..824b6fada79 100644 --- a/flow-tests/test-live-reload/src/main/java/com/vaadin/flow/uitest/ui/ThemeLiveReloadWithShadowRootView.java +++ b/flow-tests/test-live-reload/src/main/java/com/vaadin/flow/uitest/ui/ThemeLiveReloadWithShadowRootView.java @@ -8,6 +8,7 @@ import com.vaadin.flow.component.html.Span; import com.vaadin.flow.router.Route; import com.vaadin.flow.server.VaadinService; +import com.vaadin.flow.server.frontend.FrontendUtils; import com.vaadin.flow.server.startup.ApplicationConfiguration; import com.vaadin.flow.uitest.servlet.ViewTestLayout; @@ -19,8 +20,9 @@ public ThemeLiveReloadWithShadowRootView() { ApplicationConfiguration appConf = ApplicationConfiguration .get(VaadinService.getCurrent().getContext()); Path stylesPath = Paths.get( - appConf.getProjectFolder().getAbsolutePath(), "frontend", - "themes", "mytheme", "styles.css"); + appConf.getProjectFolder().getAbsolutePath(), + FrontendUtils.DEFAULT_FRONTEND_DIR, "themes", "mytheme", + "styles.css"); Span span = new Span(stylesPath.toString()); span.setId("styles.css"); add(span); diff --git a/flow-tests/test-misc/frontend/consoleLoggingProxy.js b/flow-tests/test-misc/src/main/frontend/consoleLoggingProxy.js similarity index 100% rename from flow-tests/test-misc/frontend/consoleLoggingProxy.js rename to flow-tests/test-misc/src/main/frontend/consoleLoggingProxy.js diff --git a/flow-tests/test-misc/frontend/exception-logging.js b/flow-tests/test-misc/src/main/frontend/exception-logging.js similarity index 100% rename from flow-tests/test-misc/frontend/exception-logging.js rename to flow-tests/test-misc/src/main/frontend/exception-logging.js diff --git a/flow-tests/test-misc/frontend/legacyTheme/my-theme/client-side-component.js b/flow-tests/test-misc/src/main/frontend/legacyTheme/my-theme/client-side-component.js similarity index 100% rename from flow-tests/test-misc/frontend/legacyTheme/my-theme/client-side-component.js rename to flow-tests/test-misc/src/main/frontend/legacyTheme/my-theme/client-side-component.js diff --git a/flow-tests/test-misc/frontend/legacyTheme/my-theme/my-component-themed.js b/flow-tests/test-misc/src/main/frontend/legacyTheme/my-theme/my-component-themed.js similarity index 100% rename from flow-tests/test-misc/frontend/legacyTheme/my-theme/my-component-themed.js rename to flow-tests/test-misc/src/main/frontend/legacyTheme/my-theme/my-component-themed.js diff --git a/flow-tests/test-misc/frontend/legacyTheme/my-theme/npm-themed-component.js b/flow-tests/test-misc/src/main/frontend/legacyTheme/my-theme/npm-themed-component.js similarity index 100% rename from flow-tests/test-misc/frontend/legacyTheme/my-theme/npm-themed-component.js rename to flow-tests/test-misc/src/main/frontend/legacyTheme/my-theme/npm-themed-component.js diff --git a/flow-tests/test-npm-only-features/test-npm-bytecode-scanning/frontend/lazy-component.js b/flow-tests/test-npm-only-features/test-npm-bytecode-scanning/src/main/frontend/lazy-component.js similarity index 100% rename from flow-tests/test-npm-only-features/test-npm-bytecode-scanning/frontend/lazy-component.js rename to flow-tests/test-npm-only-features/test-npm-bytecode-scanning/src/main/frontend/lazy-component.js diff --git a/flow-tests/test-npm-only-features/test-npm-bytecode-scanning/frontend/my-button.js b/flow-tests/test-npm-only-features/test-npm-bytecode-scanning/src/main/frontend/my-button.js similarity index 100% rename from flow-tests/test-npm-only-features/test-npm-bytecode-scanning/frontend/my-button.js rename to flow-tests/test-npm-only-features/test-npm-bytecode-scanning/src/main/frontend/my-button.js diff --git a/flow-tests/test-npm-only-features/test-npm-general/frontend/init-listener-component.js b/flow-tests/test-npm-only-features/test-npm-general/src/main/frontend/init-listener-component.js similarity index 100% rename from flow-tests/test-npm-only-features/test-npm-general/frontend/init-listener-component.js rename to flow-tests/test-npm-only-features/test-npm-general/src/main/frontend/init-listener-component.js diff --git a/flow-tests/test-npm-only-features/test-npm-general/frontend/my-component.js b/flow-tests/test-npm-only-features/test-npm-general/src/main/frontend/my-component.js similarity index 100% rename from flow-tests/test-npm-only-features/test-npm-general/frontend/my-component.js rename to flow-tests/test-npm-only-features/test-npm-general/src/main/frontend/my-component.js diff --git a/flow-tests/test-react-adapter/frontend/ReactInput.tsx b/flow-tests/test-react-adapter/src/main/frontend/ReactInput.tsx similarity index 100% rename from flow-tests/test-react-adapter/frontend/ReactInput.tsx rename to flow-tests/test-react-adapter/src/main/frontend/ReactInput.tsx diff --git a/flow-tests/test-redeployment/frontend/themes/app-theme/styles.css b/flow-tests/test-redeployment/src/main/frontend/themes/app-theme/styles.css similarity index 100% rename from flow-tests/test-redeployment/frontend/themes/app-theme/styles.css rename to flow-tests/test-redeployment/src/main/frontend/themes/app-theme/styles.css diff --git a/flow-tests/test-redeployment/frontend/themes/other-theme/styles.css b/flow-tests/test-redeployment/src/main/frontend/themes/other-theme/styles.css similarity index 100% rename from flow-tests/test-redeployment/frontend/themes/other-theme/styles.css rename to flow-tests/test-redeployment/src/main/frontend/themes/other-theme/styles.css diff --git a/flow-tests/test-root-context/frontend/AfterServerChanges.js b/flow-tests/test-root-context/src/main/frontend/AfterServerChanges.js similarity index 100% rename from flow-tests/test-root-context/frontend/AfterServerChanges.js rename to flow-tests/test-root-context/src/main/frontend/AfterServerChanges.js diff --git a/flow-tests/test-root-context/frontend/AttachExistingDomElementById.js b/flow-tests/test-root-context/src/main/frontend/AttachExistingDomElementById.js similarity index 100% rename from flow-tests/test-root-context/frontend/AttachExistingDomElementById.js rename to flow-tests/test-root-context/src/main/frontend/AttachExistingDomElementById.js diff --git a/flow-tests/test-root-context/frontend/AttributeTemplate.js b/flow-tests/test-root-context/src/main/frontend/AttributeTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/AttributeTemplate.js rename to flow-tests/test-root-context/src/main/frontend/AttributeTemplate.js diff --git a/flow-tests/test-root-context/frontend/BasicTypeList.js b/flow-tests/test-root-context/src/main/frontend/BasicTypeList.js similarity index 100% rename from flow-tests/test-root-context/frontend/BasicTypeList.js rename to flow-tests/test-root-context/src/main/frontend/BasicTypeList.js diff --git a/flow-tests/test-root-context/frontend/BeanInListing.js b/flow-tests/test-root-context/src/main/frontend/BeanInListing.js similarity index 100% rename from flow-tests/test-root-context/frontend/BeanInListing.js rename to flow-tests/test-root-context/src/main/frontend/BeanInListing.js diff --git a/flow-tests/test-root-context/frontend/ChangeInjectedComponentTextView.js b/flow-tests/test-root-context/src/main/frontend/ChangeInjectedComponentTextView.js similarity index 100% rename from flow-tests/test-root-context/frontend/ChangeInjectedComponentTextView.js rename to flow-tests/test-root-context/src/main/frontend/ChangeInjectedComponentTextView.js diff --git a/flow-tests/test-root-context/frontend/ChildIdTemplate.js b/flow-tests/test-root-context/src/main/frontend/ChildIdTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/ChildIdTemplate.js rename to flow-tests/test-root-context/src/main/frontend/ChildIdTemplate.js diff --git a/flow-tests/test-root-context/frontend/ChildOrderTemplate.js b/flow-tests/test-root-context/src/main/frontend/ChildOrderTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/ChildOrderTemplate.js rename to flow-tests/test-root-context/src/main/frontend/ChildOrderTemplate.js diff --git a/flow-tests/test-root-context/frontend/ChildTemplate.js b/flow-tests/test-root-context/src/main/frontend/ChildTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/ChildTemplate.js rename to flow-tests/test-root-context/src/main/frontend/ChildTemplate.js diff --git a/flow-tests/test-root-context/frontend/ClearList.js b/flow-tests/test-root-context/src/main/frontend/ClearList.js similarity index 100% rename from flow-tests/test-root-context/frontend/ClearList.js rename to flow-tests/test-root-context/src/main/frontend/ClearList.js diff --git a/flow-tests/test-root-context/frontend/ClearNodeChildren.js b/flow-tests/test-root-context/src/main/frontend/ClearNodeChildren.js similarity index 100% rename from flow-tests/test-root-context/frontend/ClearNodeChildren.js rename to flow-tests/test-root-context/src/main/frontend/ClearNodeChildren.js diff --git a/flow-tests/test-root-context/frontend/ClientUpdateMode.js b/flow-tests/test-root-context/src/main/frontend/ClientUpdateMode.js similarity index 100% rename from flow-tests/test-root-context/frontend/ClientUpdateMode.js rename to flow-tests/test-root-context/src/main/frontend/ClientUpdateMode.js diff --git a/flow-tests/test-root-context/frontend/ConvertToBean.js b/flow-tests/test-root-context/src/main/frontend/ConvertToBean.js similarity index 100% rename from flow-tests/test-root-context/frontend/ConvertToBean.js rename to flow-tests/test-root-context/src/main/frontend/ConvertToBean.js diff --git a/flow-tests/test-root-context/frontend/DomListenerOnAttach.js b/flow-tests/test-root-context/src/main/frontend/DomListenerOnAttach.js similarity index 100% rename from flow-tests/test-root-context/frontend/DomListenerOnAttach.js rename to flow-tests/test-root-context/src/main/frontend/DomListenerOnAttach.js diff --git a/flow-tests/test-root-context/frontend/DomRepeatPolymerTemplate.js b/flow-tests/test-root-context/src/main/frontend/DomRepeatPolymerTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/DomRepeatPolymerTemplate.js rename to flow-tests/test-root-context/src/main/frontend/DomRepeatPolymerTemplate.js diff --git a/flow-tests/test-root-context/frontend/ElementInitOrder.js b/flow-tests/test-root-context/src/main/frontend/ElementInitOrder.js similarity index 100% rename from flow-tests/test-root-context/frontend/ElementInitOrder.js rename to flow-tests/test-root-context/src/main/frontend/ElementInitOrder.js diff --git a/flow-tests/test-root-context/frontend/EmptyLists.js b/flow-tests/test-root-context/src/main/frontend/EmptyLists.js similarity index 100% rename from flow-tests/test-root-context/frontend/EmptyLists.js rename to flow-tests/test-root-context/src/main/frontend/EmptyLists.js diff --git a/flow-tests/test-root-context/frontend/EventHandler.js b/flow-tests/test-root-context/src/main/frontend/EventHandler.js similarity index 100% rename from flow-tests/test-root-context/frontend/EventHandler.js rename to flow-tests/test-root-context/src/main/frontend/EventHandler.js diff --git a/flow-tests/test-root-context/frontend/ExceptionsDuringPropertyUpdates.js b/flow-tests/test-root-context/src/main/frontend/ExceptionsDuringPropertyUpdates.js similarity index 100% rename from flow-tests/test-root-context/frontend/ExceptionsDuringPropertyUpdates.js rename to flow-tests/test-root-context/src/main/frontend/ExceptionsDuringPropertyUpdates.js diff --git a/flow-tests/test-root-context/frontend/HiddenTemplate.js b/flow-tests/test-root-context/src/main/frontend/HiddenTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/HiddenTemplate.js rename to flow-tests/test-root-context/src/main/frontend/HiddenTemplate.js diff --git a/flow-tests/test-root-context/frontend/InjectScriptTagTemplate.js b/flow-tests/test-root-context/src/main/frontend/InjectScriptTagTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/InjectScriptTagTemplate.js rename to flow-tests/test-root-context/src/main/frontend/InjectScriptTagTemplate.js diff --git a/flow-tests/test-root-context/frontend/InjectedChild.js b/flow-tests/test-root-context/src/main/frontend/InjectedChild.js similarity index 100% rename from flow-tests/test-root-context/frontend/InjectedChild.js rename to flow-tests/test-root-context/src/main/frontend/InjectedChild.js diff --git a/flow-tests/test-root-context/frontend/InjectsJsTemplate.js b/flow-tests/test-root-context/src/main/frontend/InjectsJsTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/InjectsJsTemplate.js rename to flow-tests/test-root-context/src/main/frontend/InjectsJsTemplate.js diff --git a/flow-tests/test-root-context/frontend/JsGrandParent.js b/flow-tests/test-root-context/src/main/frontend/JsGrandParent.js similarity index 100% rename from flow-tests/test-root-context/frontend/JsGrandParent.js rename to flow-tests/test-root-context/src/main/frontend/JsGrandParent.js diff --git a/flow-tests/test-root-context/frontend/JsInjectedElement.js b/flow-tests/test-root-context/src/main/frontend/JsInjectedElement.js similarity index 100% rename from flow-tests/test-root-context/frontend/JsInjectedElement.js rename to flow-tests/test-root-context/src/main/frontend/JsInjectedElement.js diff --git a/flow-tests/test-root-context/frontend/JsInjectedGrandChild.js b/flow-tests/test-root-context/src/main/frontend/JsInjectedGrandChild.js similarity index 100% rename from flow-tests/test-root-context/frontend/JsInjectedGrandChild.js rename to flow-tests/test-root-context/src/main/frontend/JsInjectedGrandChild.js diff --git a/flow-tests/test-root-context/frontend/JsSubTemplate.js b/flow-tests/test-root-context/src/main/frontend/JsSubTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/JsSubTemplate.js rename to flow-tests/test-root-context/src/main/frontend/JsSubTemplate.js diff --git a/flow-tests/test-root-context/frontend/ListBinding.js b/flow-tests/test-root-context/src/main/frontend/ListBinding.js similarity index 100% rename from flow-tests/test-root-context/frontend/ListBinding.js rename to flow-tests/test-root-context/src/main/frontend/ListBinding.js diff --git a/flow-tests/test-root-context/frontend/ListInsideListBinding.js b/flow-tests/test-root-context/src/main/frontend/ListInsideListBinding.js similarity index 100% rename from flow-tests/test-root-context/frontend/ListInsideListBinding.js rename to flow-tests/test-root-context/src/main/frontend/ListInsideListBinding.js diff --git a/flow-tests/test-root-context/frontend/MixinInjectsElement.js b/flow-tests/test-root-context/src/main/frontend/MixinInjectsElement.js similarity index 100% rename from flow-tests/test-root-context/frontend/MixinInjectsElement.js rename to flow-tests/test-root-context/src/main/frontend/MixinInjectsElement.js diff --git a/flow-tests/test-root-context/frontend/ModelList.js b/flow-tests/test-root-context/src/main/frontend/ModelList.js similarity index 100% rename from flow-tests/test-root-context/frontend/ModelList.js rename to flow-tests/test-root-context/src/main/frontend/ModelList.js diff --git a/flow-tests/test-root-context/frontend/MultiplePropsMutation.js b/flow-tests/test-root-context/src/main/frontend/MultiplePropsMutation.js similarity index 100% rename from flow-tests/test-root-context/frontend/MultiplePropsMutation.js rename to flow-tests/test-root-context/src/main/frontend/MultiplePropsMutation.js diff --git a/flow-tests/test-root-context/frontend/OneWayPolymerBinding.js b/flow-tests/test-root-context/src/main/frontend/OneWayPolymerBinding.js similarity index 100% rename from flow-tests/test-root-context/frontend/OneWayPolymerBinding.js rename to flow-tests/test-root-context/src/main/frontend/OneWayPolymerBinding.js diff --git a/flow-tests/test-root-context/frontend/ParentIdTemplate.js b/flow-tests/test-root-context/src/main/frontend/ParentIdTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/ParentIdTemplate.js rename to flow-tests/test-root-context/src/main/frontend/ParentIdTemplate.js diff --git a/flow-tests/test-root-context/frontend/ParentTemplate.js b/flow-tests/test-root-context/src/main/frontend/ParentTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/ParentTemplate.js rename to flow-tests/test-root-context/src/main/frontend/ParentTemplate.js diff --git a/flow-tests/test-root-context/frontend/ParentTemplateInjectChild.js b/flow-tests/test-root-context/src/main/frontend/ParentTemplateInjectChild.js similarity index 100% rename from flow-tests/test-root-context/frontend/ParentTemplateInjectChild.js rename to flow-tests/test-root-context/src/main/frontend/ParentTemplateInjectChild.js diff --git a/flow-tests/test-root-context/frontend/PolymerDefaultPropertyValue.js b/flow-tests/test-root-context/src/main/frontend/PolymerDefaultPropertyValue.js similarity index 100% rename from flow-tests/test-root-context/frontend/PolymerDefaultPropertyValue.js rename to flow-tests/test-root-context/src/main/frontend/PolymerDefaultPropertyValue.js diff --git a/flow-tests/test-root-context/frontend/PolymerModelProperties.js b/flow-tests/test-root-context/src/main/frontend/PolymerModelProperties.js similarity index 100% rename from flow-tests/test-root-context/frontend/PolymerModelProperties.js rename to flow-tests/test-root-context/src/main/frontend/PolymerModelProperties.js diff --git a/flow-tests/test-root-context/frontend/PolymerPropertyChange.js b/flow-tests/test-root-context/src/main/frontend/PolymerPropertyChange.js similarity index 100% rename from flow-tests/test-root-context/frontend/PolymerPropertyChange.js rename to flow-tests/test-root-context/src/main/frontend/PolymerPropertyChange.js diff --git a/flow-tests/test-root-context/frontend/PolymerPropertyMutationInObserver.js b/flow-tests/test-root-context/src/main/frontend/PolymerPropertyMutationInObserver.js similarity index 100% rename from flow-tests/test-root-context/frontend/PolymerPropertyMutationInObserver.js rename to flow-tests/test-root-context/src/main/frontend/PolymerPropertyMutationInObserver.js diff --git a/flow-tests/test-root-context/frontend/PropertiesUpdatedBeforeChangeEvents.js b/flow-tests/test-root-context/src/main/frontend/PropertiesUpdatedBeforeChangeEvents.js similarity index 100% rename from flow-tests/test-root-context/frontend/PropertiesUpdatedBeforeChangeEvents.js rename to flow-tests/test-root-context/src/main/frontend/PropertiesUpdatedBeforeChangeEvents.js diff --git a/flow-tests/test-root-context/frontend/ServerModelNullList.js b/flow-tests/test-root-context/src/main/frontend/ServerModelNullList.js similarity index 100% rename from flow-tests/test-root-context/frontend/ServerModelNullList.js rename to flow-tests/test-root-context/src/main/frontend/ServerModelNullList.js diff --git a/flow-tests/test-root-context/frontend/ServerRequest.js b/flow-tests/test-root-context/src/main/frontend/ServerRequest.js similarity index 100% rename from flow-tests/test-root-context/frontend/ServerRequest.js rename to flow-tests/test-root-context/src/main/frontend/ServerRequest.js diff --git a/flow-tests/test-root-context/frontend/SetInitialText.js b/flow-tests/test-root-context/src/main/frontend/SetInitialText.js similarity index 100% rename from flow-tests/test-root-context/frontend/SetInitialText.js rename to flow-tests/test-root-context/src/main/frontend/SetInitialText.js diff --git a/flow-tests/test-root-context/frontend/SubPropertyModel.js b/flow-tests/test-root-context/src/main/frontend/SubPropertyModel.js similarity index 100% rename from flow-tests/test-root-context/frontend/SubPropertyModel.js rename to flow-tests/test-root-context/src/main/frontend/SubPropertyModel.js diff --git a/flow-tests/test-root-context/frontend/TemplateMappingDetector.js b/flow-tests/test-root-context/src/main/frontend/TemplateMappingDetector.js similarity index 100% rename from flow-tests/test-root-context/frontend/TemplateMappingDetector.js rename to flow-tests/test-root-context/src/main/frontend/TemplateMappingDetector.js diff --git a/flow-tests/test-root-context/frontend/TemplateMappingDetectorParent.js b/flow-tests/test-root-context/src/main/frontend/TemplateMappingDetectorParent.js similarity index 100% rename from flow-tests/test-root-context/frontend/TemplateMappingDetectorParent.js rename to flow-tests/test-root-context/src/main/frontend/TemplateMappingDetectorParent.js diff --git a/flow-tests/test-root-context/frontend/TemplateProperties.js b/flow-tests/test-root-context/src/main/frontend/TemplateProperties.js similarity index 100% rename from flow-tests/test-root-context/frontend/TemplateProperties.js rename to flow-tests/test-root-context/src/main/frontend/TemplateProperties.js diff --git a/flow-tests/test-root-context/frontend/TemplateWithConnectedCallbacks.js b/flow-tests/test-root-context/src/main/frontend/TemplateWithConnectedCallbacks.js similarity index 100% rename from flow-tests/test-root-context/frontend/TemplateWithConnectedCallbacks.js rename to flow-tests/test-root-context/src/main/frontend/TemplateWithConnectedCallbacks.js diff --git a/flow-tests/test-root-context/frontend/TemplateWithInjectedId.js b/flow-tests/test-root-context/src/main/frontend/TemplateWithInjectedId.js similarity index 100% rename from flow-tests/test-root-context/frontend/TemplateWithInjectedId.js rename to flow-tests/test-root-context/src/main/frontend/TemplateWithInjectedId.js diff --git a/flow-tests/test-root-context/frontend/TwoWayListBinding.js b/flow-tests/test-root-context/src/main/frontend/TwoWayListBinding.js similarity index 100% rename from flow-tests/test-root-context/frontend/TwoWayListBinding.js rename to flow-tests/test-root-context/src/main/frontend/TwoWayListBinding.js diff --git a/flow-tests/test-root-context/frontend/TwoWayPolymerBinding.js b/flow-tests/test-root-context/src/main/frontend/TwoWayPolymerBinding.js similarity index 100% rename from flow-tests/test-root-context/frontend/TwoWayPolymerBinding.js rename to flow-tests/test-root-context/src/main/frontend/TwoWayPolymerBinding.js diff --git a/flow-tests/test-root-context/frontend/UpdatableModelProperties.js b/flow-tests/test-root-context/src/main/frontend/UpdatableModelProperties.js similarity index 100% rename from flow-tests/test-root-context/frontend/UpdatableModelProperties.js rename to flow-tests/test-root-context/src/main/frontend/UpdatableModelProperties.js diff --git a/flow-tests/test-root-context/frontend/UpgradeElement.js b/flow-tests/test-root-context/src/main/frontend/UpgradeElement.js similarity index 100% rename from flow-tests/test-root-context/frontend/UpgradeElement.js rename to flow-tests/test-root-context/src/main/frontend/UpgradeElement.js diff --git a/flow-tests/test-root-context/frontend/a-directory/index.js b/flow-tests/test-root-context/src/main/frontend/a-directory/index.js similarity index 100% rename from flow-tests/test-root-context/frontend/a-directory/index.js rename to flow-tests/test-root-context/src/main/frontend/a-directory/index.js diff --git a/flow-tests/test-root-context/frontend/com/vaadin/flow/uitest/ui/CustomCustomElement.js b/flow-tests/test-root-context/src/main/frontend/com/vaadin/flow/uitest/ui/CustomCustomElement.js similarity index 100% rename from flow-tests/test-root-context/frontend/com/vaadin/flow/uitest/ui/CustomCustomElement.js rename to flow-tests/test-root-context/src/main/frontend/com/vaadin/flow/uitest/ui/CustomCustomElement.js diff --git a/flow-tests/test-root-context/frontend/com/vaadin/flow/uitest/ui/dependencies/eager.js b/flow-tests/test-root-context/src/main/frontend/com/vaadin/flow/uitest/ui/dependencies/eager.js similarity index 100% rename from flow-tests/test-root-context/frontend/com/vaadin/flow/uitest/ui/dependencies/eager.js rename to flow-tests/test-root-context/src/main/frontend/com/vaadin/flow/uitest/ui/dependencies/eager.js diff --git a/flow-tests/test-root-context/frontend/com/vaadin/flow/uitest/ui/dependencies/inline.js b/flow-tests/test-root-context/src/main/frontend/com/vaadin/flow/uitest/ui/dependencies/inline.js similarity index 100% rename from flow-tests/test-root-context/frontend/com/vaadin/flow/uitest/ui/dependencies/inline.js rename to flow-tests/test-root-context/src/main/frontend/com/vaadin/flow/uitest/ui/dependencies/inline.js diff --git a/flow-tests/test-root-context/frontend/com/vaadin/flow/uitest/ui/dependencies/lazy.js b/flow-tests/test-root-context/src/main/frontend/com/vaadin/flow/uitest/ui/dependencies/lazy.js similarity index 100% rename from flow-tests/test-root-context/frontend/com/vaadin/flow/uitest/ui/dependencies/lazy.js rename to flow-tests/test-root-context/src/main/frontend/com/vaadin/flow/uitest/ui/dependencies/lazy.js diff --git a/flow-tests/test-root-context/frontend/components/context-inline.js b/flow-tests/test-root-context/src/main/frontend/components/context-inline.js similarity index 100% rename from flow-tests/test-root-context/frontend/components/context-inline.js rename to flow-tests/test-root-context/src/main/frontend/components/context-inline.js diff --git a/flow-tests/test-root-context/frontend/dependencies/eager-module.js b/flow-tests/test-root-context/src/main/frontend/dependencies/eager-module.js similarity index 100% rename from flow-tests/test-root-context/frontend/dependencies/eager-module.js rename to flow-tests/test-root-context/src/main/frontend/dependencies/eager-module.js diff --git a/flow-tests/test-root-context/frontend/dependencies/eager.css b/flow-tests/test-root-context/src/main/frontend/dependencies/eager.css similarity index 100% rename from flow-tests/test-root-context/frontend/dependencies/eager.css rename to flow-tests/test-root-context/src/main/frontend/dependencies/eager.css diff --git a/flow-tests/test-root-context/frontend/dependencies/eager.js b/flow-tests/test-root-context/src/main/frontend/dependencies/eager.js similarity index 100% rename from flow-tests/test-root-context/frontend/dependencies/eager.js rename to flow-tests/test-root-context/src/main/frontend/dependencies/eager.js diff --git a/flow-tests/test-root-context/frontend/dependencies/inline.css b/flow-tests/test-root-context/src/main/frontend/dependencies/inline.css similarity index 100% rename from flow-tests/test-root-context/frontend/dependencies/inline.css rename to flow-tests/test-root-context/src/main/frontend/dependencies/inline.css diff --git a/flow-tests/test-root-context/frontend/dependencies/inline.js b/flow-tests/test-root-context/src/main/frontend/dependencies/inline.js similarity index 100% rename from flow-tests/test-root-context/frontend/dependencies/inline.js rename to flow-tests/test-root-context/src/main/frontend/dependencies/inline.js diff --git a/flow-tests/test-root-context/frontend/dependencies/lazy.css b/flow-tests/test-root-context/src/main/frontend/dependencies/lazy.css similarity index 100% rename from flow-tests/test-root-context/frontend/dependencies/lazy.css rename to flow-tests/test-root-context/src/main/frontend/dependencies/lazy.css diff --git a/flow-tests/test-root-context/frontend/dependencies/lazy.js b/flow-tests/test-root-context/src/main/frontend/dependencies/lazy.js similarity index 100% rename from flow-tests/test-root-context/frontend/dependencies/lazy.js rename to flow-tests/test-root-context/src/main/frontend/dependencies/lazy.js diff --git a/flow-tests/test-root-context/frontend/divConnector.js b/flow-tests/test-root-context/src/main/frontend/divConnector.js similarity index 100% rename from flow-tests/test-root-context/frontend/divConnector.js rename to flow-tests/test-root-context/src/main/frontend/divConnector.js diff --git a/flow-tests/test-root-context/frontend/importdir.js b/flow-tests/test-root-context/src/main/frontend/importdir.js similarity index 100% rename from flow-tests/test-root-context/frontend/importdir.js rename to flow-tests/test-root-context/src/main/frontend/importdir.js diff --git a/flow-tests/test-root-context/frontend/in-memory-connector.js b/flow-tests/test-root-context/src/main/frontend/in-memory-connector.js similarity index 100% rename from flow-tests/test-root-context/frontend/in-memory-connector.js rename to flow-tests/test-root-context/src/main/frontend/in-memory-connector.js diff --git a/flow-tests/test-root-context/frontend/js-get-by-id.js b/flow-tests/test-root-context/src/main/frontend/js-get-by-id.js similarity index 100% rename from flow-tests/test-root-context/frontend/js-get-by-id.js rename to flow-tests/test-root-context/src/main/frontend/js-get-by-id.js diff --git a/flow-tests/test-root-context/frontend/lit-templates/AnchorInTemplate.js b/flow-tests/test-root-context/src/main/frontend/lit-templates/AnchorInTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/lit-templates/AnchorInTemplate.js rename to flow-tests/test-root-context/src/main/frontend/lit-templates/AnchorInTemplate.js diff --git a/flow-tests/test-root-context/frontend/lit-templates/AttributeLitTemplate.js b/flow-tests/test-root-context/src/main/frontend/lit-templates/AttributeLitTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/lit-templates/AttributeLitTemplate.js rename to flow-tests/test-root-context/src/main/frontend/lit-templates/AttributeLitTemplate.js diff --git a/flow-tests/test-root-context/frontend/lit-templates/InjectedTemplate.js b/flow-tests/test-root-context/src/main/frontend/lit-templates/InjectedTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/lit-templates/InjectedTemplate.js rename to flow-tests/test-root-context/src/main/frontend/lit-templates/InjectedTemplate.js diff --git a/flow-tests/test-root-context/frontend/lit-templates/InjectingTemplate.js b/flow-tests/test-root-context/src/main/frontend/lit-templates/InjectingTemplate.js similarity index 100% rename from flow-tests/test-root-context/frontend/lit-templates/InjectingTemplate.js rename to flow-tests/test-root-context/src/main/frontend/lit-templates/InjectingTemplate.js diff --git a/flow-tests/test-root-context/frontend/lit-templates/SetInitialText.js b/flow-tests/test-root-context/src/main/frontend/lit-templates/SetInitialText.js similarity index 100% rename from flow-tests/test-root-context/frontend/lit-templates/SetInitialText.js rename to flow-tests/test-root-context/src/main/frontend/lit-templates/SetInitialText.js diff --git a/flow-tests/test-root-context/frontend/lit-templates/lit-template-inner.js b/flow-tests/test-root-context/src/main/frontend/lit-templates/lit-template-inner.js similarity index 100% rename from flow-tests/test-root-context/frontend/lit-templates/lit-template-inner.js rename to flow-tests/test-root-context/src/main/frontend/lit-templates/lit-template-inner.js diff --git a/flow-tests/test-root-context/frontend/lit-templates/lit-template-outer.js b/flow-tests/test-root-context/src/main/frontend/lit-templates/lit-template-outer.js similarity index 100% rename from flow-tests/test-root-context/frontend/lit-templates/lit-template-outer.js rename to flow-tests/test-root-context/src/main/frontend/lit-templates/lit-template-outer.js diff --git a/flow-tests/test-root-context/frontend/lit-templates/simple-lit-template-no-shadow-root.js b/flow-tests/test-root-context/src/main/frontend/lit-templates/simple-lit-template-no-shadow-root.js similarity index 100% rename from flow-tests/test-root-context/frontend/lit-templates/simple-lit-template-no-shadow-root.js rename to flow-tests/test-root-context/src/main/frontend/lit-templates/simple-lit-template-no-shadow-root.js diff --git a/flow-tests/test-root-context/frontend/lit-templates/simple-lit-template-shadow-root.js b/flow-tests/test-root-context/src/main/frontend/lit-templates/simple-lit-template-shadow-root.js similarity index 100% rename from flow-tests/test-root-context/frontend/lit-templates/simple-lit-template-shadow-root.js rename to flow-tests/test-root-context/src/main/frontend/lit-templates/simple-lit-template-shadow-root.js diff --git a/flow-tests/test-root-context/frontend/lit-templates/test-form.js b/flow-tests/test-root-context/src/main/frontend/lit-templates/test-form.js similarity index 100% rename from flow-tests/test-root-context/frontend/lit-templates/test-form.js rename to flow-tests/test-root-context/src/main/frontend/lit-templates/test-form.js diff --git a/flow-tests/test-root-context/frontend/template-scalability-panel.js b/flow-tests/test-root-context/src/main/frontend/template-scalability-panel.js similarity index 100% rename from flow-tests/test-root-context/frontend/template-scalability-panel.js rename to flow-tests/test-root-context/src/main/frontend/template-scalability-panel.js diff --git a/flow-tests/test-root-context/frontend/template-scalability-view.js b/flow-tests/test-root-context/src/main/frontend/template-scalability-view.js similarity index 100% rename from flow-tests/test-root-context/frontend/template-scalability-view.js rename to flow-tests/test-root-context/src/main/frontend/template-scalability-view.js diff --git a/flow-tests/test-root-context/frontend/template-without-shadow-root-view.js b/flow-tests/test-root-context/src/main/frontend/template-without-shadow-root-view.js similarity index 100% rename from flow-tests/test-root-context/frontend/template-without-shadow-root-view.js rename to flow-tests/test-root-context/src/main/frontend/template-without-shadow-root-view.js diff --git a/flow-tests/test-root-context/frontend/x-lazy-widget.js b/flow-tests/test-root-context/src/main/frontend/x-lazy-widget.js similarity index 100% rename from flow-tests/test-root-context/frontend/x-lazy-widget.js rename to flow-tests/test-root-context/src/main/frontend/x-lazy-widget.js diff --git a/flow-tests/test-root-context/src/test/java/com/vaadin/flow/ClientResourceIT.java b/flow-tests/test-root-context/src/test/java/com/vaadin/flow/ClientResourceIT.java index 765d5b5515b..43294f2e08c 100644 --- a/flow-tests/test-root-context/src/test/java/com/vaadin/flow/ClientResourceIT.java +++ b/flow-tests/test-root-context/src/test/java/com/vaadin/flow/ClientResourceIT.java @@ -23,25 +23,39 @@ import org.junit.Assert; import org.junit.Test; +import com.vaadin.flow.server.frontend.FrontendUtils; import com.vaadin.flow.testutil.ChromeBrowserTest; public class ClientResourceIT extends ChromeBrowserTest { @Test public void clientResourcesAreNotExposed() throws IOException { - assertResourceIsUnavailable("frontend/Flow.js"); - assertResourceIsUnavailable("frontend/Flow.js.map"); - assertResourceIsUnavailable("frontend/vaadin-dev-tools.js.map"); - assertResourceIsUnavailable("frontend/vaadin-dev-tools.d.ts"); - assertResourceIsUnavailable("frontend/FlowBootstrap.d.ts"); - assertResourceIsUnavailable("frontend/index.js"); - assertResourceIsUnavailable("frontend/Flow.d.ts"); - assertResourceIsUnavailable("frontend/index.js.map"); - assertResourceIsUnavailable("frontend/index.d.ts"); - assertResourceIsUnavailable("frontend/FlowClient.d.ts"); - assertResourceIsUnavailable("frontend/vaadin-dev-tools.js"); - assertResourceIsUnavailable("frontend/copy-to-clipboard.js"); - assertResourceIsUnavailable("frontend/FlowClient.js"); + assertResourceIsUnavailable( + FrontendUtils.DEFAULT_FRONTEND_DIR + "Flow.js"); + assertResourceIsUnavailable( + FrontendUtils.DEFAULT_FRONTEND_DIR + "Flow.js.map"); + assertResourceIsUnavailable( + FrontendUtils.DEFAULT_FRONTEND_DIR + "vaadin-dev-tools.js.map"); + assertResourceIsUnavailable( + FrontendUtils.DEFAULT_FRONTEND_DIR + "vaadin-dev-tools.d.ts"); + assertResourceIsUnavailable( + FrontendUtils.DEFAULT_FRONTEND_DIR + "FlowBootstrap.d.ts"); + assertResourceIsUnavailable( + FrontendUtils.DEFAULT_FRONTEND_DIR + "index.js"); + assertResourceIsUnavailable( + FrontendUtils.DEFAULT_FRONTEND_DIR + "Flow.d.ts"); + assertResourceIsUnavailable( + FrontendUtils.DEFAULT_FRONTEND_DIR + "index.js.map"); + assertResourceIsUnavailable( + FrontendUtils.DEFAULT_FRONTEND_DIR + "index.d.ts"); + assertResourceIsUnavailable( + FrontendUtils.DEFAULT_FRONTEND_DIR + "FlowClient.d.ts"); + assertResourceIsUnavailable( + FrontendUtils.DEFAULT_FRONTEND_DIR + "vaadin-dev-tools.js"); + assertResourceIsUnavailable( + FrontendUtils.DEFAULT_FRONTEND_DIR + "copy-to-clipboard.js"); + assertResourceIsUnavailable( + FrontendUtils.DEFAULT_FRONTEND_DIR + "FlowClient.js"); } private void assertResourceIsUnavailable(String path) throws IOException { diff --git a/flow-tests/test-theme-editor/frontend/themes/mytheme/styles.css b/flow-tests/test-theme-editor/src/main/frontend/themes/mytheme/styles.css similarity index 100% rename from flow-tests/test-theme-editor/frontend/themes/mytheme/styles.css rename to flow-tests/test-theme-editor/src/main/frontend/themes/mytheme/styles.css diff --git a/flow-tests/test-theme-editor/src/test/java/com/vaadin/flow/uitest/ui/AbstractThemeEditorIT.java b/flow-tests/test-theme-editor/src/test/java/com/vaadin/flow/uitest/ui/AbstractThemeEditorIT.java index bd12f7f014f..17591133532 100644 --- a/flow-tests/test-theme-editor/src/test/java/com/vaadin/flow/uitest/ui/AbstractThemeEditorIT.java +++ b/flow-tests/test-theme-editor/src/test/java/com/vaadin/flow/uitest/ui/AbstractThemeEditorIT.java @@ -79,7 +79,8 @@ protected void open() { private static File getProjectFolder() { File currentFolder = TestUtils.getTestFolder("com"); - while (!new File(currentFolder, FrontendUtils.FRONTEND).exists()) { + while (!new File(currentFolder, FrontendUtils.DEFAULT_FRONTEND_DIR) + .exists()) { currentFolder = currentFolder.getParentFile(); } return currentFolder; @@ -93,7 +94,8 @@ public TestThemeModifier() { @Override protected File getFrontendFolder() { - return new File(getProjectFolder(), FrontendUtils.FRONTEND); + return new File(getProjectFolder(), + FrontendUtils.DEFAULT_FRONTEND_DIR); } public File getStyleSheetFileWithoutSideEffects() { diff --git a/flow-tests/test-theme-no-polymer/src/main/frontend/themes/app-theme/styles.css b/flow-tests/test-theme-no-polymer/src/main/frontend/themes/app-theme/styles.css new file mode 100644 index 00000000000..619d9dbd797 --- /dev/null +++ b/flow-tests/test-theme-no-polymer/src/main/frontend/themes/app-theme/styles.css @@ -0,0 +1,4 @@ +html, :host { + --lumo-primary-text-color: #008000; + color: rgba(0, 0, 0, 1); /* black */ +} diff --git a/flow-tests/test-theme-no-polymer/src/main/frontend/themes/app-theme/theme.json b/flow-tests/test-theme-no-polymer/src/main/frontend/themes/app-theme/theme.json new file mode 100644 index 00000000000..4d032510d5f --- /dev/null +++ b/flow-tests/test-theme-no-polymer/src/main/frontend/themes/app-theme/theme.json @@ -0,0 +1 @@ +{"lumoImports":["typography","color","badge","utility"]} \ No newline at end of file diff --git a/flow-tests/test-themes/frontend/css-loading-view/cssimport.css b/flow-tests/test-themes/src/main/frontend/css-loading-view/cssimport.css similarity index 100% rename from flow-tests/test-themes/frontend/css-loading-view/cssimport.css rename to flow-tests/test-themes/src/main/frontend/css-loading-view/cssimport.css diff --git a/flow-tests/test-themes/frontend/index.html b/flow-tests/test-themes/src/main/frontend/index.html similarity index 100% rename from flow-tests/test-themes/frontend/index.html rename to flow-tests/test-themes/src/main/frontend/index.html diff --git a/flow-tests/test-themes/frontend/index.ts b/flow-tests/test-themes/src/main/frontend/index.ts similarity index 100% rename from flow-tests/test-themes/frontend/index.ts rename to flow-tests/test-themes/src/main/frontend/index.ts diff --git a/flow-tests/test-themes/frontend/themes/app-theme/components/shared/background-color.css b/flow-tests/test-themes/src/main/frontend/themes/app-theme/components/shared/background-color.css similarity index 100% rename from flow-tests/test-themes/frontend/themes/app-theme/components/shared/background-color.css rename to flow-tests/test-themes/src/main/frontend/themes/app-theme/components/shared/background-color.css diff --git a/flow-tests/test-themes/frontend/themes/app-theme/components/vaadin-radio-button.css b/flow-tests/test-themes/src/main/frontend/themes/app-theme/components/vaadin-radio-button.css similarity index 100% rename from flow-tests/test-themes/frontend/themes/app-theme/components/vaadin-radio-button.css rename to flow-tests/test-themes/src/main/frontend/themes/app-theme/components/vaadin-radio-button.css diff --git a/flow-tests/test-themes/frontend/themes/app-theme/components/vaadin-text-field.css b/flow-tests/test-themes/src/main/frontend/themes/app-theme/components/vaadin-text-field.css similarity index 100% rename from flow-tests/test-themes/frontend/themes/app-theme/components/vaadin-text-field.css rename to flow-tests/test-themes/src/main/frontend/themes/app-theme/components/vaadin-text-field.css diff --git a/flow-tests/test-themes/frontend/themes/app-theme/font/IBMPlexMono-Regular.otf b/flow-tests/test-themes/src/main/frontend/themes/app-theme/font/IBMPlexMono-Regular.otf similarity index 100% rename from flow-tests/test-themes/frontend/themes/app-theme/font/IBMPlexMono-Regular.otf rename to flow-tests/test-themes/src/main/frontend/themes/app-theme/font/IBMPlexMono-Regular.otf diff --git a/flow-tests/test-themes/frontend/themes/app-theme/font/ostrich-sans-regular.ttf b/flow-tests/test-themes/src/main/frontend/themes/app-theme/font/ostrich-sans-regular.ttf similarity index 100% rename from flow-tests/test-themes/frontend/themes/app-theme/font/ostrich-sans-regular.ttf rename to flow-tests/test-themes/src/main/frontend/themes/app-theme/font/ostrich-sans-regular.ttf diff --git a/flow-tests/test-themes/frontend/themes/app-theme/icons/archive.png b/flow-tests/test-themes/src/main/frontend/themes/app-theme/icons/archive.png similarity index 100% rename from flow-tests/test-themes/frontend/themes/app-theme/icons/archive.png rename to flow-tests/test-themes/src/main/frontend/themes/app-theme/icons/archive.png diff --git a/flow-tests/test-themes/frontend/themes/app-theme/img/bg.jpg b/flow-tests/test-themes/src/main/frontend/themes/app-theme/img/bg.jpg similarity index 100% rename from flow-tests/test-themes/frontend/themes/app-theme/img/bg.jpg rename to flow-tests/test-themes/src/main/frontend/themes/app-theme/img/bg.jpg diff --git a/flow-tests/test-themes/frontend/themes/app-theme/img/dice.jpg b/flow-tests/test-themes/src/main/frontend/themes/app-theme/img/dice.jpg similarity index 100% rename from flow-tests/test-themes/frontend/themes/app-theme/img/dice.jpg rename to flow-tests/test-themes/src/main/frontend/themes/app-theme/img/dice.jpg diff --git a/flow-tests/test-themes/frontend/themes/app-theme/styles.css b/flow-tests/test-themes/src/main/frontend/themes/app-theme/styles.css similarity index 100% rename from flow-tests/test-themes/frontend/themes/app-theme/styles.css rename to flow-tests/test-themes/src/main/frontend/themes/app-theme/styles.css diff --git a/flow-tests/test-themes/frontend/themes/app-theme/sub-css/sub.css b/flow-tests/test-themes/src/main/frontend/themes/app-theme/sub-css/sub.css similarity index 100% rename from flow-tests/test-themes/frontend/themes/app-theme/sub-css/sub.css rename to flow-tests/test-themes/src/main/frontend/themes/app-theme/sub-css/sub.css diff --git a/flow-tests/test-themes/frontend/themes/app-theme/theme.css b/flow-tests/test-themes/src/main/frontend/themes/app-theme/theme.css similarity index 100% rename from flow-tests/test-themes/frontend/themes/app-theme/theme.css rename to flow-tests/test-themes/src/main/frontend/themes/app-theme/theme.css diff --git a/flow-tests/test-themes/frontend/themes/app-theme/theme.json b/flow-tests/test-themes/src/main/frontend/themes/app-theme/theme.json similarity index 100% rename from flow-tests/test-themes/frontend/themes/app-theme/theme.json rename to flow-tests/test-themes/src/main/frontend/themes/app-theme/theme.json diff --git a/flow-tests/test-themes/frontend/themes/app-theme/unused.css b/flow-tests/test-themes/src/main/frontend/themes/app-theme/unused.css similarity index 100% rename from flow-tests/test-themes/frontend/themes/app-theme/unused.css rename to flow-tests/test-themes/src/main/frontend/themes/app-theme/unused.css diff --git a/flow-tests/test-themes/frontend/themes/no-copy/no-copy.txt b/flow-tests/test-themes/src/main/frontend/themes/no-copy/no-copy.txt similarity index 100% rename from flow-tests/test-themes/frontend/themes/no-copy/no-copy.txt rename to flow-tests/test-themes/src/main/frontend/themes/no-copy/no-copy.txt diff --git a/flow-tests/test-themes/frontend/themes/parent-theme/styles.css b/flow-tests/test-themes/src/main/frontend/themes/parent-theme/styles.css similarity index 100% rename from flow-tests/test-themes/frontend/themes/parent-theme/styles.css rename to flow-tests/test-themes/src/main/frontend/themes/parent-theme/styles.css diff --git a/flow-tests/test-themes/frontend/typescript/hello-world-view.css b/flow-tests/test-themes/src/main/frontend/typescript/hello-world-view.css similarity index 100% rename from flow-tests/test-themes/frontend/typescript/hello-world-view.css rename to flow-tests/test-themes/src/main/frontend/typescript/hello-world-view.css diff --git a/flow-tests/test-themes/frontend/typescript/hello-world-view.ts b/flow-tests/test-themes/src/main/frontend/typescript/hello-world-view.ts similarity index 100% rename from flow-tests/test-themes/frontend/typescript/hello-world-view.ts rename to flow-tests/test-themes/src/main/frontend/typescript/hello-world-view.ts diff --git a/flow-tests/test-themes/src/test/java/com/vaadin/flow/uitest/ui/theme/ThemeIT.java b/flow-tests/test-themes/src/test/java/com/vaadin/flow/uitest/ui/theme/ThemeIT.java index 993da973c4e..3ce9d0c04b7 100644 --- a/flow-tests/test-themes/src/test/java/com/vaadin/flow/uitest/ui/theme/ThemeIT.java +++ b/flow-tests/test-themes/src/test/java/com/vaadin/flow/uitest/ui/theme/ThemeIT.java @@ -37,6 +37,7 @@ import com.vaadin.flow.component.html.testbench.ImageElement; import com.vaadin.flow.component.html.testbench.SpanElement; +import com.vaadin.flow.server.frontend.FrontendUtils; import com.vaadin.flow.testutil.ChromeBrowserTest; import com.vaadin.testbench.TestBenchElement; @@ -110,9 +111,8 @@ public void applicationTheme_onlyStylesCssIsApplied() throws IOException { // Note themes/app-theme resources are served from VAADIN/build in // production mode String imageUrl = body.getCssValue("background-image"); - assertImageEquals( - Paths.get("frontend", "themes", "app-theme", "img", "bg.jpg"), - imageUrl); + assertImageEquals(Paths.get(FrontendUtils.DEFAULT_FRONTEND_DIR, + "themes", "app-theme", "img", "bg.jpg"), imageUrl); Assert.assertEquals("body font-family should come from styles.css", "Ostrich", body.getCssValue("font-family")); @@ -167,9 +167,8 @@ public void subCssWithRelativePath_imageIsLoadedProperly() String backgroundUrl = $(SpanElement.class).id(SUB_COMPONENT_ID) .getCssValue("background-image"); - assertImageEquals( - Paths.get("frontend/themes/app-theme/icons/archive.png"), - backgroundUrl); + assertImageEquals(Paths.get(FrontendUtils.DEFAULT_FRONTEND_DIR + + "themes/app-theme/icons/archive.png"), backgroundUrl); } @Test diff --git a/flow-tests/test-webpush/frontend/sw.ts b/flow-tests/test-webpush/src/main/frontend/sw.ts similarity index 100% rename from flow-tests/test-webpush/frontend/sw.ts rename to flow-tests/test-webpush/src/main/frontend/sw.ts diff --git a/flow-tests/vaadin-spring-tests/test-spring-boot-reload-time/frontend/benchmark.js b/flow-tests/vaadin-spring-tests/test-spring-boot-reload-time/src/main/frontend/benchmark.js similarity index 100% rename from flow-tests/vaadin-spring-tests/test-spring-boot-reload-time/frontend/benchmark.js rename to flow-tests/vaadin-spring-tests/test-spring-boot-reload-time/src/main/frontend/benchmark.js diff --git a/flow-tests/vaadin-spring-tests/test-spring-white-list/frontend/simple-view.js b/flow-tests/vaadin-spring-tests/test-spring-white-list/src/main/frontend/simple-view.js similarity index 100% rename from flow-tests/vaadin-spring-tests/test-spring-white-list/frontend/simple-view.js rename to flow-tests/vaadin-spring-tests/test-spring-white-list/src/main/frontend/simple-view.js diff --git a/vaadin-dev-server/export-metadata-script.ts b/vaadin-dev-server/export-metadata-script.ts index 43f0935dd56..527b15baf9e 100644 --- a/vaadin-dev-server/export-metadata-script.ts +++ b/vaadin-dev-server/export-metadata-script.ts @@ -11,14 +11,14 @@ async function main() { mkdirSync(metadataFolder); - const fileNames = readdirSync(join('.', 'frontend', 'theme-editor', 'metadata', 'components')); + const fileNames = readdirSync(join('.', 'src', 'main', 'frontend', 'theme-editor', 'metadata', 'components')); for (const fileName of fileNames) { if (!fileName.startsWith('vaadin-')) { continue; } const tagName = fileName.split('.')[0]; - const metadata = (await import(`./frontend/theme-editor/metadata/components/${tagName}`)).default + const metadata = (await import(`./src/main/frontend/theme-editor/metadata/components/${tagName}`)).default const metadataString = JSON.stringify(metadata.elements, null, 2); writeFile(join(metadataFolder, `${tagName}.json`), metadataString, (err) => { diff --git a/vaadin-dev-server/patch-application.js b/vaadin-dev-server/patch-application.js index c9c57f10372..c63ea351174 100644 --- a/vaadin-dev-server/patch-application.js +++ b/vaadin-dev-server/patch-application.js @@ -15,7 +15,7 @@ if (!appPath) { const vaadinFilePath = path.join(appPath, 'frontend', 'generated', 'vaadin.ts'); if (!fs.existsSync(vaadinFilePath)) { throw new Error( - `Application path does not contain a ./frontend/generated directory: ${vaadinFilePath}. Make sure to start the app first.` + `Application path does not contain a ./src/main/frontend/generated directory: ${vaadinFilePath}. Make sure to start the app first.` ); } @@ -41,7 +41,7 @@ document.body.append(hmrScript); const devToolsScript = document.createElement("script"); devToolsScript.setAttribute("type", "module"); -devToolsScript.setAttribute("src", "${webDevServerUrl}/frontend/vaadin-dev-tools.ts"); +devToolsScript.setAttribute("src", "${webDevServerUrl}/src/main/frontend/vaadin-dev-tools.ts"); document.body.append(devToolsScript); `; diff --git a/vaadin-dev-server/frontend/License.ts b/vaadin-dev-server/src/main/frontend/License.ts similarity index 100% rename from vaadin-dev-server/frontend/License.ts rename to vaadin-dev-server/src/main/frontend/License.ts diff --git a/vaadin-dev-server/frontend/component-picker.ts b/vaadin-dev-server/src/main/frontend/component-picker.ts similarity index 100% rename from vaadin-dev-server/frontend/component-picker.ts rename to vaadin-dev-server/src/main/frontend/component-picker.ts diff --git a/vaadin-dev-server/frontend/component-util.ts b/vaadin-dev-server/src/main/frontend/component-util.ts similarity index 100% rename from vaadin-dev-server/frontend/component-util.ts rename to vaadin-dev-server/src/main/frontend/component-util.ts diff --git a/vaadin-dev-server/frontend/connection.ts b/vaadin-dev-server/src/main/frontend/connection.ts similarity index 100% rename from vaadin-dev-server/frontend/connection.ts rename to vaadin-dev-server/src/main/frontend/connection.ts diff --git a/vaadin-dev-server/frontend/copy-to-clipboard.js b/vaadin-dev-server/src/main/frontend/copy-to-clipboard.js old mode 100755 new mode 100644 similarity index 100% rename from vaadin-dev-server/frontend/copy-to-clipboard.js rename to vaadin-dev-server/src/main/frontend/copy-to-clipboard.js diff --git a/vaadin-dev-server/frontend/live-reload-connection.ts b/vaadin-dev-server/src/main/frontend/live-reload-connection.ts similarity index 100% rename from vaadin-dev-server/frontend/live-reload-connection.ts rename to vaadin-dev-server/src/main/frontend/live-reload-connection.ts diff --git a/vaadin-dev-server/frontend/shim.ts b/vaadin-dev-server/src/main/frontend/shim.ts similarity index 100% rename from vaadin-dev-server/frontend/shim.ts rename to vaadin-dev-server/src/main/frontend/shim.ts diff --git a/vaadin-dev-server/frontend/styles.ts b/vaadin-dev-server/src/main/frontend/styles.ts similarity index 100% rename from vaadin-dev-server/frontend/styles.ts rename to vaadin-dev-server/src/main/frontend/styles.ts diff --git a/vaadin-dev-server/frontend/theme-editor/api.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/api.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/api.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/api.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/api.ts b/vaadin-dev-server/src/main/frontend/theme-editor/api.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/api.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/api.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/class-name-editor.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/class-name-editor.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/class-name-editor.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/class-name-editor.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/class-name-editor.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/class-name-editor.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/class-name-editor.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/class-name-editor.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/component-overlay-manager.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/component-overlay-manager.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/component-overlay-manager.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/component-overlay-manager.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/component-overlay-manager.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/component-overlay-manager.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/component-overlay-manager.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/component-overlay-manager.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/component-resolver.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/component-resolver.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/component-resolver.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/component-resolver.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/editors/base-property-editor.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/editors/base-property-editor.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/editors/base-property-editor.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/editors/base-property-editor.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/editors/base-property-editor.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/editors/base-property-editor.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/editors/base-property-editor.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/editors/base-property-editor.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/editors/checkbox-property-editor.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/editors/checkbox-property-editor.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/editors/checkbox-property-editor.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/editors/checkbox-property-editor.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/editors/checkbox-property-editor.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/editors/checkbox-property-editor.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/editors/checkbox-property-editor.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/editors/checkbox-property-editor.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/editors/color-picker.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/editors/color-picker.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/editors/color-picker.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/editors/color-picker.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/editors/color-picker.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/editors/color-picker.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/editors/color-picker.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/editors/color-picker.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/editors/color-property-editor.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/editors/color-property-editor.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/editors/color-property-editor.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/editors/color-property-editor.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/editors/color-property-editor.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/editors/color-property-editor.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/editors/color-property-editor.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/editors/color-property-editor.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/editors/range-property-editor.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/editors/range-property-editor.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/editors/range-property-editor.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/editors/range-property-editor.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/editors/range-property-editor.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/editors/range-property-editor.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/editors/range-property-editor.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/editors/range-property-editor.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/editors/text-property-editor.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/editors/text-property-editor.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/editors/text-property-editor.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/editors/text-property-editor.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/editors/text-property-editor.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/editors/text-property-editor.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/editors/text-property-editor.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/editors/text-property-editor.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/property-list.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/property-list.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/property-list.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/property-list.ts diff --git a/vaadin-dev-server/frontend/theme-editor/components/scope-selector.ts b/vaadin-dev-server/src/main/frontend/theme-editor/components/scope-selector.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/components/scope-selector.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/components/scope-selector.ts diff --git a/vaadin-dev-server/frontend/theme-editor/detector.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/detector.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/detector.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/detector.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/detector.ts b/vaadin-dev-server/src/main/frontend/theme-editor/detector.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/detector.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/detector.ts diff --git a/vaadin-dev-server/frontend/theme-editor/editor.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/editor.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/editor.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/editor.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/editor.ts b/vaadin-dev-server/src/main/frontend/theme-editor/editor.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/editor.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/editor.ts diff --git a/vaadin-dev-server/frontend/theme-editor/history.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/history.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/history.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/history.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/history.ts b/vaadin-dev-server/src/main/frontend/theme-editor/history.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/history.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/history.ts diff --git a/vaadin-dev-server/frontend/theme-editor/icons.ts b/vaadin-dev-server/src/main/frontend/theme-editor/icons.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/icons.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/icons.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/defaults.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/defaults.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/defaults.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/defaults.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/generic.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/generic.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/generic.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/generic.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/presets.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/presets.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/presets.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/presets.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-accordion-heading.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-accordion-heading.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-accordion-heading.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-accordion-heading.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-accordion-panel.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-accordion-panel.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-accordion-panel.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-accordion-panel.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-accordion.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-accordion.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-accordion.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-accordion.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-app-layout.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-app-layout.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-app-layout.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-app-layout.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-avatar.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-avatar.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-avatar.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-avatar.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-big-decimal-field.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-big-decimal-field.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-big-decimal-field.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-big-decimal-field.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-board-row.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-board-row.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-board-row.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-board-row.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-board.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-board.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-board.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-board.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-button.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-button.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-button.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-button.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-chart.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-chart.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-chart.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-chart.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-checkbox-group.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-checkbox-group.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-checkbox-group.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-checkbox-group.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-checkbox.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-checkbox.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-checkbox.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-checkbox.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-combo-box.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-combo-box.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-combo-box.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-combo-box.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-confirm-dialog.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-confirm-dialog.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-confirm-dialog.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-confirm-dialog.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-cookie-consent.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-cookie-consent.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-cookie-consent.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-cookie-consent.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-crud.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-crud.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-crud.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-crud.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-custom-field.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-custom-field.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-custom-field.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-custom-field.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-date-picker.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-date-picker.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-date-picker.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-date-picker.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-date-time-picker.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-date-time-picker.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-date-time-picker.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-date-time-picker.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-details-summary.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-details-summary.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-details-summary.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-details-summary.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-details.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-details.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-details.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-details.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-dialog.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-dialog.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-dialog.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-dialog.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-email-field.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-email-field.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-email-field.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-email-field.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-form-layout.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-form-layout.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-form-layout.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-form-layout.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-grid-pro.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-grid-pro.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-grid-pro.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-grid-pro.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-grid.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-grid.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-grid.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-grid.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-horizontal-layout.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-horizontal-layout.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-horizontal-layout.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-horizontal-layout.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-icon.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-icon.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-icon.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-icon.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-integer-field.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-integer-field.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-integer-field.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-integer-field.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-list-box.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-list-box.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-list-box.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-list-box.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-login-form.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-login-form.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-login-form.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-login-form.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-login-overlay.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-login-overlay.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-login-overlay.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-login-overlay.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-map.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-map.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-map.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-map.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-menu-bar.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-menu-bar.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-menu-bar.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-menu-bar.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-message-input.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-message-input.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-message-input.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-message-input.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-message-list.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-message-list.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-message-list.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-message-list.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-multi-select-combo-box.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-multi-select-combo-box.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-multi-select-combo-box.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-multi-select-combo-box.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-notification.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-notification.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-notification.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-notification.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-number-field.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-number-field.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-number-field.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-number-field.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-password-field.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-password-field.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-password-field.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-password-field.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-progress-bar.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-progress-bar.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-progress-bar.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-progress-bar.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-radio-group.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-radio-group.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-radio-group.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-radio-group.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-rich-text-editor.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-rich-text-editor.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-rich-text-editor.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-rich-text-editor.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-scroller.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-scroller.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-scroller.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-scroller.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-select.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-select.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-select.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-select.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-side-nav-item.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-side-nav-item.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-side-nav-item.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-side-nav-item.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-side-nav.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-side-nav.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-side-nav.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-side-nav.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-split-layout.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-split-layout.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-split-layout.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-split-layout.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-spreadsheet.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-spreadsheet.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-spreadsheet.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-spreadsheet.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-tab.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-tab.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-tab.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-tab.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-tabs.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-tabs.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-tabs.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-tabs.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-tabsheet.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-tabsheet.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-tabsheet.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-tabsheet.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-text-area.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-text-area.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-text-area.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-text-area.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-text-field.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-text-field.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-text-field.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-text-field.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-time-picker.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-time-picker.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-time-picker.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-time-picker.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-upload.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-upload.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-upload.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-upload.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-vertical-layout.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-vertical-layout.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-vertical-layout.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-vertical-layout.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-virtual-list.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-virtual-list.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/components/vaadin-virtual-list.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/components/vaadin-virtual-list.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/model.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/model.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/model.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/model.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/registry.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/registry.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/registry.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/registry.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/metadata/registry.ts b/vaadin-dev-server/src/main/frontend/theme-editor/metadata/registry.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/metadata/registry.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/metadata/registry.ts diff --git a/vaadin-dev-server/frontend/theme-editor/model.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/model.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/model.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/model.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/model.ts b/vaadin-dev-server/src/main/frontend/theme-editor/model.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/model.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/model.ts diff --git a/vaadin-dev-server/frontend/theme-editor/preview.test.ts b/vaadin-dev-server/src/main/frontend/theme-editor/preview.test.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/preview.test.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/preview.test.ts diff --git a/vaadin-dev-server/frontend/theme-editor/preview.ts b/vaadin-dev-server/src/main/frontend/theme-editor/preview.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/preview.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/preview.ts diff --git a/vaadin-dev-server/frontend/theme-editor/styles.ts b/vaadin-dev-server/src/main/frontend/theme-editor/styles.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/styles.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/styles.ts diff --git a/vaadin-dev-server/frontend/theme-editor/tests/utils.ts b/vaadin-dev-server/src/main/frontend/theme-editor/tests/utils.ts similarity index 100% rename from vaadin-dev-server/frontend/theme-editor/tests/utils.ts rename to vaadin-dev-server/src/main/frontend/theme-editor/tests/utils.ts diff --git a/vaadin-dev-server/frontend/vaadin-dev-tools-info.ts b/vaadin-dev-server/src/main/frontend/vaadin-dev-tools-info.ts similarity index 100% rename from vaadin-dev-server/frontend/vaadin-dev-tools-info.ts rename to vaadin-dev-server/src/main/frontend/vaadin-dev-tools-info.ts diff --git a/vaadin-dev-server/frontend/vaadin-dev-tools-log.ts b/vaadin-dev-server/src/main/frontend/vaadin-dev-tools-log.ts similarity index 100% rename from vaadin-dev-server/frontend/vaadin-dev-tools-log.ts rename to vaadin-dev-server/src/main/frontend/vaadin-dev-tools-log.ts diff --git a/vaadin-dev-server/frontend/vaadin-dev-tools.test.ts b/vaadin-dev-server/src/main/frontend/vaadin-dev-tools.test.ts similarity index 100% rename from vaadin-dev-server/frontend/vaadin-dev-tools.test.ts rename to vaadin-dev-server/src/main/frontend/vaadin-dev-tools.test.ts diff --git a/vaadin-dev-server/frontend/vaadin-dev-tools.ts b/vaadin-dev-server/src/main/frontend/vaadin-dev-tools.ts similarity index 100% rename from vaadin-dev-server/frontend/vaadin-dev-tools.ts rename to vaadin-dev-server/src/main/frontend/vaadin-dev-tools.ts diff --git a/vaadin-dev-server/frontend/vendor/@vaadin/overlay/src/vaadin-overlay-position-mixin.js b/vaadin-dev-server/src/main/frontend/vendor/@vaadin/overlay/src/vaadin-overlay-position-mixin.js similarity index 100% rename from vaadin-dev-server/frontend/vendor/@vaadin/overlay/src/vaadin-overlay-position-mixin.js rename to vaadin-dev-server/src/main/frontend/vendor/@vaadin/overlay/src/vaadin-overlay-position-mixin.js diff --git a/vaadin-dev-server/frontend/websocket-connection.ts b/vaadin-dev-server/src/main/frontend/websocket-connection.ts similarity index 100% rename from vaadin-dev-server/frontend/websocket-connection.ts rename to vaadin-dev-server/src/main/frontend/websocket-connection.ts diff --git a/vaadin-dev-server/src/main/java/com/vaadin/base/devserver/startup/DevModeInitializer.java b/vaadin-dev-server/src/main/java/com/vaadin/base/devserver/startup/DevModeInitializer.java index 68005ac663b..f95fefdbd60 100644 --- a/vaadin-dev-server/src/main/java/com/vaadin/base/devserver/startup/DevModeInitializer.java +++ b/vaadin-dev-server/src/main/java/com/vaadin/base/devserver/startup/DevModeInitializer.java @@ -85,6 +85,8 @@ import static com.vaadin.flow.server.InitParameters.SERVLET_PARAMETER_DEVMODE_OPTIMIZE_BUNDLE; import static com.vaadin.flow.server.frontend.FrontendUtils.DEFAULT_FRONTEND_DIR; import static com.vaadin.flow.server.frontend.FrontendUtils.DEFAULT_PROJECT_FRONTEND_GENERATED_DIR; +import static com.vaadin.flow.server.frontend.FrontendUtils.GENERATED; +import static com.vaadin.flow.server.frontend.FrontendUtils.LEGACY_FRONTEND_DIR; import static com.vaadin.flow.server.frontend.FrontendUtils.PARAM_FRONTEND_DIR; /** @@ -209,12 +211,23 @@ public static DevModeHandler initDevModeHandler(Set> classes, String frontendFolder = config.getStringProperty(PARAM_FRONTEND_DIR, System.getProperty(PARAM_FRONTEND_DIR, DEFAULT_FRONTEND_DIR)); + // If new default frontend folder not exists check for legacy folder. + if (frontendFolder.endsWith(DEFAULT_FRONTEND_DIR) + && !new File(frontendFolder).exists()) { + File legacy = new File(baseDir, LEGACY_FRONTEND_DIR); + if (legacy.exists()) { + frontendFolder = LEGACY_FRONTEND_DIR; + } + } + Lookup lookupFromContext = context.getAttribute(Lookup.class); Lookup lookupForClassFinder = Lookup.of(new DevModeClassFinder(classes), ClassFinder.class); Lookup lookup = Lookup.compose(lookupForClassFinder, lookupFromContext); Options options = new Options(lookup, baseDir) .withFrontendDirectory(new File(frontendFolder)) + .withFrontendGeneratedFolder( + new File(frontendFolder + GENERATED)) .withBuildDirectory(config.getBuildFolder()); log().info("Starting dev-mode updaters in {} folder.", @@ -471,7 +484,8 @@ private static File getPhysicalFileOfJBossVfsJar(URL url) // Creating a temporary jar file out of the vfs files String vfsJarPath = url.toString(); String fileNamePrefix = vfsJarPath.substring( - vfsJarPath.lastIndexOf('/') + 1, + vfsJarPath.lastIndexOf( + FrontendUtils.isWindows() ? '\\' : '/') + 1, vfsJarPath.lastIndexOf(".jar")); Path tempJar = Files.createTempFile(fileNamePrefix, ".jar"); diff --git a/vaadin-dev-server/src/main/java/com/vaadin/base/devserver/themeeditor/ThemeModifier.java b/vaadin-dev-server/src/main/java/com/vaadin/base/devserver/themeeditor/ThemeModifier.java index 0909b2640f2..0232e980a6c 100644 --- a/vaadin-dev-server/src/main/java/com/vaadin/base/devserver/themeeditor/ThemeModifier.java +++ b/vaadin-dev-server/src/main/java/com/vaadin/base/devserver/themeeditor/ThemeModifier.java @@ -189,8 +189,10 @@ protected State init() { } protected File getFrontendFolder() { - return new File(ApplicationConfiguration.get(context).getStringProperty( - FrontendUtils.PROJECT_BASEDIR, null), "frontend"); + return new File( + ApplicationConfiguration.get(context) + .getStringProperty(FrontendUtils.PROJECT_BASEDIR, null), + FrontendUtils.DEFAULT_FRONTEND_DIR); } protected File getThemeFile() { diff --git a/vaadin-dev-server/src/test/java/com/vaadin/base/devserver/startup/DevModeInitializerClassLoaderTest.java b/vaadin-dev-server/src/test/java/com/vaadin/base/devserver/startup/DevModeInitializerClassLoaderTest.java index 4ba37f5e1b0..ec1528738f0 100644 --- a/vaadin-dev-server/src/test/java/com/vaadin/base/devserver/startup/DevModeInitializerClassLoaderTest.java +++ b/vaadin-dev-server/src/test/java/com/vaadin/base/devserver/startup/DevModeInitializerClassLoaderTest.java @@ -54,9 +54,9 @@ public void should_loadResources_from_customClassLoader() throws Exception { customLoader.close(); - List files = TestUtils.listFilesRecursively( - Paths.get(baseDir, "frontend", FrontendUtils.GENERATED, - FrontendUtils.JAR_RESOURCES_FOLDER).toFile()); + List files = TestUtils.listFilesRecursively(Paths.get(baseDir, + FrontendUtils.DEFAULT_FRONTEND_DIR, FrontendUtils.GENERATED, + FrontendUtils.JAR_RESOURCES_FOLDER).toFile()); Assert.assertEquals(5, files.size()); Assert.assertTrue("A package.json file should be created", diff --git a/vaadin-dev-server/src/test/java/com/vaadin/base/devserver/startup/DevModeInitializerTest.java b/vaadin-dev-server/src/test/java/com/vaadin/base/devserver/startup/DevModeInitializerTest.java index 20752cd3413..b142e5d8a77 100644 --- a/vaadin-dev-server/src/test/java/com/vaadin/base/devserver/startup/DevModeInitializerTest.java +++ b/vaadin-dev-server/src/test/java/com/vaadin/base/devserver/startup/DevModeInitializerTest.java @@ -313,8 +313,8 @@ public void shouldUseByteCodeScannerIfPropertySet() throws Exception { private String getFlowGeneratedImports() throws IOException { return FileUtils.readFileToString( - FrontendUtils.getFlowGeneratedImports( - new File(npmFolder, "frontend")), + FrontendUtils.getFlowGeneratedImports(new File(npmFolder, + FrontendUtils.DEFAULT_FRONTEND_DIR)), StandardCharsets.UTF_8); } diff --git a/vaadin-dev-server/tsconfig.json b/vaadin-dev-server/tsconfig.json index 9923960f922..a8e416e07cb 100644 --- a/vaadin-dev-server/tsconfig.json +++ b/vaadin-dev-server/tsconfig.json @@ -23,6 +23,6 @@ "declarationDir": "src/main/resources/META-INF/frontend/vaadin-dev-tools", "emitDeclarationOnly": true }, - "include": ["frontend/vaadin-dev-tools*.ts"], + "include": ["src/main/frontend/vaadin-dev-tools*.ts"], "exclude": [] } diff --git a/vaadin-dev-server/vite.config.js b/vaadin-dev-server/vite.config.js index 46898bc3a75..a40b4d4705d 100644 --- a/vaadin-dev-server/vite.config.js +++ b/vaadin-dev-server/vite.config.js @@ -12,7 +12,7 @@ export default defineConfig({ emptyOutDir: true, rollupOptions: { input: { - devTools: fileURLToPath(new URL('./frontend/vaadin-dev-tools.ts', import.meta.url)) + devTools: fileURLToPath(new URL('./src/main/frontend/vaadin-dev-tools.ts', import.meta.url)) }, output: { // Ensure consistent file name for dev tools bundle diff --git a/vaadin-dev-server/web-dev-server.config.mjs b/vaadin-dev-server/web-dev-server.config.mjs index 60925a746f9..05c529a38c2 100644 --- a/vaadin-dev-server/web-dev-server.config.mjs +++ b/vaadin-dev-server/web-dev-server.config.mjs @@ -12,7 +12,7 @@ export default { }), // Enable hot module reload for dev tools components hmrPlugin({ - include: ['frontend/**/*'], + include: ['src/main/frontend/**/*'], presets: [presets.lit] }), ], diff --git a/vaadin-dev-server/web-test-runner.config.mjs b/vaadin-dev-server/web-test-runner.config.mjs index 4fc99418173..8ebcf553f15 100644 --- a/vaadin-dev-server/web-test-runner.config.mjs +++ b/vaadin-dev-server/web-test-runner.config.mjs @@ -2,7 +2,7 @@ import { esbuildPlugin } from '@web/dev-server-esbuild'; import { fileURLToPath } from "url"; export default { - files: ['frontend/**/*.test.ts'], + files: ['src/main/frontend/**/*.test.ts'], plugins: [ esbuildPlugin({ ts: true,