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(); }