Skip to content

Commit 7e296dc

Browse files
Highlight that vaadin-maven-plugin must always be defined after maven-compiler-plugin (#4676) (#4704)
Fixes #4432
1 parent 4bc141f commit 7e296dc

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
@@ -165,6 +165,11 @@ For other applications, e.g., Jakarta EE or plain Java, and for better backwards
165165
</profiles>
166166
----
167167

168+
.Caution when defining `vaadin-maven-plugin`
169+
[WARNING]
170+
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`. The same applies for `kotlin-maven-plugin` or any other plugin that produces Vaadin related Java classes.
171+
172+
168173
.Building for 64-bit
169174
[NOTE]
170175
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+
Frontend resources are missing or not loaded in the running application.::
106+
A production build can result in a running application without properly loaded frontend 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`. The same applies for `kotlin-maven-plugin` or any other plugin that produces Vaadin related Java classes.
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)