From c33695539913d15d17be60e2d25026f3d61b868c Mon Sep 17 00:00:00 2001 From: Alex Porcelli Date: Fri, 1 Mar 2024 17:27:48 -0500 Subject: [PATCH] Upgrade to and align with Quarkus 3.8.1 LTS release. --- kogito-apps-build-parent/pom.xml | 49 +------------------ .../pom.xml | 18 ++++++- .../tools/deployment/DevConsoleProcessor.java | 43 +++++++++++++--- .../pom.xml | 10 ++-- .../pom.xml | 2 +- .../deployment/DevConsoleProcessor.java | 45 ++++++++++++++--- .../runtime-tools-quarkus-extension/pom.xml | 5 -- 7 files changed, 97 insertions(+), 75 deletions(-) diff --git a/kogito-apps-build-parent/pom.xml b/kogito-apps-build-parent/pom.xml index bdaa224b08..c5b52ec1e2 100644 --- a/kogito-apps-build-parent/pom.xml +++ b/kogito-apps-build-parent/pom.xml @@ -67,7 +67,7 @@ 999-SNAPSHOT - 6.2.13.Final + 6.4.4.Final 2.3.1 1.10.0 2.0.0 @@ -136,53 +136,6 @@ - - - - - - org.codehaus.mojo - exec-maven-plugin - - - org.drools - drools-util - ${version.drools.util} - - - - - Remove comments from generated files - prepare-package - - java - - - false - true - - org.drools - drools-util - - org.drools.util.RemoveCommentsMain - - true - ${project.basedir}/target/classes/META-INF/quarkus-javadoc.properties - ${project.basedir}/target/classes/META-INF/quarkus-extension.properties - ${project.basedir}/target/generated-sources/annotations/org/kie/kogito/job/http/recipient/JobHttpRecipientRuntimeConfiguration.jdp - ${project.basedir}/target/generated-sources/annotations/org/kie/kogito/job/sink/recipient/JobSinkRecipientRuntimeConfiguration.jdp - ${project.basedir}/target/generated-sources/annotations/org/kie/kogito/addons/quarkus/jobs/service/embedded/KogitoAddonsQuarkusJobsServiceEmbeddedRuntimeConfig.jdp - ${project.basedir}/target/generated-sources/annotations/org/kie/kogito/index/addon/config/DataIndexBuildConfig.jdp - ${project.basedir}/target/generated-sources/annotations/org/kie/kogito/index/addon/config/DataIndexRuntimeConfig.jdp - ${project.basedir}/target/generated-sources/annotations/org/kie/kogito/index/addon/config/DataIndexUIClientRuntimeConfig.jdp - ${project.basedir}/target/generated-sources/annotations/org/kie/kogito/runtime/tools/quarkus/extension/runtime/config/DevConsoleRuntimeConfig.jdp - ${project.basedir}/target/generated-sources/annotations/org/kie/kogito/runtime/tools/quarkus/extension/runtime/config/UserConfig.jdp - - - - - - diff --git a/kogito-quarkus-serverless-workflow-devui-parent/kogito-quarkus-serverless-workflow-devui-deployment/pom.xml b/kogito-quarkus-serverless-workflow-devui-parent/kogito-quarkus-serverless-workflow-devui-deployment/pom.xml index 1b3bfe13fd..8799a6e78f 100644 --- a/kogito-quarkus-serverless-workflow-devui-parent/kogito-quarkus-serverless-workflow-devui-deployment/pom.xml +++ b/kogito-quarkus-serverless-workflow-devui-parent/kogito-quarkus-serverless-workflow-devui-deployment/pom.xml @@ -60,7 +60,7 @@ io.quarkus - quarkus-rest-client-deployment + quarkus-smallrye-reactive-messaging io.quarkus @@ -71,6 +71,22 @@ kogito-quarkus-extension-spi + + + io.quarkus + quarkus-vertx-http-dev-console-spi + + + + io.quarkus + quarkus-smallrye-reactive-messaging-deployment + + + + io.quarkus + quarkus-mutiny-reactive-streams-operators-deployment + + diff --git a/kogito-quarkus-serverless-workflow-devui-parent/kogito-quarkus-serverless-workflow-devui-deployment/src/main/java/org/kie/kogito/swf/tools/deployment/DevConsoleProcessor.java b/kogito-quarkus-serverless-workflow-devui-parent/kogito-quarkus-serverless-workflow-devui-deployment/src/main/java/org/kie/kogito/swf/tools/deployment/DevConsoleProcessor.java index 8c21398e45..81c0ecd137 100644 --- a/kogito-quarkus-serverless-workflow-devui-parent/kogito-quarkus-serverless-workflow-devui-deployment/src/main/java/org/kie/kogito/swf/tools/deployment/DevConsoleProcessor.java +++ b/kogito-quarkus-serverless-workflow-devui-parent/kogito-quarkus-serverless-workflow-devui-deployment/src/main/java/org/kie/kogito/swf/tools/deployment/DevConsoleProcessor.java @@ -22,6 +22,8 @@ import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; import java.util.Optional; import org.kie.kogito.quarkus.extensions.spi.deployment.KogitoDataIndexServiceAvailableBuildItem; @@ -30,8 +32,6 @@ import io.quarkus.deployment.IsDevelopment; import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; -import io.quarkus.deployment.annotations.ExecutionTime; -import io.quarkus.deployment.annotations.Record; import io.quarkus.deployment.builditem.ConfigurationBuildItem; import io.quarkus.deployment.builditem.LaunchModeBuildItem; import io.quarkus.deployment.builditem.LiveReloadBuildItem; @@ -42,10 +42,13 @@ import io.quarkus.devui.spi.page.CardPageBuildItem; import io.quarkus.devui.spi.page.Page; import io.quarkus.maven.dependency.ResolvedDependency; +import io.quarkus.runtime.ShutdownContext; import io.quarkus.vertx.http.deployment.NonApplicationRootPathBuildItem; import io.quarkus.vertx.http.deployment.RouteBuildItem; -import io.quarkus.vertx.http.runtime.devmode.DevConsoleRecorder; +import io.quarkus.vertx.http.runtime.devmode.FileSystemStaticHandler; import io.quarkus.vertx.http.runtime.management.ManagementInterfaceBuildTimeConfig; +import io.vertx.core.Handler; +import io.vertx.ext.web.RoutingContext; public class DevConsoleProcessor { @@ -84,9 +87,7 @@ public CardPageBuildItem pages(NonApplicationRootPathBuildItem nonApplicationRoo } @BuildStep(onlyIf = IsDevelopment.class) - @Record(ExecutionTime.RUNTIME_INIT) - public void deployStaticResources(final DevConsoleRecorder recorder, - final CurateOutcomeBuildItem curateOutcomeBuildItem, + public void deployStaticResources(final CurateOutcomeBuildItem curateOutcomeBuildItem, final LiveReloadBuildItem liveReloadBuildItem, final LaunchModeBuildItem launchMode, final ShutdownContextBuildItem shutdownContext, @@ -105,11 +106,39 @@ public void deployStaticResources(final DevConsoleRecorder recorder, routeBuildItemBuildProducer.produce(new RouteBuildItem.Builder() .route(BASE_RELATIVE_URL + "/*") - .handler(recorder.devConsoleHandler(devConsoleStaticResourcesDeploymentPath.toString(), + .handler(devConsoleHandler(devConsoleStaticResourcesDeploymentPath.toString(), shutdownContext)) .build()); } + /** + * + * @param devConsoleFinalDestination + * @param shutdownContext + * @return + * @deprecated use {@link #fileSystemStaticHandler(List, ShutdownContext)} + */ + @Deprecated + Handler devConsoleHandler(String devConsoleFinalDestination, + ShutdownContext shutdownContext) { + List webRootConfigurations = new ArrayList<>(); + webRootConfigurations.add( + new FileSystemStaticHandler.StaticWebRootConfiguration(devConsoleFinalDestination, "")); + + return fileSystemStaticHandler(webRootConfigurations, shutdownContext); + } + + Handler fileSystemStaticHandler( + List webRootConfigurations, + ShutdownContext shutdownContext) { + + FileSystemStaticHandler fileSystemStaticHandler = new FileSystemStaticHandler(webRootConfigurations); + + shutdownContext.addShutdownTask(new ShutdownContext.CloseRunnable(fileSystemStaticHandler)); + + return fileSystemStaticHandler; + } + @SuppressWarnings("unused") @BuildStep(onlyIf = IsDevelopment.class) public void isDataIndexAvailable(BuildProducer devConsoleTemplateInfoBuildItemBuildProducer, diff --git a/kogito-quarkus-serverless-workflow-devui-parent/kogito-quarkus-serverless-workflow-devui/pom.xml b/kogito-quarkus-serverless-workflow-devui-parent/kogito-quarkus-serverless-workflow-devui/pom.xml index 60428221e0..7b01cb6a1e 100644 --- a/kogito-quarkus-serverless-workflow-devui-parent/kogito-quarkus-serverless-workflow-devui/pom.xml +++ b/kogito-quarkus-serverless-workflow-devui-parent/kogito-quarkus-serverless-workflow-devui/pom.xml @@ -47,11 +47,6 @@ quarkus-resteasy-jackson - - io.quarkus - quarkus-rest-client - - io.quarkus quarkus-resteasy-multipart @@ -67,6 +62,11 @@ arc-processor + + io.quarkus + quarkus-smallrye-reactive-messaging + + diff --git a/runtime-tools-quarkus-extension-parent/runtime-tools-quarkus-extension-deployment/pom.xml b/runtime-tools-quarkus-extension-parent/runtime-tools-quarkus-extension-deployment/pom.xml index f6937b6ed1..ebf7829ee6 100644 --- a/runtime-tools-quarkus-extension-parent/runtime-tools-quarkus-extension-deployment/pom.xml +++ b/runtime-tools-quarkus-extension-parent/runtime-tools-quarkus-extension-deployment/pom.xml @@ -60,7 +60,7 @@ io.quarkus - quarkus-rest-client-deployment + quarkus-vertx-http-dev-console-spi io.quarkus diff --git a/runtime-tools-quarkus-extension-parent/runtime-tools-quarkus-extension-deployment/src/main/java/org/kie/kogito/runtime/tools/quarkus/extension/deployment/DevConsoleProcessor.java b/runtime-tools-quarkus-extension-parent/runtime-tools-quarkus-extension-deployment/src/main/java/org/kie/kogito/runtime/tools/quarkus/extension/deployment/DevConsoleProcessor.java index a5337babd5..a1d068a804 100644 --- a/runtime-tools-quarkus-extension-parent/runtime-tools-quarkus-extension-deployment/src/main/java/org/kie/kogito/runtime/tools/quarkus/extension/deployment/DevConsoleProcessor.java +++ b/runtime-tools-quarkus-extension-parent/runtime-tools-quarkus-extension-deployment/src/main/java/org/kie/kogito/runtime/tools/quarkus/extension/deployment/DevConsoleProcessor.java @@ -20,6 +20,8 @@ import java.io.IOException; import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; import java.util.Optional; import org.kie.kogito.quarkus.extensions.spi.deployment.KogitoDataIndexServiceAvailableBuildItem; @@ -31,8 +33,6 @@ import io.quarkus.deployment.IsDevelopment; import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; -import io.quarkus.deployment.annotations.ExecutionTime; -import io.quarkus.deployment.annotations.Record; import io.quarkus.deployment.builditem.LaunchModeBuildItem; import io.quarkus.deployment.builditem.LiveReloadBuildItem; import io.quarkus.deployment.builditem.ShutdownContextBuildItem; @@ -40,8 +40,11 @@ import io.quarkus.deployment.util.WebJarUtil; import io.quarkus.devconsole.spi.DevConsoleTemplateInfoBuildItem; import io.quarkus.maven.dependency.ResolvedDependency; +import io.quarkus.runtime.ShutdownContext; import io.quarkus.vertx.http.deployment.RouteBuildItem; -import io.quarkus.vertx.http.runtime.devmode.DevConsoleRecorder; +import io.quarkus.vertx.http.runtime.devmode.FileSystemStaticHandler; +import io.vertx.core.Handler; +import io.vertx.ext.web.RoutingContext; public class DevConsoleProcessor { @@ -58,9 +61,7 @@ public void collectUsersInfo(final BuildProducer devConsoleHandler(String devConsoleFinalDestination, + ShutdownContext shutdownContext) { + List webRootConfigurations = new ArrayList<>(); + webRootConfigurations.add( + new FileSystemStaticHandler.StaticWebRootConfiguration(devConsoleFinalDestination, "")); + + return fileSystemStaticHandler(webRootConfigurations, shutdownContext); + } + + Handler fileSystemStaticHandler( + List webRootConfigurations, + ShutdownContext shutdownContext) { + + FileSystemStaticHandler fileSystemStaticHandler = new FileSystemStaticHandler(webRootConfigurations); + + shutdownContext.addShutdownTask(new ShutdownContext.CloseRunnable(fileSystemStaticHandler)); + + return fileSystemStaticHandler; + } + @SuppressWarnings("unused") @BuildStep(onlyIf = IsDevelopment.class) public void isProcessEnabled(BuildProducer devConsoleTemplateInfoBuildItemBuildProducer, diff --git a/runtime-tools-quarkus-extension-parent/runtime-tools-quarkus-extension/pom.xml b/runtime-tools-quarkus-extension-parent/runtime-tools-quarkus-extension/pom.xml index 56f7285b25..82dbdf34d2 100644 --- a/runtime-tools-quarkus-extension-parent/runtime-tools-quarkus-extension/pom.xml +++ b/runtime-tools-quarkus-extension-parent/runtime-tools-quarkus-extension/pom.xml @@ -47,11 +47,6 @@ quarkus-resteasy-jackson - - io.quarkus - quarkus-rest-client - - io.quarkus quarkus-resteasy-multipart