Skip to content

Commit

Permalink
Bump to Quarkus 3.2 LTS and Jakarta namespace (#1845)
Browse files Browse the repository at this point in the history
* Bump to Quarkus 3.2 LTS

* [Quarkus 3] Updated rewrite data

* fixed quarkus3 manual patch

* Apply patches

* Fix $.size()

* use jdk17 image for jib to fix dmn-drools-springboot-metrics

* TEMPORARY: adjust pipeline config

* CI - limit generated jobs

* CI: update mvn and jdk in GHA

* - changed `infinispan-spring-boot-starter-remote` to infinispan-spring-boot3-starter-remote` (#1836)

* Fix "java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already." by SpringBootTest in Spring Boot 3 (#1837)

* Fix Loanbroker and Onboarding SpringBoot examples for Quarkus 3-LTS (#1840)

* Fix Onboarding examples on Fabric8 library

Signed-off-by: Ricardo Zanini <zanini@redhat.com>

* Migrate Loanbroker example to Camel 4.x and CloudEvents to Jakarta

Signed-off-by: Ricardo Zanini <zanini@redhat.com>

---------

Signed-off-by: Ricardo Zanini <zanini@redhat.com>

* - Fix Spring-boot OIDC examples. Replacing `spring-security-oauth2-authorization-server` to `spring-boot-starter-oauth2-resource-server` (#1842)

* [quarkus-3.2LTS ] Removing final "/" from path in flexible-process-springboot testing (#1843)

* wip

---------

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
Co-authored-by: Toshiya Kobayashi <toshiyakobayashi@gmail.com>
Co-authored-by: jstastny-cz <jan.stastny@ibm.com>
Co-authored-by: Pere Fernández <pefernan@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: nmirasch <neus.miras@gmail.com>
  • Loading branch information
6 people committed Dec 15, 2023
1 parent 682d563 commit b7d522a
Show file tree
Hide file tree
Showing 391 changed files with 2,249 additions and 3,457 deletions.
2 changes: 1 addition & 1 deletion .ci/environments/quarkus-3/before.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mvn_cmd="mvn ${BUILD_MVN_OPTS:-} ${BUILD_MVN_OPTS_QUARKUS_UPDATE:-}"
ci="${CI:-false}"

rewrite_plugin_version=4.43.0
quarkus_version=${QUARKUS_VERSION:-3.0.0.Final}
quarkus_version=${QUARKUS_VERSION:-3.2.9.Final}

quarkus_recipe_file="${script_dir_path}/quarkus3.yml"
patch_file="${script_dir_path}"/patches/0001_before_sh.patch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
import org.apache.commons.io.IOUtils;

import io.quarkus.devtools.project.BuildTool;
import io.quarkus.devtools.project.update.QuarkusUpdateRecipe;
import io.quarkus.devtools.project.update.QuarkusUpdateRecipeIO;
import io.quarkus.devtools.project.update.operations.UpdatePropertyOperation;
import io.quarkus.devtools.project.update.rewrite.QuarkusUpdateRecipe;
import io.quarkus.devtools.project.update.rewrite.QuarkusUpdateRecipeIO;
import io.quarkus.devtools.project.update.rewrite.operations.UpdatePropertyOperation;
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;

///usr/bin/env jbang "$0" "$@" ; exit $?
// Version to be changed when needed
//DEPS io.quarkus:quarkus-devtools-common:3.0.0.Final
//DEPS io.quarkus:quarkus-devtools-common:3.2.9.Final
//DEPS info.picocli:picocli:4.5.0

/*
Expand All @@ -63,7 +63,7 @@ class CreateKieQuarkusProjectMigrationRecipeCli implements Callable<Integer> {
@Option(names={ "-v", "--property-version"}, description = "(multi). Add a dynamic property version to the final recipe")
private Map<String, String> versionProperties = new HashMap<>();

static final String QUARKUS_UPDATES_BASE_URL = "https://raw.githubusercontent.com/quarkusio/quarkus-updates/1.0.0/recipes/src/main/resources/quarkus-updates/core/3alpha.yaml";
static final String QUARKUS_UPDATES_BASE_URL = "https://github.com/quarkusio/quarkus-updates/blob/main/recipes/src/main/resources/quarkus-updates/core/3.2.yaml";

static final Path quarkus3DownloadedRecipePath = Paths.get("quarkus3-base-recipe.yml");
static final Path quarkus3GeneratedRecipePath = Paths.get("quarkus3.yml");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
import org.apache.commons.io.IOUtils;

import io.quarkus.devtools.project.BuildTool;
import io.quarkus.devtools.project.update.QuarkusUpdateRecipe;
import io.quarkus.devtools.project.update.QuarkusUpdateRecipeIO;
import io.quarkus.devtools.project.update.operations.UpdatePropertyOperation;
import io.quarkus.devtools.project.update.rewrite.QuarkusUpdateRecipe;
import io.quarkus.devtools.project.update.rewrite.QuarkusUpdateRecipeIO;
import io.quarkus.devtools.project.update.rewrite.operations.UpdatePropertyOperation;

///usr/bin/env jbang "$0" "$@" ; exit $?
// Version to be changed when needed
//DEPS io.quarkus:quarkus-devtools-common:3.0.0.Final
//DEPS io.quarkus:quarkus-devtools-common:3.2.9.Final

/*
* This script will generate the final `quarkus3.yml` file based on:
Expand All @@ -49,8 +49,8 @@
*/
class CreateQuarkusProjectMigrationRecipe {

static final String QUARKUS_VERSION = "3.0.0.Final";
static final String QUARKUS_UPDATES_BASE_URL = "https://raw.githubusercontent.com/quarkusio/quarkus-updates/1.0.0/recipes/src/main/resources/quarkus-updates/core/3alpha.yaml";
static final String QUARKUS_VERSION = "3.2.9.Final";
static final String QUARKUS_UPDATES_BASE_URL = "https://github.com/quarkusio/quarkus-updates/blob/main/recipes/src/main/resources/quarkus-updates/core/3.2.yaml";

static final Path quarkus3DownloadedRecipePath = Paths.get("quarkus3-base-recipe.yml");
static final Path quarkus3GeneratedRecipePath = Paths.get("quarkus3.yml");
Expand Down
3,051 changes: 997 additions & 2,054 deletions .ci/environments/quarkus-3/patches/0001_before_sh.patch

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,25 @@ deleted file mode 100644
index add510733..000000000
--- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java
+++ /dev/null
@@ -1,30 +0,0 @@
@@ -1,32 +0,0 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.kie.kogito.springboot;
-
-import org.keycloak.adapters.springboot.KeycloakSpringBootConfigResolver;
Expand All @@ -168,7 +170,7 @@ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-spr
index 171e1bc03..3d3238bea 100644
--- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/application.properties
+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/application.properties
@@ -1,22 +1,7 @@
@@ -19,22 +19,7 @@
server.address=0.0.0.0
infinispan.remote.server-list=127.0.0.1:11222

Expand Down Expand Up @@ -262,7 +264,7 @@ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-spr
index 7740348dd..a1451ed66 100644
--- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/resources/application.properties
+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/resources/application.properties
@@ -1,8 +1,5 @@
@@ -19,8 +19,5 @@

-keycloak.realm=kogito
-keycloak.resource=kogito-app
Expand Down Expand Up @@ -376,23 +378,25 @@ deleted file mode 100644
index add510733..000000000
--- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java
+++ /dev/null
@@ -1,30 +0,0 @@
@@ -1,32 +0,0 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.kie.kogito.springboot;
-
-import org.keycloak.adapters.springboot.KeycloakSpringBootConfigResolver;
Expand Down Expand Up @@ -492,7 +496,7 @@ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-spr
index a2dac0b06..3be2ed592 100644
--- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/resources/application.properties
+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/resources/application.properties
@@ -1,7 +1,3 @@
@@ -19,7 +19,3 @@
-keycloak.auth-server-url=http://localhost:8281/auth
-keycloak.realm=kogito
-keycloak.resource=kogito-app
Expand Down
41 changes: 11 additions & 30 deletions .ci/environments/quarkus-3/quarkus3.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,26 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: io.quarkus.openrewrite.Quarkus
description: Update Quarkus version and refactor imports and resources if needed.
type: specs.openrewrite.org/v1beta/recipe
recipeList:
- org.openrewrite.maven.ChangePropertyValue: {
newValue: 3.0.0.Final,
key: quarkus-plugin.version
key: quarkus-plugin.version,
newValue: 3.2.9.Final
}
- org.openrewrite.maven.ChangePropertyValue: {
newValue: 3.0.0.Final,
key: quarkus.platform.version
key: quarkus.platform.version,
newValue: 3.2.9.Final
}
- org.openrewrite.maven.ChangePropertyValue: {
newValue: 9.45.0-SNAPSHOT,
key: version.org.drools
key: version.org.drools,
newValue: 9.45.0-SNAPSHOT
}
- org.openrewrite.maven.ChangePropertyValue: {
newValue: 3.0.0-SNAPSHOT,
key: version.org.kie.kogito
key: version.org.kie.kogito,
newValue: 2.0.0-SNAPSHOT
}
- org.openrewrite.maven.ChangePropertyValue: {
newValue: 3.0.0-SNAPSHOT,
key: kogito.bom.version
key: kogito.bom.version,
newValue: 2.0.0-SNAPSHOT
}
- org.kie.kogito.Quarkus3Migration
- org.kie.ManagedDependencies
Expand Down Expand Up @@ -109,7 +90,6 @@ recipeList:
newArtifactId: springdoc-openapi-starter-webmvc-ui
}
---
displayName: Update Managed Dependencies
recipeList:
- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: {
oldGroupId: javax.activation,
Expand Down Expand Up @@ -497,6 +477,7 @@ recipeList:
type: specs.openrewrite.org/v1beta/recipe
description: Update all managed dependencies based on dependency updates from Quarkus.
name: org.kie.ManagedDependencies
displayName: Update Managed Dependencies
---
type: specs.openrewrite.org/v1beta/recipe
name: io.quarkus.updates.core.quarkus30.UpgradeQuarkiverse
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-kogito-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
matrix:
job_name: [ kogito-quarkus-examples, kogito-springboot-examples, serverless-workflow-examples ]
os: [ubuntu-latest]
java-version: [11]
maven-version: ['3.8.7']
java-version: [17]
maven-version: ['3.9.3']
include:
- job_name: kogito-quarkus-examples
repository: incubator-kie-kogito-examples
Expand Down
6 changes: 3 additions & 3 deletions kogito-quarkus-examples/decisiontable-quarkus-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
<artifactId>decisiontable-quarkus-example</artifactId>
<name>Kogito Example :: Decision Table - Quarkus</name>
<properties>
<quarkus-plugin.version>2.16.10.Final</quarkus-plugin.version>
<quarkus-plugin.version>3.2.9.Final</quarkus-plugin.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>2.16.12.Final</quarkus.platform.version>
<quarkus.platform.version>3.2.9.Final</quarkus.platform.version>
<kogito.bom.group-id>org.kie.kogito</kogito.bom.group-id>
<kogito.bom.artifact-id>kogito-bom</kogito.bom.artifact-id>
<kogito.bom.version>2.0.0-SNAPSHOT</kogito.bom.version>
<version.org.kie.kogito>2.0.0-SNAPSHOT</version.org.kie.kogito>
<version.org.drools>8.46.0-SNAPSHOT</version.org.drools>
<version.org.drools>9.46.0-SNAPSHOT</version.org.drools>
</properties>
<dependencyManagement>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/
package org.kie.kogito.decisiontable.quarkus;

import io.quarkus.test.junit.NativeImageTest;
import io.quarkus.test.junit.QuarkusIntegrationTest;

@NativeImageTest
@QuarkusIntegrationTest
public class NativeRestQueryIT extends RestQueryTest {

// Execute the same tests but in native mode.
Expand Down
4 changes: 2 additions & 2 deletions kogito-quarkus-examples/dmn-drools-quarkus-metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
<artifactId>dmn-drools-quarkus-metrics</artifactId>
<name>Kogito Example :: DMN Metrics Quarkus</name>
<properties>
<quarkus-plugin.version>2.16.10.Final</quarkus-plugin.version>
<quarkus-plugin.version>3.2.9.Final</quarkus-plugin.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>2.16.12.Final</quarkus.platform.version>
<quarkus.platform.version>3.2.9.Final</quarkus.platform.version>
<kogito.bom.group-id>org.kie.kogito</kogito.bom.group-id>
<kogito.bom.artifact-id>kogito-bom</kogito.bom.artifact-id>
<kogito.bom.version>2.0.0-SNAPSHOT</kogito.bom.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
*/
package org.kie.kogito.app;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

import org.kie.dmn.api.core.event.AfterEvaluateAllEvent;
import org.kie.dmn.api.core.event.AfterEvaluateContextEntryEvent;
import org.kie.dmn.api.core.event.AfterEvaluateDecisionEvent;
Expand All @@ -36,6 +33,9 @@

import io.micrometer.prometheus.PrometheusMeterRegistry;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;

@ApplicationScoped
public class CustomDMNRuntimeEventListener implements DMNRuntimeEventListener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
*/
package org.kie.kogito.app;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

import org.kie.kogito.drools.core.config.DefaultRuleEventListenerConfig;
import org.kie.kogito.examples.CustomRuleEventListener;

import io.micrometer.prometheus.PrometheusMeterRegistry;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;

@ApplicationScoped
public class RuleEventListenerConfig extends DefaultRuleEventListenerConfig {

Expand Down
4 changes: 2 additions & 2 deletions kogito-quarkus-examples/dmn-event-driven-quarkus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
<artifactId>dmn-event-driven-quarkus</artifactId>
<name>Kogito Example :: DMN Event-Driven :: Quarkus</name>
<properties>
<quarkus-plugin.version>2.16.10.Final</quarkus-plugin.version>
<quarkus-plugin.version>3.2.9.Final</quarkus-plugin.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>2.16.12.Final</quarkus.platform.version>
<quarkus.platform.version>3.2.9.Final</quarkus.platform.version>
<kogito.bom.group-id>org.kie.kogito</kogito.bom.group-id>
<kogito.bom.artifact-id>kogito-bom</kogito.bom.artifact-id>
<kogito.bom.version>2.0.0-SNAPSHOT</kogito.bom.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource;

import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.NativeImageTest;
import io.quarkus.test.junit.QuarkusIntegrationTest;

@NativeImageTest
@QuarkusIntegrationTest
@QuarkusTestResource(KafkaQuarkusTestResource.class)
public class NativeDmnEventDrivenIT extends DmnEventDrivenIT {

Expand Down
4 changes: 2 additions & 2 deletions kogito-quarkus-examples/dmn-incubation-api-quarkus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
<artifactId>dmn-incubation-api-quarkus</artifactId>
<name>Kogito Example :: DMN Incubation API With Quarkus</name>
<properties>
<quarkus-plugin.version>2.16.10.Final</quarkus-plugin.version>
<quarkus-plugin.version>3.2.9.Final</quarkus-plugin.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>2.16.12.Final</quarkus.platform.version>
<quarkus.platform.version>3.2.9.Final</quarkus.platform.version>
<kogito.bom.group-id>org.kie.kogito</kogito.bom.group-id>
<kogito.bom.artifact-id>kogito-bom</kogito.bom.artifact-id>
<kogito.bom.version>2.0.0-SNAPSHOT</kogito.bom.version>
Expand Down
Loading

0 comments on commit b7d522a

Please sign in to comment.