Skip to content

Commit

Permalink
Upgrade quarkus to 3.15
Browse files Browse the repository at this point in the history
  • Loading branch information
RishiRajAnand committed Nov 4, 2024
1 parent 3731a74 commit e943195
Show file tree
Hide file tree
Showing 54 changed files with 156 additions and 67 deletions.
2 changes: 1 addition & 1 deletion addons/common/persistence/infinispan/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<dependencies>
<!--~~(No version provided)~~>--><dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-hotrod-jakarta</artifactId>
<artifactId>infinispan-client-hotrod</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.jbpm.workflow.core.node.AsyncEventNodeInstance;
import org.kie.api.runtime.process.NodeInstance;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class AsyncEventNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.jbpm.workflow.instance.node.CompositeContextNodeInstance;
import org.kie.api.runtime.process.NodeInstance;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class CompositeContextNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.jbpm.workflow.instance.node.DynamicNodeInstance;
import org.kie.api.runtime.process.NodeInstance;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class DynamicNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.jbpm.workflow.instance.node.EventNodeInstance;
import org.kie.api.runtime.process.NodeInstance;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class EventNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.jbpm.workflow.instance.node.EventSubProcessNodeInstance;
import org.kie.api.runtime.process.NodeInstance;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class EventSubProcessNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.jbpm.workflow.instance.node.ForEachNodeInstance;
import org.kie.api.runtime.process.NodeInstance;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class ForEachNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class JoinNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.jbpm.workflow.instance.node.LambdaSubProcessNodeInstance;
import org.kie.api.runtime.process.NodeInstance;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class LambdaSubProcessNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.jbpm.workflow.instance.node.MilestoneNodeInstance;
import org.kie.api.runtime.process.NodeInstance;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class MilestoneNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.jbpm.workflow.instance.node.RuleSetNodeInstance;
import org.kie.api.runtime.process.NodeInstance;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class RuleSetNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.jbpm.workflow.instance.node.StateNodeInstance;
import org.kie.api.runtime.process.NodeInstance;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class StateNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.jbpm.workflow.instance.node.SubProcessNodeInstance;
import org.kie.api.runtime.process.NodeInstance;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class SubProcessNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.jbpm.workflow.instance.node.TimerNodeInstance;
import org.kie.api.runtime.process.NodeInstance;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class TimerNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.kie.api.runtime.process.NodeInstance;
import org.kie.kogito.internal.process.workitem.KogitoWorkItem;

import com.google.protobuf.GeneratedMessageV3.Builder;
import com.google.protobuf.GeneratedMessage.Builder;

public class WorkItemNodeInstanceWriter implements NodeInstanceWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private FieldDescriptorProto buildFieldDescriptor(FieldDescriptor descriptor) {
}
}
fieldBuilder.setLabel(descriptor.getLabel() == Label.ONE_OF ? FieldDescriptorProto.Label.LABEL_OPTIONAL : FieldDescriptorProto.Label.valueOf("LABEL_" + descriptor.getLabel().name()));
fieldBuilder.setProto3Optional(!descriptor.isRequired());
fieldBuilder.setProto3Optional(descriptor.getLabel() != Label.REQUIRED);
return fieldBuilder.build();
}

Expand Down
22 changes: 13 additions & 9 deletions kogito-build/kogito-dependencies-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<properties>
<!-- this version property is used in plugins but also in dependencies too -->
<version.io.quarkus>3.8.6</version.io.quarkus>
<version.io.quarkus>3.15.1</version.io.quarkus>
<version.io.quarkus.quarkus-test>${version.io.quarkus}</version.io.quarkus.quarkus-test>
<version.org.springframework.boot>3.2.6</version.org.springframework.boot>
<version.org.apache.kafka>3.7.0</version.org.apache.kafka>
Expand All @@ -50,7 +50,7 @@
<version.net.minidev.jsonsmart>2.4.10</version.net.minidev.jsonsmart>
<version.net.thisptr.jackson-jq>1.0.0-preview.20240207</version.net.thisptr.jackson-jq>
<version.io.quarkiverse.jackson-jq>2.0.2</version.io.quarkiverse.jackson-jq>
<version.io.quarkiverse.openapi.generator>2.4.1</version.io.quarkiverse.openapi.generator>
<version.io.quarkiverse.openapi.generator>2.5.0</version.io.quarkiverse.openapi.generator>
<version.io.quarkiverse.asyncapi>0.3.0</version.io.quarkiverse.asyncapi>
<version.io.quarkiverse.reactivemessaging.http>2.4.1</version.io.quarkiverse.reactivemessaging.http>
<version.io.quarkiverse.embedded.postgresql>0.2.3</version.io.quarkiverse.embedded.postgresql>
Expand All @@ -59,7 +59,7 @@
<version.com.fasterxml.jackson.datatype>2.17.2</version.com.fasterxml.jackson.datatype>
<version.com.github.victools>4.31.0</version.com.github.victools>
<version.com.github.tomakehurst.wiremock>2.35.1</version.com.github.tomakehurst.wiremock>
<version.com.google.protobuf>3.25.5</version.com.google.protobuf>
<version.com.google.protobuf>4.27.3</version.com.google.protobuf>
<!-- We don't use gson directly. This is just to align versions of transitive dependencies -->
<version.com.google.gson>2.10.1</version.com.google.gson>
<!-- currently required for integration test only -->
Expand Down Expand Up @@ -102,8 +102,8 @@

<version.org.graalvm.nativeimage>23.1.2</version.org.graalvm.nativeimage>

<version.org.infinispan>14.0.27.Final</version.org.infinispan>
<version.org.infinispan.protostream>4.6.5.Final</version.org.infinispan.protostream>
<version.org.infinispan>15.0.8.Final</version.org.infinispan>
<version.org.infinispan.protostream>5.0.8.Final</version.org.infinispan.protostream>

<version.org.rocksdb>7.10.2</version.org.rocksdb>
<!-- consider migrating to 3.x JDK 9: https://jakarta.ee/specifications/restful-ws/ -->
Expand All @@ -112,7 +112,7 @@
<version.org.keycloak>24.0.4</version.org.keycloak>
<!-- It seems that the confluent kafka cannot replace wurstmeister/kafka so easily. See FAI-729 -->
<version.wurstmeister.kafka>2.12-2.2.1</version.wurstmeister.kafka>
<version.org.mongo>4.11.1</version.org.mongo>
<version.org.mongo>5.1.4</version.org.mongo>
<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>
Expand All @@ -128,7 +128,7 @@
<version.org.junit.vintage>5.10.2</version.org.junit.vintage>
<version.org.junit.platform>1.10.2</version.org.junit.platform> <!-- otherwise Quarkus brings its own, silently disabling some tests -->
<version.org.mockito>5.8.0</version.org.mockito>
<version.org.testcontainers>1.19.6</version.org.testcontainers>
<version.org.testcontainers>1.20.1</version.org.testcontainers>
<version.org.xmlunit-core>2.10.0</version.org.xmlunit-core>
<version.io.rest-assured>5.4.0</version.io.rest-assured>

Expand Down Expand Up @@ -721,7 +721,7 @@
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-hotrod-jakarta</artifactId>
<artifactId>infinispan-client-hotrod</artifactId>
<version>${version.org.infinispan}</version>
</dependency>
<dependency>
Expand All @@ -739,7 +739,11 @@
<artifactId>protostream</artifactId>
<version>${version.org.infinispan.protostream}</version>
</dependency>

<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream-processor</artifactId>
<version>${version.org.infinispan.protostream}</version>
</dependency>
<!--rockdb-->
<dependency>
<groupId>org.rocksdb</groupId>
Expand Down
4 changes: 4 additions & 0 deletions kogito-codegen-modules/kogito-codegen-processes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream-processor</artifactId>
</dependency>
<dependency>
<groupId>com.github.javaparser</groupId>
<artifactId>javaparser-symbol-solver-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,8 @@

import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import java.util.UUID;
import java.util.function.Predicate;
import java.util.stream.Collectors;

Expand All @@ -36,11 +30,7 @@
import org.infinispan.protostream.FileDescriptorSource;
import org.infinispan.protostream.SerializationContext;
import org.infinispan.protostream.config.Configuration;
import org.infinispan.protostream.descriptors.Descriptor;
import org.infinispan.protostream.descriptors.EnumDescriptor;
import org.infinispan.protostream.descriptors.FieldDescriptor;
import org.infinispan.protostream.descriptors.FileDescriptor;
import org.infinispan.protostream.descriptors.Option;
import org.infinispan.protostream.descriptors.*;
import org.infinispan.protostream.impl.SerializationContextImpl;
import org.kie.kogito.codegen.api.context.KogitoBuildContext;
import org.kie.kogito.codegen.api.context.impl.JavaKogitoBuildContext;
Expand All @@ -54,25 +44,8 @@
import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration;
import com.github.javaparser.ast.body.MethodDeclaration;
import com.github.javaparser.ast.body.VariableDeclarator;
import com.github.javaparser.ast.expr.BinaryExpr;
import com.github.javaparser.ast.expr.CastExpr;
import com.github.javaparser.ast.expr.ClassExpr;
import com.github.javaparser.ast.expr.EnclosedExpr;
import com.github.javaparser.ast.expr.Expression;
import com.github.javaparser.ast.expr.IntegerLiteralExpr;
import com.github.javaparser.ast.expr.MethodCallExpr;
import com.github.javaparser.ast.expr.NameExpr;
import com.github.javaparser.ast.expr.NullLiteralExpr;
import com.github.javaparser.ast.expr.ObjectCreationExpr;
import com.github.javaparser.ast.expr.SimpleName;
import com.github.javaparser.ast.expr.StringLiteralExpr;
import com.github.javaparser.ast.expr.VariableDeclarationExpr;
import com.github.javaparser.ast.stmt.BlockStmt;
import com.github.javaparser.ast.stmt.IfStmt;
import com.github.javaparser.ast.stmt.ReturnStmt;
import com.github.javaparser.ast.stmt.SwitchEntry;
import com.github.javaparser.ast.stmt.SwitchStmt;
import com.github.javaparser.ast.stmt.ThrowStmt;
import com.github.javaparser.ast.expr.*;
import com.github.javaparser.ast.stmt.*;
import com.github.javaparser.ast.type.ClassOrInterfaceType;

import static com.github.javaparser.ast.Modifier.Keyword.PUBLIC;
Expand Down Expand Up @@ -228,7 +201,7 @@ public List<CompilationUnit> generate(FileDescriptorSource proto) throws IOExcep
}

if (customTypeName.equals(Serializable.class.getName())) {
String fieldClazz = (String) field.getOptionByName(KOGITO_JAVA_CLASS_OPTION);
String fieldClazz = field.getOptionByName(KOGITO_JAVA_CLASS_OPTION).getName();
if (fieldClazz == null) {
throw new IllegalArgumentException(format("Serializable proto field '%s' is missing value for option %s", field.getName(), KOGITO_JAVA_CLASS_OPTION));
} else {
Expand Down Expand Up @@ -317,7 +290,11 @@ public List<CompilationUnit> generate(FileDescriptorSource proto) throws IOExcep
}

protected String packageFromOption(FileDescriptor d, Descriptor msg) {
return packageFromOption(d, msg.getOption(JAVA_PACKAGE_OPTION));
Option option = msg.getOptions().stream()
.filter(o -> JAVA_PACKAGE_OPTION.equals(o.getName()))
.findAny()
.orElse(null);
return packageFromOption(d, option);
}

protected String packageFromOption(FileDescriptor d, EnumDescriptor msg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void testPersonMarshallers() throws Exception {
assertThat(proto.getMessages()).hasSize(1);

MarshallerGenerator marshallerGenerator = withGenerator(Person.class);

proto.serialize();
List<CompilationUnit> classes = marshallerGenerator.generate(proto.serialize());
assertThat(classes).isNotNull().hasSize(1);

Expand Down
3 changes: 3 additions & 0 deletions quarkus/addons/camel/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@
<version>${version.io.quarkus}</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<arg>-AlegacyConfigRoot=true</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
Expand Down
3 changes: 3 additions & 0 deletions quarkus/addons/camel/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
<version>${version.io.quarkus}</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<arg>-AlegacyConfigRoot=true</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
Expand Down
3 changes: 3 additions & 0 deletions quarkus/addons/dynamic/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
<version>${version.io.quarkus}</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<arg>-AlegacyConfigRoot=true</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
Expand Down
4 changes: 4 additions & 0 deletions quarkus/addons/dynamic/integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-process-dynamic</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-oidc-client-filter</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
Expand Down
3 changes: 3 additions & 0 deletions quarkus/addons/dynamic/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
<version>${version.io.quarkus}</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<arg>-AlegacyConfigRoot=true</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
Expand Down
3 changes: 3 additions & 0 deletions quarkus/addons/events/decisions/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
<version>${version.io.quarkus}</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<arg>-AlegacyConfigRoot=true</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
Expand Down
3 changes: 3 additions & 0 deletions quarkus/addons/events/mongodb/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
<version>${version.io.quarkus}</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<arg>-AlegacyConfigRoot=true</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
Expand Down
Loading

0 comments on commit e943195

Please sign in to comment.