Skip to content

Commit 94a91e3

Browse files
#4432 Highlight that vaadin-maven-plugin must always be defined after maven-compiler-plugin
1 parent e38f32e commit 94a91e3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

articles/flow/production/production-build.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ If you don't have the production Maven profile in your [filename]`pom.xml` file,
112112

113113
Having the production build as a separate Maven profile is recommended to avoid unexpected problems due to production settings during development.
114114

115+
.Caution when defining `vaadin-maven-plugin`
116+
[WARNING]
117+
To ensure that the production build packages all resources correctly, make sure the `vaadin-maven-plugin` is executed after the `maven-compiler-plugin`. This can be achieved either configuring the execution goal of `vaadin-maven-plugin` to run after the goal targeted by `maven-compiler-plugin`, or if both target the same goal, placing the `vaadin-maven-plugin` definition after the `maven-compiler-plugin` in your `pom.xml`.
118+
119+
115120
.Building for 64-bit
116121
[NOTE]
117122
If you're using a 64-bit operating system, be sure to use a 64-bit JDK installation, as well.

articles/flow/production/troubleshooting.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ The application won't start after adding the `flow-server-production-mode` depen
102102
One potential cause of this problem is that the `build-frontend` of the `flow-maven-plugin` wasn't executed, either because the plugin is missing from the [filename]`pom.xml` file, or it's missing in the configuration. To resolve this, add the `flow-maven-plugin` to your Maven `build` block. Make sure it's visible in your production mode profile. Then enable the `build-frontend` goal.
103103

104104

105+
Front-end resources are missing or not loaded in the running application.::
106+
A production build can result in a running application without properly loaded front-end resources due to a misconfigured `vaadin-maven-plugin`.
107+
+
108+
To ensure that the production build packages all resources correctly, make sure the `vaadin-maven-plugin` is executed after the `maven-compiler-plugin`. This can be achieved either configuring the execution goal of `vaadin-maven-plugin` to run after the goal targeted by `maven-compiler-plugin`, or if both target the same goal, placing the `vaadin-maven-plugin` definition after the `maven-compiler-plugin` in your `pom.xml`.
109+
105110
When running multiple Vaadin applications on different ports on the same host, the browser tabs keeps reloading the page.::
106111
The cause of page reloading is possibly due to server session expiration caused by all Vaadin application having the same HTTP session cookie name (e.g., `JSESSIONID`). Cookies for a given host are shared across all of the ports on that host, even though "same-origin policy", typically used by web browsers, isolates content retrieved via different ports.
107112
+

0 commit comments

Comments
 (0)