diff --git a/code-with-quarkus/pom.xml b/code-with-quarkus/pom.xml index 0a9723fa..733b76f4 100644 --- a/code-with-quarkus/pom.xml +++ b/code-with-quarkus/pom.xml @@ -3,9 +3,9 @@ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 - org.acme - code-with-quarkus - 1.0.0-SNAPSHOT + com.github.mcollovati + quarkus-hilla-demo + 1.0-SNAPSHOT 3.10.1 17 @@ -39,9 +39,9 @@ - org.acme - hilla-test-extension - 1.0.0-SNAPSHOT + com.github.mcollovati + quarkus-hilla + ${project.version} io.quarkus diff --git a/hilla-jandex/pom.xml b/hilla-jandex/pom.xml index 0e0b6fe7..e4ac397e 100644 --- a/hilla-jandex/pom.xml +++ b/hilla-jandex/pom.xml @@ -4,10 +4,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.github.mcollovati.hilla + com.github.mcollovati hilla-jandex 1.0-SNAPSHOT - Hilla Jandex index + Hilla - Jandex Jandex index for Hilla packages @@ -53,9 +53,9 @@ engine-runtime - com.github.mcollovati.hilla + com.github.mcollovati hilla-shaded-deps - 1.0-SNAPSHOT + ${project.version} diff --git a/hilla-shaded-deps/pom.xml b/hilla-shaded-deps/pom.xml index d3640049..9dd2a7dd 100644 --- a/hilla-shaded-deps/pom.xml +++ b/hilla-shaded-deps/pom.xml @@ -4,11 +4,11 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.github.mcollovati.hilla + com.github.mcollovati hilla-shaded-deps 1.0-SNAPSHOT - Hilla shaded dependencies - Minimal set of classes required by Hilla at runtime + Hilla - Shaded dependencies + Minimal set of Spring classes required by Hilla at runtime UTF-8 @@ -66,7 +66,9 @@ org/springframework/core/io/InputStreamSource.class org/springframework/core/io/Resource.class org/springframework/core/io/ResourceLoader.class - org/springframework/core/io/support/ResourcePatternResolver.class + + org/springframework/core/io/support/ResourcePatternResolver.class + org/springframework/util/Assert.class org/springframework/util/ClassUtils.class org/springframework/util/CollectionUtils.class @@ -102,7 +104,9 @@ org/springframework/beans/factory/*Exception.class org/springframework/beans/factory/*Factory.class org/springframework/beans/factory/ObjectProvider.class - org/springframework/beans/factory/config/AutowireCapableBeanFactory.class + + org/springframework/beans/factory/config/AutowireCapableBeanFactory.class + diff --git a/hilla-test-extension/.gitignore b/hilla-test-extension/.gitignore index 39c185f3..d16d985f 100644 --- a/hilla-test-extension/.gitignore +++ b/hilla-test-extension/.gitignore @@ -13,6 +13,10 @@ node_modules/ frontend/generated/ pnpmfile.js vite.generated.ts +deployment/package*.json +deployment/vite*.ts +deployment/tsconfig.json +deployment/types.d.ts # Browser drivers for local integration tests drivers/ diff --git a/hilla-test-extension/README.md b/hilla-test-extension/README.md new file mode 100644 index 00000000..9c8606e2 --- /dev/null +++ b/hilla-test-extension/README.md @@ -0,0 +1,54 @@ +# Quarkus - Hilla + +A [Quarkus](https://quarkus.io) extension to run [Hilla](https://hilla.dev) +applications on Quarkus. + +Hilla is an open source framework, provided +by [Vaadin Ltd.](https://vaadin.com), +that integrates a Spring Boot Java backend with a reactive TypeScript frontend. + +This extension replaces the Spring Boot backend with Quarkus Context & +Dependency Injection (CDI) and +RESTEasy Reactive for a simpler integration with Quarkus, but preserves the +main features of the Hilla Framework, such +as [Endpoints](https://hilla.dev/docs/lit/guides/endpoints), +[Reactive Endpoints](https://hilla.dev/docs/lit/guides/reactive-endpoints) +and [Security](https://hilla.dev/docs/lit/guides/security). + +**NOTE**: This is an **unofficial community extension**, and it is **not** directly +related nor supported by Vaadin Ltd. + +## Limitations + +The current Hilla support has some known limitations: + +* The endpoint prefix is not configurable +* [Stateless Authentication](https://hilla.dev/docs/lit/guides/security/spring-stateless) + is not supported +* Native image compilation does not work + +## Contributors ✨ + +Thanks goes to these wonderful +people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): + + + + + + + + + + + +
Marco Collovati
Marco Collovati

💻 🚧
Dario Götze
Dario Götze

💻 🚧
+ + + + + + +This project follows +the [all-contributors](https://github.com/all-contributors/all-contributors) +specification. Contributions of any kind are welcome! \ No newline at end of file diff --git a/hilla-test-extension/deployment/pom.xml b/hilla-test-extension/deployment/pom.xml index 241f81d5..7ed601ca 100644 --- a/hilla-test-extension/deployment/pom.xml +++ b/hilla-test-extension/deployment/pom.xml @@ -1,89 +1,102 @@ - - 4.0.0 - - org.acme - hilla-test-extension-parent - 1.0.0-SNAPSHOT - - hilla-test-extension-deployment - Hilla Test Extension - Deployment - - - io.quarkus - quarkus-arc-deployment - - - com.vaadin - vaadin-quarkus-deployment - ${vaadin-quarkus.version} - - - com.vaadin - flow-server - - - - - io.quarkus - quarkus-resteasy-reactive-jackson-deployment - - - io.quarkus - quarkus-resteasy-reactive-servlet-deployment - - - org.acme - hilla-test-extension - ${project.version} - - - io.quarkus - quarkus-junit5-internal - test - - - io.rest-assured - rest-assured - test - - - io.quarkus - quarkus-hibernate-validator - test - - - io.quarkus - quarkus-security-deployment - test - - - io.quarkus - quarkus-security-test-utils - test - ${quarkus.version} - - - org.assertj - assertj-core - 3.24.2 - - - - - - maven-compiler-plugin - - - - io.quarkus - quarkus-extension-processor - ${quarkus.version} - - - - - - + + 4.0.0 + + com.github.mcollovati + quarkus-hilla-parent + 1.0-SNAPSHOT + + quarkus-hilla-deployment + Quarkus - Hilla - Deployment + + + io.quarkus + quarkus-arc-deployment + + + com.vaadin + vaadin-quarkus-deployment + ${vaadin-quarkus.version} + + + com.vaadin + flow-server + + + + + io.quarkus + quarkus-resteasy-reactive-jackson-deployment + + + io.quarkus + quarkus-resteasy-reactive-servlet-deployment + + + com.github.mcollovati + quarkus-hilla + ${project.version} + + + io.quarkus + quarkus-junit5-internal + test + + + io.rest-assured + rest-assured + test + + + io.quarkus + quarkus-hibernate-validator + test + + + io.quarkus + quarkus-security-deployment + test + + + io.quarkus + quarkus-security-test-utils + test + ${quarkus.version} + + + org.assertj + assertj-core + test + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${quarkus.version} + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + ${project.build.directory}/frontend + + ${project.build.directory}/frontend/generated + + + + + + diff --git a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/HillaTestExtensionProcessor.java b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/HillaTestExtensionProcessor.java similarity index 93% rename from hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/HillaTestExtensionProcessor.java rename to hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/HillaTestExtensionProcessor.java index 17334167..ef6705d6 100644 --- a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/HillaTestExtensionProcessor.java +++ b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/HillaTestExtensionProcessor.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment; +package com.github.mcollovati.quarkus.hilla.deployment; import javax.annotation.security.DenyAll; import javax.annotation.security.PermitAll; @@ -8,6 +8,13 @@ import java.util.Set; import java.util.function.Predicate; +import com.github.mcollovati.quarkus.hilla.HillaFormAuthenticationMechanism; +import com.github.mcollovati.quarkus.hilla.HillaSecurityPolicy; +import com.github.mcollovati.quarkus.hilla.HillaSecurityRecorder; +import com.github.mcollovati.quarkus.hilla.QuarkusEndpointConfiguration; +import com.github.mcollovati.quarkus.hilla.QuarkusEndpointProperties; +import com.github.mcollovati.quarkus.hilla.deployment.asm.EndpointTransferMapperClassVisitor; +import com.github.mcollovati.quarkus.hilla.deployment.asm.PushEndpointClassVisitor; import dev.hilla.Endpoint; import dev.hilla.EndpointInvoker; import dev.hilla.EndpointRegistry; @@ -39,17 +46,10 @@ import io.quarkus.undertow.deployment.ServletBuildItem; import io.quarkus.vertx.http.runtime.HttpBuildTimeConfig; import io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism; -import org.acme.hilla.test.extension.HillaAtmosphereObjectFactory; -import org.acme.hilla.test.extension.HillaFormAuthenticationMechanism; -import org.acme.hilla.test.extension.HillaSecurityPolicy; -import org.acme.hilla.test.extension.HillaSecurityRecorder; -import org.acme.hilla.test.extension.QuarkusEndpointConfiguration; -import org.acme.hilla.test.extension.QuarkusEndpointController; -import org.acme.hilla.test.extension.QuarkusEndpointProperties; -import org.acme.hilla.test.extension.QuarkusViewAccessChecker; -import org.acme.hilla.test.extension.deployment.asm.EndpointTransferMapperClassVisitor; -import org.acme.hilla.test.extension.deployment.asm.PushEndpointClassVisitor; -import org.acme.hilla.test.extension.deployment.asm.SpringReplacementsClassVisitor; +import com.github.mcollovati.quarkus.hilla.HillaAtmosphereObjectFactory; +import com.github.mcollovati.quarkus.hilla.QuarkusEndpointController; +import com.github.mcollovati.quarkus.hilla.QuarkusViewAccessChecker; +import com.github.mcollovati.quarkus.hilla.deployment.asm.SpringReplacementsClassVisitor; import org.atmosphere.client.TrackMessageSizeInterceptor; import org.atmosphere.cpr.ApplicationConfig; import org.atmosphere.cpr.AtmosphereServlet; @@ -103,7 +103,7 @@ void registerBeans(BuildProducer beans) { beans.produce( new AdditionalBeanBuildItem(QuarkusEndpointProperties.class)); beans.produce(AdditionalBeanBuildItem.builder().addBeanClasses( - "org.acme.hilla.test.extension.QuarkusEndpointControllerConfiguration") + "com.github.mcollovati.quarkus.hilla.QuarkusEndpointControllerConfiguration") .addBeanClasses(QuarkusEndpointConfiguration.class, QuarkusEndpointController.class) .setDefaultScope(BuiltinScope.SINGLETON.getName()) diff --git a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/AsmUtils.java b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/AsmUtils.java similarity index 86% rename from hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/AsmUtils.java rename to hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/AsmUtils.java index d2b3aefd..85b9cc3a 100644 --- a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/AsmUtils.java +++ b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/AsmUtils.java @@ -1,7 +1,6 @@ -package org.acme.hilla.test.extension.deployment.asm; +package com.github.mcollovati.quarkus.hilla.deployment.asm; import org.objectweb.asm.tree.MethodInsnNode; -import org.objectweb.asm.tree.MethodNode; public class AsmUtils { diff --git a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/DropInitStatementMethodNode.java b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/DropInitStatementMethodNode.java similarity index 82% rename from hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/DropInitStatementMethodNode.java rename to hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/DropInitStatementMethodNode.java index 1181d5d5..92fba91e 100644 --- a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/DropInitStatementMethodNode.java +++ b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/DropInitStatementMethodNode.java @@ -1,13 +1,10 @@ -package org.acme.hilla.test.extension.deployment.asm; +package com.github.mcollovati.quarkus.hilla.deployment.asm; import io.quarkus.gizmo.Gizmo; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.tree.AbstractInsnNode; -import org.objectweb.asm.tree.LabelNode; -import org.objectweb.asm.tree.MethodNode; import org.objectweb.asm.tree.TypeInsnNode; -import java.util.ListIterator; import java.util.Set; public class DropInitStatementMethodNode extends DropStatementMethodNode { diff --git a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/DropStatementMethodNode.java b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/DropStatementMethodNode.java similarity index 97% rename from hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/DropStatementMethodNode.java rename to hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/DropStatementMethodNode.java index c487de69..632e73e9 100644 --- a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/DropStatementMethodNode.java +++ b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/DropStatementMethodNode.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment.asm; +package com.github.mcollovati.quarkus.hilla.deployment.asm; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.tree.AbstractInsnNode; diff --git a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/EndpointTransferMapperClassVisitor.java b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/EndpointTransferMapperClassVisitor.java similarity index 94% rename from hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/EndpointTransferMapperClassVisitor.java rename to hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/EndpointTransferMapperClassVisitor.java index fcc31a58..c84b4164 100644 --- a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/EndpointTransferMapperClassVisitor.java +++ b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/EndpointTransferMapperClassVisitor.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment.asm; +package com.github.mcollovati.quarkus.hilla.deployment.asm; import io.quarkus.gizmo.Gizmo; import org.objectweb.asm.ClassVisitor; diff --git a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/MethodRedirectVisitor.java b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/MethodRedirectVisitor.java similarity index 96% rename from hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/MethodRedirectVisitor.java rename to hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/MethodRedirectVisitor.java index ae806a43..791a884b 100644 --- a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/MethodRedirectVisitor.java +++ b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/MethodRedirectVisitor.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment.asm; +package com.github.mcollovati.quarkus.hilla.deployment.asm; import io.quarkus.gizmo.Gizmo; import org.objectweb.asm.MethodVisitor; diff --git a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/MethodSignature.java b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/MethodSignature.java similarity index 96% rename from hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/MethodSignature.java rename to hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/MethodSignature.java index 04f5166d..fb348e9d 100644 --- a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/MethodSignature.java +++ b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/MethodSignature.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment.asm; +package com.github.mcollovati.quarkus.hilla.deployment.asm; import java.util.Objects; diff --git a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/PushEndpointClassVisitor.java b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/PushEndpointClassVisitor.java similarity index 97% rename from hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/PushEndpointClassVisitor.java rename to hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/PushEndpointClassVisitor.java index 51b25742..d66bf280 100644 --- a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/PushEndpointClassVisitor.java +++ b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/PushEndpointClassVisitor.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment.asm; +package com.github.mcollovati.quarkus.hilla.deployment.asm; import io.quarkus.gizmo.Gizmo; import org.objectweb.asm.ClassVisitor; diff --git a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/SpringReplacementsClassVisitor.java b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/SpringReplacementsClassVisitor.java similarity index 93% rename from hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/SpringReplacementsClassVisitor.java rename to hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/SpringReplacementsClassVisitor.java index 0e003950..c27f7e75 100644 --- a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/SpringReplacementsClassVisitor.java +++ b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/SpringReplacementsClassVisitor.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment.asm; +package com.github.mcollovati.quarkus.hilla.deployment.asm; import io.quarkus.gizmo.Gizmo; import org.objectweb.asm.ClassVisitor; diff --git a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/SpringReplacementsRedirectMethodVisitor.java b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/SpringReplacementsRedirectMethodVisitor.java similarity index 69% rename from hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/SpringReplacementsRedirectMethodVisitor.java rename to hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/SpringReplacementsRedirectMethodVisitor.java index e0ff2746..57951b99 100644 --- a/hilla-test-extension/deployment/src/main/java/org/acme/hilla/test/extension/deployment/asm/SpringReplacementsRedirectMethodVisitor.java +++ b/hilla-test-extension/deployment/src/main/java/com/github/mcollovati/quarkus/hilla/deployment/asm/SpringReplacementsRedirectMethodVisitor.java @@ -1,10 +1,7 @@ -package org.acme.hilla.test.extension.deployment.asm; +package com.github.mcollovati.quarkus.hilla.deployment.asm; import io.quarkus.gizmo.Gizmo; -import org.acme.hilla.test.extension.deployment.asm.MethodRedirectVisitor; -import org.acme.hilla.test.extension.deployment.asm.MethodSignature; import org.objectweb.asm.MethodVisitor; -import org.objectweb.asm.Opcodes; import java.util.Map; @@ -18,11 +15,11 @@ protected SpringReplacementsRedirectMethodVisitor(MethodVisitor mv) { MethodSignature.of("org/springframework/security/core/context/SecurityContextHolder", "getContext"), MethodSignature.DROP_METHOD, MethodSignature.of("org/springframework/util/ClassUtils", "getUserClass"), - MethodSignature.of("org/acme/hilla/test/extension/SpringReplacements", "classUtils_getUserClass"), + MethodSignature.of("com/github/mcollovati/quarkus/hilla/SpringReplacements", "classUtils_getUserClass"), MethodSignature.of("dev/hilla/AuthenticationUtil", "getSecurityHolderAuthentication", "()Lorg/springframework/security/core/Authentication;"), - MethodSignature.of("org/acme/hilla/test/extension/SpringReplacements", "authenticationUtil_getSecurityHolderAuthentication", "()Ljava/security/Principal;"), + MethodSignature.of("com/github/mcollovati/quarkus/hilla/SpringReplacements", "authenticationUtil_getSecurityHolderAuthentication", "()Ljava/security/Principal;"), MethodSignature.of("dev/hilla/AuthenticationUtil", "getSecurityHolderRoleChecker"), - MethodSignature.of("org/acme/hilla/test/extension/SpringReplacements", "authenticationUtil_getSecurityHolderRoleChecker") + MethodSignature.of("com/github/mcollovati/quarkus/hilla/SpringReplacements", "authenticationUtil_getSecurityHolderRoleChecker") ); redirectVisitors = buildVisitorChain(mv, redirects); } diff --git a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/EndpointControllerTest.java b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/EndpointControllerTest.java similarity index 91% rename from hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/EndpointControllerTest.java rename to hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/EndpointControllerTest.java index e82ce2f4..117821a0 100644 --- a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/EndpointControllerTest.java +++ b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/EndpointControllerTest.java @@ -1,18 +1,18 @@ -package org.acme.hilla.test.extension.deployment; +package com.github.mcollovati.quarkus.hilla.deployment; +import com.github.mcollovati.quarkus.hilla.deployment.TestUtils.Parameters; +import com.github.mcollovati.quarkus.hilla.deployment.endpoints.TestEndpoint; import dev.hilla.exception.EndpointValidationException; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; import io.restassured.http.ContentType; -import org.acme.hilla.test.extension.deployment.TestUtils.Parameters; -import org.acme.hilla.test.extension.deployment.endpoints.TestEndpoint; import org.hamcrest.CoreMatchers; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.acme.hilla.test.extension.deployment.TestUtils.givenEndpointRequest; +import static com.github.mcollovati.quarkus.hilla.deployment.TestUtils.givenEndpointRequest; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.equalTo; @@ -56,7 +56,8 @@ void invokeEndpoint_wrongParametersOrder_badRequest() { givenEndpointRequest(ENDPOINT_NAME, "calculate", Parameters.param("a", 10).add("operator", "+").add("b", 20)) .then().assertThat().statusCode(400).and() - .body("type", equalTo(EndpointValidationException.class.getName())) + .body("type", + equalTo(EndpointValidationException.class.getName())) .and() .body("message", CoreMatchers.allOf(containsString("Validation error"), diff --git a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/EndpointSecurityTest.java b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/EndpointSecurityTest.java similarity index 92% rename from hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/EndpointSecurityTest.java rename to hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/EndpointSecurityTest.java index e4b7d57c..749c9509 100644 --- a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/EndpointSecurityTest.java +++ b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/EndpointSecurityTest.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment; +package com.github.mcollovati.quarkus.hilla.deployment; import java.util.function.UnaryOperator; import java.util.stream.Stream; @@ -7,8 +7,8 @@ import io.quarkus.security.test.utils.TestIdentityProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.specification.RequestSpecification; -import org.acme.hilla.test.extension.deployment.TestUtils.User; -import org.acme.hilla.test.extension.deployment.endpoints.SecureEndpoint; +import com.github.mcollovati.quarkus.hilla.deployment.TestUtils.User; +import com.github.mcollovati.quarkus.hilla.deployment.endpoints.SecureEndpoint; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.JavaArchive; @@ -16,10 +16,10 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.acme.hilla.test.extension.deployment.TestUtils.ADMIN; -import static org.acme.hilla.test.extension.deployment.TestUtils.GUEST; -import static org.acme.hilla.test.extension.deployment.TestUtils.USER; -import static org.acme.hilla.test.extension.deployment.TestUtils.givenEndpointRequest; +import static com.github.mcollovati.quarkus.hilla.deployment.TestUtils.ADMIN; +import static com.github.mcollovati.quarkus.hilla.deployment.TestUtils.GUEST; +import static com.github.mcollovati.quarkus.hilla.deployment.TestUtils.USER; +import static com.github.mcollovati.quarkus.hilla.deployment.TestUtils.givenEndpointRequest; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/HillaPushClient.java b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/HillaPushClient.java similarity index 96% rename from hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/HillaPushClient.java rename to hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/HillaPushClient.java index e8fea1b0..135e55e1 100644 --- a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/HillaPushClient.java +++ b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/HillaPushClient.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment; +package com.github.mcollovati.quarkus.hilla.deployment; import javax.websocket.CloseReason; import javax.websocket.Endpoint; @@ -18,14 +18,10 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; -import java.util.logging.LogManager; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; import org.assertj.core.api.AbstractStringAssert; -import org.assertj.core.api.ObjectAssert; -import org.assertj.core.api.StringAssert; import org.junit.jupiter.api.Assertions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/ReactiveEndpointTest.java b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/ReactiveEndpointTest.java similarity index 97% rename from hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/ReactiveEndpointTest.java rename to hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/ReactiveEndpointTest.java index 6ba721a5..301fc0b3 100644 --- a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/ReactiveEndpointTest.java +++ b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/ReactiveEndpointTest.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment; +package com.github.mcollovati.quarkus.hilla.deployment; import javax.enterprise.context.control.ActivateRequestContext; import javax.websocket.ContainerProvider; @@ -8,11 +8,11 @@ import java.util.UUID; import java.util.concurrent.TimeUnit; +import com.github.mcollovati.quarkus.hilla.deployment.endpoints.ReactiveEndpoint; import io.quarkus.test.QuarkusUnitTest; import io.quarkus.test.common.http.TestHTTPResource; import io.restassured.RestAssured; import io.restassured.http.ContentType; -import org.acme.hilla.test.extension.deployment.endpoints.ReactiveEndpoint; import org.hamcrest.Matchers; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; diff --git a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/ReactiveSecureEndpointTest.java b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/ReactiveSecureEndpointTest.java similarity index 93% rename from hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/ReactiveSecureEndpointTest.java rename to hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/ReactiveSecureEndpointTest.java index 1d65cd04..3f775587 100644 --- a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/ReactiveSecureEndpointTest.java +++ b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/ReactiveSecureEndpointTest.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment; +package com.github.mcollovati.quarkus.hilla.deployment; import javax.enterprise.context.control.ActivateRequestContext; import javax.websocket.ClientEndpointConfig; @@ -12,12 +12,12 @@ import java.util.function.Consumer; import java.util.stream.Stream; +import com.github.mcollovati.quarkus.hilla.deployment.endpoints.ReactiveSecureEndpoint; import io.quarkus.security.test.utils.TestIdentityController; import io.quarkus.security.test.utils.TestIdentityProvider; import io.quarkus.test.QuarkusUnitTest; import io.quarkus.test.common.http.TestHTTPResource; import io.vertx.core.http.HttpHeaders; -import org.acme.hilla.test.extension.deployment.endpoints.ReactiveSecureEndpoint; import org.assertj.core.api.AbstractStringAssert; import org.assertj.core.api.Assertions; import org.jboss.shrinkwrap.api.ShrinkWrap; @@ -27,11 +27,11 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; +import static com.github.mcollovati.quarkus.hilla.deployment.TestUtils.ADMIN; +import static com.github.mcollovati.quarkus.hilla.deployment.TestUtils.ANONYMOUS; +import static com.github.mcollovati.quarkus.hilla.deployment.TestUtils.GUEST; +import static com.github.mcollovati.quarkus.hilla.deployment.TestUtils.USER; import static java.nio.charset.StandardCharsets.UTF_8; -import static org.acme.hilla.test.extension.deployment.TestUtils.ADMIN; -import static org.acme.hilla.test.extension.deployment.TestUtils.ANONYMOUS; -import static org.acme.hilla.test.extension.deployment.TestUtils.GUEST; -import static org.acme.hilla.test.extension.deployment.TestUtils.USER; class ReactiveSecureEndpointTest { private static final String ENDPOINT_NAME = ReactiveSecureEndpoint.class diff --git a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/SpringReplacementsTest.java b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/SpringReplacementsTest.java similarity index 94% rename from hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/SpringReplacementsTest.java rename to hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/SpringReplacementsTest.java index 253f5d0c..6b1774f9 100644 --- a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/SpringReplacementsTest.java +++ b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/SpringReplacementsTest.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment; +package com.github.mcollovati.quarkus.hilla.deployment; import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; @@ -6,12 +6,12 @@ import java.util.Set; import java.util.function.Function; +import com.github.mcollovati.quarkus.hilla.SpringReplacements; import io.quarkus.security.test.utils.AuthData; import io.quarkus.security.test.utils.IdentityMock; import io.quarkus.security.test.utils.TestIdentityController; import io.quarkus.security.test.utils.TestIdentityProvider; import io.quarkus.test.QuarkusUnitTest; -import org.acme.hilla.test.extension.SpringReplacements; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.JavaArchive; @@ -19,8 +19,8 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.acme.hilla.test.extension.deployment.TestUtils.ADMIN; -import static org.acme.hilla.test.extension.deployment.TestUtils.USER; +import static com.github.mcollovati.quarkus.hilla.deployment.TestUtils.ADMIN; +import static com.github.mcollovati.quarkus.hilla.deployment.TestUtils.USER; import static org.assertj.core.api.Assertions.assertThat; class SpringReplacementsTest { diff --git a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/TestUtils.java b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/TestUtils.java similarity index 97% rename from hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/TestUtils.java rename to hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/TestUtils.java index a1c507e3..0eac69c8 100644 --- a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/TestUtils.java +++ b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/TestUtils.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment; +package com.github.mcollovati.quarkus.hilla.deployment; import java.util.LinkedHashMap; import java.util.function.UnaryOperator; diff --git a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/endpoints/ReactiveEndpoint.java b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/endpoints/ReactiveEndpoint.java similarity index 94% rename from hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/endpoints/ReactiveEndpoint.java rename to hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/endpoints/ReactiveEndpoint.java index 696e5eed..fec2bcf8 100644 --- a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/endpoints/ReactiveEndpoint.java +++ b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/endpoints/ReactiveEndpoint.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment.endpoints; +package com.github.mcollovati.quarkus.hilla.deployment.endpoints; import java.time.Duration; import java.util.concurrent.ConcurrentHashMap; diff --git a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/endpoints/ReactiveSecureEndpoint.java b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/endpoints/ReactiveSecureEndpoint.java similarity index 93% rename from hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/endpoints/ReactiveSecureEndpoint.java rename to hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/endpoints/ReactiveSecureEndpoint.java index b6b76b2a..5a6314fb 100644 --- a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/endpoints/ReactiveSecureEndpoint.java +++ b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/endpoints/ReactiveSecureEndpoint.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment.endpoints; +package com.github.mcollovati.quarkus.hilla.deployment.endpoints; import javax.annotation.security.DenyAll; import javax.annotation.security.PermitAll; diff --git a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/endpoints/SecureEndpoint.java b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/endpoints/SecureEndpoint.java similarity index 92% rename from hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/endpoints/SecureEndpoint.java rename to hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/endpoints/SecureEndpoint.java index a2cd9d22..dd078be6 100644 --- a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/endpoints/SecureEndpoint.java +++ b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/endpoints/SecureEndpoint.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment.endpoints; +package com.github.mcollovati.quarkus.hilla.deployment.endpoints; import javax.annotation.security.DenyAll; import javax.annotation.security.PermitAll; diff --git a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/endpoints/TestEndpoint.java b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/endpoints/TestEndpoint.java similarity index 95% rename from hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/endpoints/TestEndpoint.java rename to hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/endpoints/TestEndpoint.java index 908d0366..ce85f8b8 100644 --- a/hilla-test-extension/deployment/src/test/java/org/acme/hilla/test/extension/deployment/endpoints/TestEndpoint.java +++ b/hilla-test-extension/deployment/src/test/java/com/github/mcollovati/quarkus/hilla/deployment/endpoints/TestEndpoint.java @@ -1,4 +1,4 @@ -package org.acme.hilla.test.extension.deployment.endpoints; +package com.github.mcollovati.quarkus.hilla.deployment.endpoints; import java.util.Objects; diff --git a/hilla-test-extension/pom.xml b/hilla-test-extension/pom.xml index 1e9dd4ed..29787bcb 100644 --- a/hilla-test-extension/pom.xml +++ b/hilla-test-extension/pom.xml @@ -1,96 +1,113 @@ - - 4.0.0 - org.acme - hilla-test-extension-parent - 1.0.0-SNAPSHOT - pom - Hilla Test Extension - Parent - - deployment - runtime - - - 3.10.1 - ${surefire-plugin.version} - 11 - UTF-8 - UTF-8 - 2.16.0.Final - 23.3.6 - 23.3.4 - ${flow.version} - 1.1.3 - 3.0.0-M7 - - - - - io.quarkus - quarkus-bom - ${quarkus.version} - pom - import - - - com.vaadin - vaadin-bom - ${vaadin.version} - pom - import - - - - - - - - - io.quarkus - quarkus-maven-plugin - ${quarkus.version} - - - maven-surefire-plugin - ${surefire-plugin.version} - - - org.jboss.logmanager.LogManager - ${maven.home} - ${settings.localRepository} - - - - - maven-failsafe-plugin - ${failsafe-plugin.version} - - - org.jboss.logmanager.LogManager - ${maven.home} - ${settings.localRepository} - - - - - maven-compiler-plugin - ${compiler-plugin.version} - - - -parameters - - - - - - + + 4.0.0 + com.github.mcollovati + quarkus-hilla-parent + 1.0-SNAPSHOT + pom + Quarkus - Hilla - Parent + + + Marco Collovati + + + Dario Götze + + + + deployment + runtime + + + 3.10.1 + 11 + UTF-8 + UTF-8 + + 2.16.0.Final + 23.3.6 + 1.1.3 + 1.3.6 + + 3.24.2 + + 3.0.0 + ${surefire-plugin.version} + + + + + io.quarkus + quarkus-bom + ${quarkus.version} + pom + import + + + com.vaadin + vaadin-bom + ${vaadin.version} + pom + import + + + dev.hilla + hilla-bom + ${hilla.version} + pom + import + + + org.assertj + assertj-bom + ${assertj.version} + pom + import + + + + + + + + io.quarkus + quarkus-maven-plugin + ${quarkus.version} + + + maven-surefire-plugin + ${surefire-plugin.version} + + + org.jboss.logmanager.LogManager + ${maven.home} + ${settings.localRepository} + + + + + maven-failsafe-plugin + ${failsafe-plugin.version} + + + org.jboss.logmanager.LogManager + ${maven.home} + ${settings.localRepository} + + + + + maven-compiler-plugin + ${compiler-plugin.version} + + + -parameters + + + + + + diff --git a/hilla-test-extension/runtime/pom.xml b/hilla-test-extension/runtime/pom.xml index df3b9172..5c8779b0 100644 --- a/hilla-test-extension/runtime/pom.xml +++ b/hilla-test-extension/runtime/pom.xml @@ -4,12 +4,14 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 - org.acme - hilla-test-extension-parent - 1.0.0-SNAPSHOT + com.github.mcollovati + quarkus-hilla-parent + 1.0-SNAPSHOT - hilla-test-extension - Hilla Test Extension - Runtime + quarkus-hilla + Quarkus - Hilla - Runtime + + io.quarkus @@ -35,9 +37,9 @@ quarkus-resteasy-reactive-servlet - com.github.mcollovati.hilla + com.github.mcollovati hilla-jandex - 1.0-SNAPSHOT + ${project.version} @@ -49,7 +51,7 @@ - com.github.mcollovati.hilla:hilla-jandex + com.github.mcollovati:hilla-jandex