From 811c3184b87b4d668695091d7839b7076641f100 Mon Sep 17 00:00:00 2001 From: Petter Holmstrom Date: Wed, 11 Jun 2025 20:43:18 +0200 Subject: [PATCH] Support running the project from target/test-classes. --- .../main/java/com/vaadin/flow/server/frontend/FileIOUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/FileIOUtils.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/FileIOUtils.java index 597b4cea6ca..5dbe5cbb9ed 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/FileIOUtils.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/FileIOUtils.java @@ -126,7 +126,8 @@ static File getProjectFolderFromClasspath(URL rootFolder) // URI decodes the path so that e.g. " " works correctly // Path.of makes windows paths work correctly Path path = Path.of(rootFolder.toURI()); - if (path.endsWith(Path.of("target", "classes"))) { + if (path.endsWith(Path.of("target", "classes")) + || path.endsWith(Path.of("target", "test-classes"))) { return path.getParent().getParent().toFile(); }