Skip to content

Commit

Permalink
Merge pull request #5 from rgdoliveira/sync_main
Browse files Browse the repository at this point in the history
Sync main branch with Apache main branch
  • Loading branch information
rgdoliveira authored Jan 18, 2024
2 parents 23da503 + b22416d commit 8e232ca
Show file tree
Hide file tree
Showing 757 changed files with 3,068 additions and 2,737 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 @@ -6,7 +6,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 @@ -12,16 +12,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 @@ -45,7 +45,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
1,409 changes: 725 additions & 684 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 @@ -34,8 +34,7 @@ diff --git a/kogito-codegen-modules/kogito-codegen-decisions/src/main/resources/
index 7f07766c1c..d983b515cf 100644
--- a/kogito-codegen-modules/kogito-codegen-decisions/src/main/resources/class-templates/DecisionRestResourceQuarkusTemplate.java
+++ b/kogito-codegen-modules/kogito-codegen-decisions/src/main/resources/class-templates/DecisionRestResourceQuarkusTemplate.java
@@ -17,14 +17,14 @@ package org.kie.dmn.kogito.quarkus.example;

@@ -23,14 +23,14 @@ package org.kie.dmn.kogito.quarkus.example;
import java.util.stream.Collectors;

-import javax.ws.rs.Consumes;
Expand All @@ -54,7 +53,8 @@ index 7f07766c1c..d983b515cf 100644
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.Response.ResponseBuilder;


import org.kie.dmn.feel.codegen.feel11.CodegenStringUtil;
import org.kie.kogito.Application;
import org.kie.kogito.dmn.rest.DMNEvaluationErrorException;
@@ -82,7 +82,7 @@ public class DMNRestResourceTemplate {
Expand Down Expand Up @@ -214,7 +214,7 @@ diff --git a/kogito-codegen-modules/kogito-codegen-processes/src/test/resources/
index c9611d5a32..bf7aff2b2e 100644
--- a/kogito-codegen-modules/kogito-codegen-processes/src/test/resources/openapi/SimpleResource.java
+++ b/kogito-codegen-modules/kogito-codegen-processes/src/test/resources/openapi/SimpleResource.java
@@ -1,8 +1,8 @@
@@ -19,8 +19,8 @@
import javax.enterprise.context.ApplicationScoped;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
Expand All @@ -227,48 +227,6 @@ index c9611d5a32..bf7aff2b2e 100644

import org.eclipse.microprofile.openapi.annotations.tags.Tag;

diff --git a/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RestQueryJavaTemplate.java b/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RestQueryJavaTemplate.java
index 39b86127ef..10cfcda88f 100644
--- a/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RestQueryJavaTemplate.java
+++ b/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RestQueryJavaTemplate.java
@@ -18,11 +18,11 @@ package com.myspace.demo;
import java.util.List;
import java.util.Map;

-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;

import org.drools.ruleunits.api.RuleUnit;
import org.drools.ruleunits.api.RuleUnitInstance;
diff --git a/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RestQueryQuarkusTemplate.java b/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RestQueryQuarkusTemplate.java
index 3447ad6f97..4bfc800f1a 100644
--- a/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RestQueryQuarkusTemplate.java
+++ b/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RestQueryQuarkusTemplate.java
@@ -18,11 +18,11 @@ package com.myspace.demo;
import java.util.List;
import java.util.Map;

-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;

import org.drools.ruleunits.api.RuleUnit;
import org.drools.ruleunits.api.RuleUnitInstance;
diff --git a/kogito-codegen-modules/kogito-codegen-sample/kogito-codegen-sample-generator/src/main/resources/class-templates/SampleRestResourceQuarkusTemplate.java b/kogito-codegen-modules/kogito-codegen-sample/kogito-codegen-sample-generator/src/main/resources/class-templates/SampleRestResourceQuarkusTemplate.java
index 7fdbefde91..8920575b8a 100644
--- a/kogito-codegen-modules/kogito-codegen-sample/kogito-codegen-sample-generator/src/main/resources/class-templates/SampleRestResourceQuarkusTemplate.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,37 +36,6 @@ index c15aa39596..bd1e412b4f 100644

protected QuarkusKogitoBuildContext(QuarkusKogitoBuildContextBuilder builder) {
super(builder, new CDIDependencyInjectionAnnotator(), new CDIRestAnnotator(), CONTEXT_NAME);
diff --git a/kogito-codegen-modules/kogito-codegen-api/src/main/java/org/kie/kogito/codegen/api/di/impl/CDIDependencyInjectionAnnotator.java b/kogito-codegen-modules/kogito-codegen-api/src/main/java/org/kie/kogito/codegen/api/di/impl/CDIDependencyInjectionAnnotator.java
index ec8ccb9839..54cef037a5 100644
--- a/kogito-codegen-modules/kogito-codegen-api/src/main/java/org/kie/kogito/codegen/api/di/impl/CDIDependencyInjectionAnnotator.java
+++ b/kogito-codegen-modules/kogito-codegen-api/src/main/java/org/kie/kogito/codegen/api/di/impl/CDIDependencyInjectionAnnotator.java
@@ -44,7 +44,7 @@ public class CDIDependencyInjectionAnnotator implements DependencyInjectionAnnot

@Override
public <T extends NodeWithAnnotations<?>> T withNamed(T node, String name) {
- node.addAnnotation(new SingleMemberAnnotationExpr(new Name("javax.inject.Named"), new StringLiteralExpr(name)));
+ node.addAnnotation(new SingleMemberAnnotationExpr(new Name("jakarta.inject.Named"), new StringLiteralExpr(name)));
return node;
}

@@ -61,7 +61,7 @@ public class CDIDependencyInjectionAnnotator implements DependencyInjectionAnnot

@Override
public <T extends NodeWithAnnotations<?>> T withSingletonComponent(T node) {
- node.addAnnotation("javax.inject.Singleton");
+ node.addAnnotation("jakarta.inject.Singleton");
return node;
}

@@ -72,7 +72,7 @@ public class CDIDependencyInjectionAnnotator implements DependencyInjectionAnnot

@Override
public <T extends NodeWithAnnotations<?>> T withInjection(T node, boolean lazy) {
- node.addAnnotation("javax.inject.Inject");
+ node.addAnnotation("jakarta.inject.Inject");
return node;
}

diff --git a/kogito-codegen-modules/kogito-codegen-core/src/main/resources/class-templates/ApplicationQuarkusTemplate.java b/kogito-codegen-modules/kogito-codegen-core/src/main/resources/class-templates/ApplicationQuarkusTemplate.java
index c1b9d1cdc1..64bd6d374c 100644
--- a/kogito-codegen-modules/kogito-codegen-core/src/main/resources/class-templates/ApplicationQuarkusTemplate.java
Expand Down Expand Up @@ -296,32 +265,6 @@ index 2606d530d8..2897c9829e 100644

import org.kie.kogito.eventdriven.rules.AbstractEventDrivenQueryExecutor;
import org.drools.ruleunits.api.RuleUnit;
diff --git a/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/KogitoObjectMapperQuarkusTemplate.java b/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/KogitoObjectMapperQuarkusTemplate.java
index 606b30f790..fe0f357f40 100644
--- a/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/KogitoObjectMapperQuarkusTemplate.java
+++ b/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/KogitoObjectMapperQuarkusTemplate.java
@@ -21,7 +21,7 @@ import java.io.IOException;
import java.util.List;

import com.fasterxml.jackson.databind.JavaType;
-import javax.inject.Singleton;
+import jakarta.inject.Singleton;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.ObjectMapper;
diff --git a/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RestQueryQuarkusTemplate.java b/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RestQueryQuarkusTemplate.java
index 4bfc800f1a..56ce0d01d1 100644
--- a/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RestQueryQuarkusTemplate.java
+++ b/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RestQueryQuarkusTemplate.java
@@ -32,7 +32,7 @@ import static java.util.stream.Collectors.toList;
@Path("/$endpointName$")
public class $unit$Query$name$Endpoint {

- @javax.inject.Inject
+ @jakarta.inject.Inject
RuleUnit<$UnitType$> ruleUnit;

public $unit$Query$name$Endpoint() { }
diff --git a/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RuleUnitContainerQuarkusTemplate.java b/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RuleUnitContainerQuarkusTemplate.java
index 829d4c5ada..aa8fa8a753 100644
--- a/kogito-codegen-modules/kogito-codegen-rules/src/main/resources/class-templates/rules/RuleUnitContainerQuarkusTemplate.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,55 +20,6 @@ index ae862535a4..a8ad497c5d 100644
}
});
----
diff --git a/kogito-codegen-modules/kogito-codegen-api/src/main/java/org/kie/kogito/codegen/api/di/impl/CDIDependencyInjectionAnnotator.java b/kogito-codegen-modules/kogito-codegen-api/src/main/java/org/kie/kogito/codegen/api/di/impl/CDIDependencyInjectionAnnotator.java
index f06c26e151..27eb8803ca 100644
--- a/kogito-codegen-modules/kogito-codegen-api/src/main/java/org/kie/kogito/codegen/api/di/impl/CDIDependencyInjectionAnnotator.java
+++ b/kogito-codegen-modules/kogito-codegen-api/src/main/java/org/kie/kogito/codegen/api/di/impl/CDIDependencyInjectionAnnotator.java
@@ -35,7 +35,7 @@ public class CDIDependencyInjectionAnnotator implements DependencyInjectionAnnot

@Override
public <T extends NodeWithAnnotations<?>> T withProduces(T node, boolean isDefault) {
- node.addAndGetAnnotation("javax.enterprise.inject.Produces");
+ node.addAndGetAnnotation("jakarta.enterprise.inject.Produces");
if (isDefault) {
node.addAndGetAnnotation("io.quarkus.arc.DefaultBean");
}
@@ -50,7 +50,7 @@ public class CDIDependencyInjectionAnnotator implements DependencyInjectionAnnot

@Override
public <T extends NodeWithAnnotations<?>> T withApplicationComponent(T node) {
- node.addAnnotation("javax.enterprise.context.ApplicationScoped");
+ node.addAnnotation("jakarta.enterprise.context.ApplicationScoped");
return node;
}

@@ -106,7 +106,7 @@ public class CDIDependencyInjectionAnnotator implements DependencyInjectionAnnot

@Override
public String optionalInstanceInjectionType() {
- return "javax.enterprise.inject.Instance";
+ return "jakarta.enterprise.inject.Instance";
}

@Override
@@ -133,7 +133,7 @@ public class CDIDependencyInjectionAnnotator implements DependencyInjectionAnnot

@Override
public String applicationComponentType() {
- return "javax.enterprise.context.ApplicationScoped";
+ return "jakarta.enterprise.context.ApplicationScoped";
}

@Override
@@ -173,7 +173,7 @@ public class CDIDependencyInjectionAnnotator implements DependencyInjectionAnnot

@Override
public <T extends NodeWithAnnotations<?>> T withFactoryMethod(T node) {
- node.addAnnotation("javax.enterprise.inject.Produces");
+ node.addAnnotation("jakarta.enterprise.inject.Produces");
return node;
}

diff --git a/kogito-codegen-modules/kogito-codegen-core/src/main/resources/class-templates/ApplicationQuarkusTemplate.java b/kogito-codegen-modules/kogito-codegen-core/src/main/resources/class-templates/ApplicationQuarkusTemplate.java
index 64bd6d374c..023cf9e482 100644
--- a/kogito-codegen-modules/kogito-codegen-core/src/main/resources/class-templates/ApplicationQuarkusTemplate.java
Expand Down Expand Up @@ -212,7 +163,7 @@ diff --git a/kogito-codegen-modules/kogito-codegen-processes/src/test/resources/
index bf7aff2b2e..5baf698463 100644
--- a/kogito-codegen-modules/kogito-codegen-processes/src/test/resources/openapi/SimpleResource.java
+++ b/kogito-codegen-modules/kogito-codegen-processes/src/test/resources/openapi/SimpleResource.java
@@ -1,4 +1,4 @@
@@ -19,4 +19,4 @@
-import javax.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.context.ApplicationScoped;
import jakarta.ws.rs.GET;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,6 @@ index a8ad497c5d..909d7a2b31 100644
public void init() {
this.activate();
}
diff --git a/kogito-codegen-modules/kogito-codegen-api/src/main/java/org/kie/kogito/codegen/api/di/DependencyInjectionAnnotator.java b/kogito-codegen-modules/kogito-codegen-api/src/main/java/org/kie/kogito/codegen/api/di/DependencyInjectionAnnotator.java
index 29ebcf1a4d..fa2fcbce68 100644
--- a/kogito-codegen-modules/kogito-codegen-api/src/main/java/org/kie/kogito/codegen/api/di/DependencyInjectionAnnotator.java
+++ b/kogito-codegen-modules/kogito-codegen-api/src/main/java/org/kie/kogito/codegen/api/di/DependencyInjectionAnnotator.java
@@ -179,7 +179,7 @@ public interface DependencyInjectionAnnotator {
rolesExpr.add(new StringLiteralExpr(role.trim()));
}

- node.addAnnotation(new SingleMemberAnnotationExpr(new Name("javax.annotation.security.RolesAllowed"), new ArrayInitializerExpr(NodeList.nodeList(rolesExpr))));
+ node.addAnnotation(new SingleMemberAnnotationExpr(new Name("jakarta.annotation.security.RolesAllowed"), new ArrayInitializerExpr(NodeList.nodeList(rolesExpr))));
}
return node;
}
diff --git a/kogito-codegen-modules/kogito-codegen-core/src/main/resources/class-templates/config/ConfigBeanSpringTemplate.java b/kogito-codegen-modules/kogito-codegen-core/src/main/resources/class-templates/config/ConfigBeanSpringTemplate.java
index b4593ab904..94041b4d11 100644
--- a/kogito-codegen-modules/kogito-codegen-core/src/main/resources/class-templates/config/ConfigBeanSpringTemplate.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ diff --git a/kogito-build/kogito-dependencies-bom/pom.xml b/kogito-build/kogito-
index 244c1c4a8f..a244f76be0 100644
--- a/kogito-build/kogito-dependencies-bom/pom.xml
+++ b/kogito-build/kogito-dependencies-bom/pom.xml
@@ -45,7 +45,7 @@
<version.com.sun.activation>2.0.0</version.com.sun.activation>
@@ -48,7 +48,7 @@
<version.com.sun.activation>2.0.1</version.com.sun.activation>
<version.javax.annotation>1.3.2</version.javax.annotation>
<version.javax.annotation-api>1.3.2</version.javax.annotation-api>
- <version.javax.inject>1</version.javax.inject>
+ <version.javax.inject>2.0.1</version.javax.inject>
<version.javax.validation>2.0.1.Final</version.javax.validation>
<version.javax.xml.bind>2.3.1</version.javax.xml.bind>
<version.org.eclipse.microprofile.openapi>3.1</version.org.eclipse.microprofile.openapi>
<version.org.eclipse.microprofile.openapi>3.1.1</version.org.eclipse.microprofile.openapi>
@@ -545,8 +545,8 @@
<version>3.0.2</version>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ index 37608a0de9..b7087b7e44 100644
+ <version.com.oracle.database.jdbc>21.5.0.0</version.com.oracle.database.jdbc>
<version.com.sun.xml.bind.core>2.3.0.1</version.com.sun.xml.bind.core>
<version.com.sun.xml.bind.impl>2.3.5</version.com.sun.xml.bind.impl>
<version.com.sun.activation>2.0.0</version.com.sun.activation>
<version.com.sun.activation>2.0.1</version.com.sun.activation>
@@ -57,8 +57,8 @@
<version.io.cloudevents>2.3.0</version.io.cloudevents>
<version.io.fabric8.kubernetes-client>6.5.1</version.io.fabric8.kubernetes-client>
<version.io.micrometer>1.10.5</version.io.micrometer>
<version.io.fabric8.kubernetes-client>6.7.2</version.io.fabric8.kubernetes-client>
<version.io.micrometer>1.11.1</version.io.micrometer>
- <version.org.flywaydb>9.8.3</version.org.flywaydb>
- <version.org.postgresql>42.5.1</version.org.postgresql>
+ <version.org.flywaydb>9.16.3</version.org.flywaydb>
+ <version.org.postgresql>42.6.0</version.org.postgresql>
<version.io.serverlessworkflow>4.0.4.Final</version.io.serverlessworkflow>
<version.io.serverlessworkflow>4.0.5.Final</version.io.serverlessworkflow>
<!-- Aligned with Quarkus 2.7 (LTS) - see https://issues.redhat.com/browse/KOGITO-7971 -->
<version.io.smallrye-open-api>3.3.2</version.io.smallrye-open-api>
<version.io.smallrye-open-api>3.4.0</version.io.smallrye-open-api>
@@ -87,7 +87,7 @@
<version.org.keycloak>21.0.1</version.org.keycloak>
<!-- It seems that the confluent kafka cannot replace wurstmeister/kafka so easily. See FAI-729 -->
Expand All @@ -31,23 +31,23 @@ index 37608a0de9..b7087b7e44 100644
<version.org.mongo-image>4.4.14</version.org.mongo-image>
<version.org.mozilla.rhino>1.7.13</version.org.mozilla.rhino>
<version.org.redis>2.0.4</version.org.redis>
@@ -96,7 +96,7 @@
@@ -97,7 +97,7 @@
<version.org.assertj>3.22.0</version.org.assertj>
<version.org.json-unit-assertj>2.9.0</version.org.json-unit-assertj>
<version.org.hamcrest>1.3</version.org.hamcrest> <!-- else old version coming from Mockito wins and breaks tests -->
- <version.org.junit.minor>8.2</version.org.junit.minor> <!-- so that org.junit.platform and org.junit can share the same minor version -->
+ <version.org.junit.minor>9.2</version.org.junit.minor> <!-- so that org.junit.platform and org.junit can share the same minor version -->
<version.org.junit>5.${version.org.junit.minor}</version.org.junit>
<version.org.junit.jupiter>5.9.2</version.org.junit.jupiter>
<version.org.junit.vintage>5.9.2</version.org.junit.vintage>
@@ -112,13 +112,13 @@
<version.org.junit.jupiter>5.9.3</version.org.junit.jupiter>
<version.org.junit.vintage>5.9.3</version.org.junit.vintage>
@@ -113,13 +113,13 @@
<version.org.mvel>2.5.0.Final</version.org.mvel>
<version.org.reactivestreams>1.0.4</version.org.reactivestreams>
<version.org.reflections>0.10.2</version.org.reflections>
- <version.org.slf4j>1.7.36</version.org.slf4j>
+ <version.org.slf4j>2.0.6</version.org.slf4j>

<version.maven>3.9.1</version.maven>
<version.maven>3.9.3</version.maven>
<version.maven.plugin>3.7.1</version.maven.plugin>
<version.maven.invoker>3.2.0</version.maven.invoker>

Expand Down
Loading

0 comments on commit 8e232ca

Please sign in to comment.