Skip to content

Commit

Permalink
Upgrade Quarkus to 3.16.0.CR1
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Oct 16, 2024
1 parent af31964 commit f9bfc9c
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 41 deletions.
4 changes: 2 additions & 2 deletions docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ asciidoc:
camel-version: 4.8.0 # replace ${camel.version}
camel-docs-version: 4.8.x
camel-quarkus-version: 3.16.0 # replace ${camel-quarkus.version}
quarkus-version: 3.15.1 # replace ${quarkus.version}
quarkus-version: 3.16.0.CR1 # replace ${quarkus.version}
graalvm-version: 23.1.2 # replace ${graalvm.version}
graalvm-docs-version: jdk21 # replace ${graalvm-docs.version}
mapstruct-version: 1.6.0 # replace ${mapstruct.version}
min-maven-version: 3.8.2 # replace ${min-maven-version}
target-maven-version: 3.9.8 # replace ${target-maven-version}
target-maven-version: 3.9.9 # replace ${target-maven-version}

# Attributes used in xrefs to other Antora components
cq-camel-components: components
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ quarkus.native.resources.includes=contract.json

|icon:lock[title=Fixed at build time] [[quarkus.camel.openapi.codegen.enabled]]`link:#quarkus.camel.openapi.codegen.enabled[quarkus.camel.openapi.codegen.enabled]`

If `true`, Camel Quarkus OpenAPI code generation is run for .json files discovered from the `openapi` directory. When `false`, code generation for .json files is disabled.
If {@code true}, Camel Quarkus OpenAPI code generation is run for .json files discovered from the {@code openapi}
directory. When {@code false}, code generation for .json files is disabled.
| `boolean`
| `true`

Expand All @@ -156,13 +157,13 @@ A comma separated list of models to generate. All models is the default.

|icon:lock[title=Fixed at build time] [[quarkus.camel.openapi.codegen.use-bean-validation]]`link:#quarkus.camel.openapi.codegen.use-bean-validation[quarkus.camel.openapi.codegen.use-bean-validation]`

If `true`, use bean validation annotations in the generated model classes.
If {@code true}, use bean validation annotations in the generated model classes.
| `boolean`
| `false`

|icon:lock[title=Fixed at build time] [[quarkus.camel.openapi.codegen.not-null-jackson]]`link:#quarkus.camel.openapi.codegen.not-null-jackson[quarkus.camel.openapi.codegen.not-null-jackson]`

If `true`, use NON_NULL Jackson annotation in the generated model classes.
If {@code true}, use NON_NULL Jackson annotation in the generated model classes.
| `boolean`
| `false`
|===
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,21 @@
*/
package org.apache.camel.quarkus.support.swagger.runtime.graal;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.Calendar;
import java.util.List;

import com.fasterxml.jackson.databind.BeanDescription;
import com.fasterxml.jackson.databind.introspect.AnnotatedMember;
import com.oracle.svm.core.annotate.Alias;
import com.oracle.svm.core.annotate.RecomputeFieldValue;
import com.oracle.svm.core.annotate.RecomputeFieldValue.Kind;
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
import io.swagger.parser.OpenAPIParser;
import io.swagger.v3.core.jackson.ModelResolver;
import io.swagger.v3.parser.OpenAPIV3Parser;
import io.swagger.v3.parser.core.extensions.SwaggerParserExtension;
import io.swagger.v3.parser.core.models.AuthorizationValue;
Expand Down Expand Up @@ -98,9 +104,28 @@ public SwaggerParseResult readContents(String swaggerAsString, List<Authorizatio
}

@TargetClass(Calendar.Builder.class)
final class CalendarBuilderSubstitution {
final class CalendarBuilderSubstitutions {
@Substitute
public Calendar build() {
throw new UnsupportedOperationException("Calendar::build is not supported");
}
}

// Cuts out references to deprecated & removed Jackson methods
// TODO: Remove this https://github.com/apache/camel-quarkus/issues/6593
@TargetClass(ModelResolver.class)
final class ModelResolverSubstitutions {
@Substitute
protected Type findJsonValueType(final BeanDescription beanDesc) {
try {
Method m = BeanDescription.class.getMethod("findJsonValueAccessor");
AnnotatedMember jsonValueMember = (AnnotatedMember) m.invoke(beanDesc);
if (jsonValueMember != null) {
return jsonValueMember.getType();
}
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
return null;
}
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@
import io.quarkus.deployment.builditem.IndexDependencyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.smallrye.openapi.deployment.spi.AddToOpenAPIDefinitionBuildItem;
import io.smallrye.openapi.api.models.OpenAPIImpl;
import io.smallrye.openapi.api.util.MergeUtil;
import io.smallrye.openapi.runtime.io.definition.DefinitionReader;
import io.smallrye.openapi.runtime.io.IOContext;
import io.smallrye.openapi.runtime.io.JsonIO;
import io.smallrye.openapi.runtime.io.OpenAPIDefinitionIO;
import io.swagger.v3.core.jackson.mixin.Components31Mixin;
import io.swagger.v3.core.jackson.mixin.ComponentsMixin;
import io.swagger.v3.core.jackson.mixin.DateSchemaMixin;
Expand Down Expand Up @@ -239,8 +240,7 @@ public void filterOpenAPI(OpenAPI openAPI) {
String jsonContent = RestOpenApiSupport.getJsonFromOpenAPIAsString(openApi, bc);
final JsonNode node = mapper.readTree(jsonContent);

OpenAPI oai = new OpenAPIImpl();
DefinitionReader.processDefinition(oai, node);
OpenAPI oai = new OpenAPIDefinitionIO(IOContext.forJson(JsonIO.newInstance(null))).readObject(node);
MergeUtil.merge(openAPI, oai);
} catch (Exception e) {
LOGGER.warn("Error generating OpenAPI from Camel Rest DSL due to: {}. This exception is ignored.", e.getMessage(),
Expand Down
1 change: 1 addition & 0 deletions integration-tests-support/certificate-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<dependency>
<groupId>io.smallrye.certs</groupId>
<artifactId>smallrye-certificate-generator-junit5</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ExecutorService produceCustomBulkheadExecutorService() {
@ApplicationScoped
@Named("threadTimer")
ThreadTimer threadTimer(@Named("threadTimerExecutor") ExecutorService executorService) {
return ThreadTimer.create(executorService);
return new ThreadTimer(executorService);
}

@ApplicationScoped
Expand Down
11 changes: 5 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<quarkiverse-mybatis.version>2.2.4</quarkiverse-mybatis.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/mybatis/quarkus-mybatis-parent/ -->
<quarkiverse-pooled-jms.version>2.6.0</quarkiverse-pooled-jms.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/messaginghub/quarkus-pooled-jms-parent/ -->
<quarkiverse-tika.version>2.0.4</quarkiverse-tika.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/tika/quarkus-tika-parent/ -->
<quarkus.version>3.15.1</quarkus.version><!-- https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/ -->
<quarkus.version>3.16.0.CR1</quarkus.version><!-- https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/ -->
<quarkus-hazelcast-client.version>4.0.0</quarkus-hazelcast-client.version><!-- https://repo1.maven.org/maven2/com/hazelcast/quarkus-hazelcast-client-bom/ -->
<quarkus-qpid-jms.version>2.7.1</quarkus-qpid-jms.version><!-- This should be in sync with quarkus-platform https://repo1.maven.org/maven2/org/amqphub/quarkus/quarkus-qpid-jms-bom/ -->

Expand Down Expand Up @@ -132,7 +132,7 @@
<jxmpp.version>1.0.3</jxmpp.version><!-- @sync org.apache.camel:camel-xmpp:${camel.version} dep:org.jxmpp:jxmpp-jid -->
<kafka.version>3.7.1</kafka.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:org.apache.kafka:kafka-clients -->
<kudu.version>${kudu-version}</kudu.version>
<kotlin.version>2.0.10</kotlin.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:org.jetbrains.kotlin:kotlin-stdlib -->
<kotlin.version>2.0.21</kotlin.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:org.jetbrains.kotlin:kotlin-stdlib -->
<kotlinx.version>1.4.0</kotlinx.version><!--Used by com.squareup.wire:wire-compiler referenced from aws2:kinesis -->
<kryo.version>2.24.0</kryo.version><!-- @sync org.apache.flink:flink-core:${flink-version} dep:com.esotericsoftware.kryo:kryo -->
<langchain4j.version>0.35.0</langchain4j.version><!-- @sync io.quarkiverse.langchain4j:quarkus-langchain4j-parent:${quarkiverse-langchain4j.version} prop:langchain4j.version -->
Expand All @@ -153,8 +153,8 @@
<reactor-netty.version>${reactor-netty-version}</reactor-netty.version>
<retrofit.version>2.9.0</retrofit.version><!-- @sync org.influxdb:influxdb-java:${influxdb.version} dep:com.squareup.retrofit2:retrofit -->
<rxjava3.version>3.1.8</rxjava3.version><!-- Used by amazon-kinesis-client and infinispan-client-hotrod-jakarta -->
<smallrye.reactive.messaging.camel.version>4.24.0</smallrye.reactive.messaging.camel.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:io.smallrye.reactive:smallrye-reactive-messaging-provider -->
<snakeyaml.version>2.2</snakeyaml.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:org.yaml:snakeyaml -->
<smallrye.reactive.messaging.camel.version>4.25.0</smallrye.reactive.messaging.camel.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:io.smallrye.reactive:smallrye-reactive-messaging-provider -->
<snakeyaml.version>2.3</snakeyaml.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:org.yaml:snakeyaml -->
<snakeyaml-engine.version>${snakeyaml-engine-version}</snakeyaml-engine.version><!-- Resolve conflict between camel-snakeyaml & kubernetes-client -->
<spring.version>${spring-version}</spring.version>
<spring.data.redis.version>${spring-data-redis-version}</spring.data.redis.version>
Expand All @@ -173,7 +173,6 @@
<zstd-jni.version>1.5.6-3</zstd-jni.version><!-- @sync org.apache.kafka:kafka-clients:${kafka.version} dep:com.github.luben:zstd-jni -->

<!-- Test dependency versions (keep sorted alphabetically) -->
<smallrye-certificate-generator-junit5.version>0.8.1</smallrye-certificate-generator-junit5.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:io.smallrye.certs:smallrye-certificate-generator -->
<consul-client.version>${consul-client-version}</consul-client.version>
<ftpserver.version>${ftpserver-version}</ftpserver.version>
<hamcrest.version>3.0</hamcrest.version><!-- Awaitility and Wiremock -->
Expand Down Expand Up @@ -272,7 +271,7 @@

<!-- maven-enforcer-plugin -->
<min-maven-version>3.8.2</min-maven-version>
<target-maven-version>3.9.8</target-maven-version><!-- @sync io.quarkus:quarkus-build-parent:${quarkus.version} prop:proposed-maven-version -->
<target-maven-version>3.9.9</target-maven-version><!-- @sync io.quarkus:quarkus-build-parent:${quarkus.version} prop:proposed-maven-version -->
<supported-maven-versions>[${min-maven-version},)</supported-maven-versions>

<!-- maven-release-plugin -->
Expand Down
6 changes: 0 additions & 6 deletions poms/bom-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@
<artifactId>quarkus-micrometer-registry-jmx</artifactId>
<version>${quarkiverse-micrometer.version}</version>
</dependency>
<!-- TODO: Remove for Quarkus 3.16.0 https://github.com/quarkusio/quarkus/pull/43393 -->
<dependency>
<groupId>io.smallrye.certs</groupId>
<artifactId>smallrye-certificate-generator-junit5</artifactId>
<version>${smallrye-certificate-generator-junit5.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-integration-test-support-custom-dataformat</artifactId>
Expand Down
12 changes: 6 additions & 6 deletions poms/bom/src/main/generated/flattened-full-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6913,7 +6913,7 @@
<dependency>
<groupId>io.smallrye.reactive</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>smallrye-reactive-messaging-camel</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>4.24.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>4.25.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
<dependency>
<groupId>io.swagger.codegen.v3</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
Expand Down Expand Up @@ -7204,27 +7204,27 @@
<dependency>
<groupId>org.jetbrains.kotlin</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>kotlin-script-util</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.10</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.21</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>kotlin-scripting-compiler-embeddable</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.10</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.21</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>kotlin-scripting-compiler-impl-embeddable</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.10</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.21</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>kotlin-scripting-jvm</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.10</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.21</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>kotlin-scripting-jvm-host</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.10</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.21</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
Expand Down
10 changes: 5 additions & 5 deletions poms/bom/src/main/generated/flattened-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6878,7 +6878,7 @@
<dependency>
<groupId>io.smallrye.reactive</groupId>
<artifactId>smallrye-reactive-messaging-camel</artifactId>
<version>4.24.0</version>
<version>4.25.0</version>
</dependency>
<dependency>
<groupId>io.swagger.codegen.v3</groupId>
Expand Down Expand Up @@ -7149,22 +7149,22 @@
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-scripting-compiler-embeddable</artifactId>
<version>2.0.10</version>
<version>2.0.21</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-scripting-compiler-impl-embeddable</artifactId>
<version>2.0.10</version>
<version>2.0.21</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-scripting-jvm</artifactId>
<version>2.0.10</version>
<version>2.0.21</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-scripting-jvm-host</artifactId>
<version>2.0.10</version>
<version>2.0.21</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
Expand Down
10 changes: 5 additions & 5 deletions poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6878,7 +6878,7 @@
<dependency>
<groupId>io.smallrye.reactive</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>smallrye-reactive-messaging-camel</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>4.24.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>4.25.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
<dependency>
<groupId>io.swagger.codegen.v3</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
Expand Down Expand Up @@ -7149,22 +7149,22 @@
<dependency>
<groupId>org.jetbrains.kotlin</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>kotlin-scripting-compiler-embeddable</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.10</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.21</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>kotlin-scripting-compiler-impl-embeddable</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.10</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.21</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>kotlin-scripting-jvm</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.10</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.21</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>kotlin-scripting-jvm-host</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.10</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>2.0.21</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
Expand Down
Loading

0 comments on commit f9bfc9c

Please sign in to comment.