From cf75e836846f0805609b65055cf69b9df2e82994 Mon Sep 17 00:00:00 2001 From: Marco Collovati Date: Thu, 6 Feb 2025 19:51:40 +0100 Subject: [PATCH] fix: add VaadinSpringDataHelpers to shaded deps (#1269) Some Vaadin components like Grid and Combobox have methods that refers to the VaadinSpringDataHelpers class from vaadin-spring artifact, causing native build to fail because the class cannot be found. This change adds the missing class to the shaded deps in order to fix the native build. Fixes #1221 --- .../deployment/QuarkusHillaNativeProcessor.java | 2 ++ commons/hilla-shaded-deps/pom.xml | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/commons/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/QuarkusHillaNativeProcessor.java b/commons/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/QuarkusHillaNativeProcessor.java index de53224f..a6423c8a 100644 --- a/commons/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/QuarkusHillaNativeProcessor.java +++ b/commons/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/QuarkusHillaNativeProcessor.java @@ -50,6 +50,7 @@ import com.vaadin.hilla.crud.filter.Filter; import com.vaadin.hilla.endpointransfermapper.EndpointTransferMapper; import com.vaadin.hilla.push.PushEndpoint; +import com.vaadin.hilla.signals.handler.SignalsHandler; import io.quarkus.arc.deployment.ExcludedTypeBuildItem; import io.quarkus.bootstrap.classloading.QuarkusClassLoader; import io.quarkus.deployment.Capabilities; @@ -231,6 +232,7 @@ void hillaNativeSupport( classes.addAll(getAnnotatedClasses(index, DotName.createSimple(BrowserCallable.class))); classes.addAll(getAnnotatedClasses(index, DotName.createSimple(Endpoint.class))); classes.addAll(getAnnotatedClasses(index, DotName.createSimple(EndpointExposed.class))); + classes.add(index.getClassByName(SignalsHandler.class)); classes.add(index.getClassByName(PushEndpoint.class)); classes.add(index.getClassByName(Filter.class)); classes.add(index.getClassByName(Pageable.class)); diff --git a/commons/hilla-shaded-deps/pom.xml b/commons/hilla-shaded-deps/pom.xml index 65ec419d..296355cd 100644 --- a/commons/hilla-shaded-deps/pom.xml +++ b/commons/hilla-shaded-deps/pom.xml @@ -35,6 +35,12 @@ ${vaadin.version} true + + com.vaadin + vaadin-spring + ${vaadin.version} + true + @@ -144,6 +150,12 @@ org/springframework/data/util/LazyStreamable.class + + com.vaadin:vaadin-spring + + com/vaadin/flow/spring/data/VaadinSpringDataHelpers.class + + com.vaadin:vaadin-core-internal @@ -166,6 +178,7 @@ org.springframework.data:spring-data-commons com.vaadin:vaadin-core-internal com.vaadin:vaadin-internal + com.vaadin:vaadin-spring