This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new e3038c3de85 Make aws-crt optional for camel-quarkus-aws2-s3
e3038c3de85 is described below
commit e3038c3de85206f8fae4b93866577f6a0871f843
Author: Federico Mariani <[email protected]>
AuthorDate: Wed Dec 2 11:16:00 2026 +0100
Make aws-crt optional for camel-quarkus-aws2-s3
* Make aws-crt optional for camel-quarkus-aws2-s3
Fixes #9604
camel-quarkus-aws2-s3 shipped software.amazon.awssdk.crt:aws-crt (~23.8 MB
of native libraries) in every application, only to keep native builds
working. The AWS processors registered every ExecutionInterceptor in the
index for reflection, including the S3 CRT client's interceptors, which
reference aws-crt types through S3InternalSdkHttpExecutionAttribute.
Register interceptors through a shared AwsExecutionInterceptors helper
that skips the AWS SDK's CRT-internal classes when aws-crt is absent,
drop the hard dependency, keep aws-crt managed in the BOM for
applications that need CRT-based checksums, and document the change.
* Document that CRC64NVME download validation is skipped without aws-crt
Mention in the 4.0.0 migration guide that, without aws-crt, the AWS SDK
does not validate CRC64NVME or XXHASH* checksums when reading objects.
---
docs/modules/ROOT/pages/migration-guide/4.0.0.adoc | 14 ++++++
.../ROOT/pages/reference/extensions/aws2-s3.adoc | 25 ++++++++++
.../deployment/AwsExecutionInterceptors.java | 53 ++++++++++++++++++++++
.../athena/deployment/Aws2AthenaProcessor.java | 16 ++-----
.../aws2/cw/deployment/Aws2CwProcessor.java | 16 ++-----
.../aws2/ddb/deployment/Aws2DdbProcessor.java | 16 ++-----
.../aws2/ec2/deployment/Aws2Ec2Processor.java | 16 ++-----
.../aws2/ecs/deployment/Aws2EcsProcessor.java | 16 ++-----
.../aws2/eks/deployment/Aws2EksProcessor.java | 16 ++-----
.../deployment/Aws2EventbridgeProcessor.java | 16 ++-----
.../aws2/iam/deployment/Aws2IamProcessor.java | 16 ++-----
.../aws2/kms/deployment/Aws2KmsProcessor.java | 16 ++-----
.../lambda/deployment/Aws2LambdaProcessor.java | 16 ++-----
.../aws2/mq/deployment/Aws2MqProcessor.java | 16 ++-----
.../aws2/msk/deployment/Aws2MskProcessor.java | 16 ++-----
.../aws2/s3/deployment/Aws2S3Processor.java | 16 ++-----
extensions/aws2-s3/runtime/pom.xml | 5 --
extensions/aws2-s3/runtime/src/main/doc/usage.adoc | 20 ++++++++
.../aws2/ses/deployment/Aws2SesProcessor.java | 16 ++-----
.../aws2/sns/deployment/Aws2SnsProcessor.java | 16 ++-----
.../aws2/sqs/deployment/Aws2SqsProcessor.java | 16 ++-----
.../aws2/sts/deployment/Aws2StsProcessor.java | 16 ++-----
.../deployment/Aws2TranslateProcessor.java | 16 ++-----
poms/bom/pom.xml | 2 +
24 files changed, 186 insertions(+), 221 deletions(-)
diff --git a/docs/modules/ROOT/pages/migration-guide/4.0.0.adoc
b/docs/modules/ROOT/pages/migration-guide/4.0.0.adoc
index 0ac04cf3285..86768a729ce 100644
--- a/docs/modules/ROOT/pages/migration-guide/4.0.0.adoc
+++ b/docs/modules/ROOT/pages/migration-guide/4.0.0.adoc
@@ -208,3 +208,17 @@ In previous releases, a Quarkus TLS configuration with
`quarkus.tls.<name>.trust
These components now honor `trust-all`, and accept any server certificate.
Review TLS configurations that set `trust-all=true` and are used by Camel
components.
The same components can now also use the key store and trust store of a
bridged configuration, for example to present a client certificate.
+
+== AWS 2 S3 extension no longer depends on `aws-crt`
+
+`camel-quarkus-aws2-s3` no longer brings `software.amazon.awssdk.crt:aws-crt`
(about 23 MB of native libraries) onto
+the classpath of every application. Camel's S3 component does not need it, and
checksums that the JDK can compute,
+such as `CRC32`, `CRC32C`, `SHA1`, `SHA256` and `SHA512`, keep working.
+
+If your application uses an AWS SDK feature that requires the AWS Common
Runtime in JVM mode, such as the `CRC64NVME`
+or `XXHASH*` checksum algorithms, add the `software.amazon.awssdk.crt:aws-crt`
dependency explicitly. Its version is
+managed by the Camel Quarkus BOM.
+
+Download validation changes too. Without `aws-crt`, the AWS SDK does not
validate `CRC64NVME` or `XXHASH*` checksums
+when reading objects, even with checksum validation enabled: it validates
another checksum that the response includes,
+or skips the validation without an error. If your application relies on this
validation, add the dependency.
diff --git a/docs/modules/ROOT/pages/reference/extensions/aws2-s3.adoc
b/docs/modules/ROOT/pages/reference/extensions/aws2-s3.adoc
index 5ce4d06275f..9a7f43d7136 100644
--- a/docs/modules/ROOT/pages/reference/extensions/aws2-s3.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/aws2-s3.adoc
@@ -45,6 +45,31 @@ ifeval::[{doc-show-user-guide-link} == true]
Check the xref:user-guide/index.adoc[User guide] for more information about
writing Camel Quarkus applications.
endif::[]
+[id="extensions-aws2-s3-usage"]
+== Usage
+[id="extensions-aws2-s3-usage-optional-aws-crt-dependency"]
+=== Optional `aws-crt` dependency
+
+The extension does not depend on `software.amazon.awssdk.crt:aws-crt`. The AWS
SDK only needs it for features
+implemented in the AWS Common Runtime (CRT), such as the `CRC64NVME` and
`XXHASH*` checksum algorithms. If you
+use them, add the dependency to your application. Its version is managed by
the Camel Quarkus BOM:
+
+[source,xml]
+----
+<dependency>
+ <groupId>software.amazon.awssdk.crt</groupId>
+ <artifactId>aws-crt</artifactId>
+</dependency>
+----
+
+CRT-based checksum algorithms are supported in JVM mode only. Without
`aws-crt`, requesting one fails with an error
+asking you to add the dependency.
+
+You can still read objects that carry a `CRC64NVME` checksum, which Amazon S3
computes by default for new objects,
+without `aws-crt`. The SDK then validates the response with another checksum
that the response includes, or skips the
+validation.
+
+
[id="extensions-aws2-s3-ssl-in-native-mode"]
== SSL in native mode
diff --git
a/extensions-support/aws2/deployment/src/main/java/org/apache/camel/quarkus/component/aws/commons/deployment/AwsExecutionInterceptors.java
b/extensions-support/aws2/deployment/src/main/java/org/apache/camel/quarkus/component/aws/commons/deployment/AwsExecutionInterceptors.java
new file mode 100644
index 00000000000..dcd6ff4e603
--- /dev/null
+++
b/extensions-support/aws2/deployment/src/main/java/org/apache/camel/quarkus/component/aws/commons/deployment/AwsExecutionInterceptors.java
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+package org.apache.camel.quarkus.component.aws.commons.deployment;
+
+import io.quarkus.bootstrap.classloading.QuarkusClassLoader;
+import org.jboss.jandex.DotName;
+import org.jboss.jandex.IndexView;
+
+/**
+ * Lists the AWS SDK {@code ExecutionInterceptor} implementations to register
for reflection.
+ * <p>
+ * {@code software.amazon.awssdk.crt:aws-crt} is optional. The CRT-based
clients (e.g. the S3 CRT async client) install
+ * their own interceptors programmatically, and those reference aws-crt types.
Registering them for reflection when
+ * aws-crt is not on the classpath makes them reachable and fails the native
build with {@code NoClassDefFoundError}.
+ */
+public final class AwsExecutionInterceptors {
+
+ private static final DotName EXECUTION_INTERCEPTOR = DotName
+
.createSimple("software.amazon.awssdk.core.interceptor.ExecutionInterceptor");
+ private static final String AWS_CRT_CLASS =
"software.amazon.awssdk.crt.CRT";
+ private static final String AWS_SDK_PACKAGE_PREFIX =
"software.amazon.awssdk.";
+ private static final String CRT_INTERNAL_PACKAGE_MARKER = ".internal.crt.";
+
+ private AwsExecutionInterceptors() {
+ }
+
+ public static String[] knownImplementations(IndexView index) {
+ boolean awsCrtPresent =
QuarkusClassLoader.isClassPresentAtRuntime(AWS_CRT_CLASS);
+ return index.getAllKnownImplementations(EXECUTION_INTERCEPTOR)
+ .stream()
+ .map(c -> c.name().toString())
+ .filter(name -> awsCrtPresent || !isAwsSdkCrtInternal(name))
+ .toArray(String[]::new);
+ }
+
+ private static boolean isAwsSdkCrtInternal(String className) {
+ return className.startsWith(AWS_SDK_PACKAGE_PREFIX) &&
className.contains(CRT_INTERNAL_PACKAGE_MARKER);
+ }
+}
diff --git
a/extensions/aws2-athena/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/athena/deployment/Aws2AthenaProcessor.java
b/extensions/aws2-athena/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/athena/deployment/Aws2AthenaProcessor.java
index 6c5464711d9..5c898e492d0 100644
---
a/extensions/aws2-athena/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/athena/deployment/Aws2AthenaProcessor.java
+++
b/extensions/aws2-athena/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/athena/deployment/Aws2AthenaProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2AthenaProcessor {
@@ -37,8 +36,6 @@ class Aws2AthenaProcessor {
private static final List<String> INTERCEPTOR_PATHS = List.of(
"software/amazon/awssdk/global/handlers/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -51,14 +48,9 @@ class Aws2AthenaProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-cw/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/cw/deployment/Aws2CwProcessor.java
b/extensions/aws2-cw/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/cw/deployment/Aws2CwProcessor.java
index 60c74c38639..3992f71dad5 100644
---
a/extensions/aws2-cw/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/cw/deployment/Aws2CwProcessor.java
+++
b/extensions/aws2-cw/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/cw/deployment/Aws2CwProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2CwProcessor {
@@ -37,8 +36,6 @@ class Aws2CwProcessor {
private static final List<String> INTERCEPTOR_PATHS = List.of(
"software/amazon/awssdk/global/handlers/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -51,14 +48,9 @@ class Aws2CwProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-ddb/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/deployment/Aws2DdbProcessor.java
b/extensions/aws2-ddb/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/deployment/Aws2DdbProcessor.java
index 80c5977b4f1..72f19e51f43 100644
---
a/extensions/aws2-ddb/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/deployment/Aws2DdbProcessor.java
+++
b/extensions/aws2-ddb/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/deployment/Aws2DdbProcessor.java
@@ -26,8 +26,7 @@ import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2DdbProcessor {
private static final String FEATURE = "camel-aws2-ddb";
@@ -38,8 +37,6 @@ class Aws2DdbProcessor {
"software/amazon/awssdk/global/handlers/execution.interceptors",
"software/amazon/awssdk/services/dynamodb/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -52,14 +49,9 @@ class Aws2DdbProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-ec2/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ec2/deployment/Aws2Ec2Processor.java
b/extensions/aws2-ec2/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ec2/deployment/Aws2Ec2Processor.java
index 3e9fca334b7..3ce577844d1 100644
---
a/extensions/aws2-ec2/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ec2/deployment/Aws2Ec2Processor.java
+++
b/extensions/aws2-ec2/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ec2/deployment/Aws2Ec2Processor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2Ec2Processor {
private static final String FEATURE = "camel-aws2-ec2";
@@ -37,8 +36,6 @@ class Aws2Ec2Processor {
"software/amazon/awssdk/global/handlers/execution.interceptors",
"software/amazon/awssdk/services/ec2/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -51,14 +48,9 @@ class Aws2Ec2Processor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-ecs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ecs/deployment/Aws2EcsProcessor.java
b/extensions/aws2-ecs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ecs/deployment/Aws2EcsProcessor.java
index 34a8383dc92..fc6a1f7d156 100644
---
a/extensions/aws2-ecs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ecs/deployment/Aws2EcsProcessor.java
+++
b/extensions/aws2-ecs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ecs/deployment/Aws2EcsProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2EcsProcessor {
private static final String FEATURE = "camel-aws2-ecs";
@@ -36,8 +35,6 @@ class Aws2EcsProcessor {
private static final List<String> INTERCEPTOR_PATHS = List.of(
"software/amazon/awssdk/global/handlers/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -50,14 +47,9 @@ class Aws2EcsProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-eks/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/eks/deployment/Aws2EksProcessor.java
b/extensions/aws2-eks/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/eks/deployment/Aws2EksProcessor.java
index f927ff18721..3d77716e5cc 100644
---
a/extensions/aws2-eks/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/eks/deployment/Aws2EksProcessor.java
+++
b/extensions/aws2-eks/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/eks/deployment/Aws2EksProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2EksProcessor {
private static final String FEATURE = "camel-aws2-eks";
@@ -36,8 +35,6 @@ class Aws2EksProcessor {
private static final List<String> INTERCEPTOR_PATHS = List.of(
"software/amazon/awssdk/global/handlers/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -50,14 +47,9 @@ class Aws2EksProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-eventbridge/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/eventbridge/deployment/Aws2EventbridgeProcessor.java
b/extensions/aws2-eventbridge/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/eventbridge/deployment/Aws2EventbridgeProcessor.java
index fe643ca7de4..7ad700e8eaf 100644
---
a/extensions/aws2-eventbridge/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/eventbridge/deployment/Aws2EventbridgeProcessor.java
+++
b/extensions/aws2-eventbridge/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/eventbridge/deployment/Aws2EventbridgeProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2EventbridgeProcessor {
@@ -37,8 +36,6 @@ class Aws2EventbridgeProcessor {
private static final List<String> INTERCEPTOR_PATHS = List.of(
"software/amazon/awssdk/global/handlers/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -51,14 +48,9 @@ class Aws2EventbridgeProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-iam/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/iam/deployment/Aws2IamProcessor.java
b/extensions/aws2-iam/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/iam/deployment/Aws2IamProcessor.java
index e9950733349..d3f3818c966 100644
---
a/extensions/aws2-iam/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/iam/deployment/Aws2IamProcessor.java
+++
b/extensions/aws2-iam/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/iam/deployment/Aws2IamProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2IamProcessor {
private static final String FEATURE = "camel-aws2-iam";
@@ -37,8 +36,6 @@ class Aws2IamProcessor {
"software/amazon/awssdk/global/handlers/execution.interceptors",
"software/amazon/awssdk/services/iam/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -51,14 +48,9 @@ class Aws2IamProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-kms/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/kms/deployment/Aws2KmsProcessor.java
b/extensions/aws2-kms/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/kms/deployment/Aws2KmsProcessor.java
index 5c61c928e54..442128af3f1 100644
---
a/extensions/aws2-kms/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/kms/deployment/Aws2KmsProcessor.java
+++
b/extensions/aws2-kms/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/kms/deployment/Aws2KmsProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2KmsProcessor {
private static final String FEATURE = "camel-aws2-kms";
@@ -36,8 +35,6 @@ class Aws2KmsProcessor {
private static final List<String> INTERCEPTOR_PATHS = List.of(
"software/amazon/awssdk/global/handlers/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -50,14 +47,9 @@ class Aws2KmsProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-lambda/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/lambda/deployment/Aws2LambdaProcessor.java
b/extensions/aws2-lambda/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/lambda/deployment/Aws2LambdaProcessor.java
index fc90390d90f..794a3001c88 100644
---
a/extensions/aws2-lambda/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/lambda/deployment/Aws2LambdaProcessor.java
+++
b/extensions/aws2-lambda/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/lambda/deployment/Aws2LambdaProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2LambdaProcessor {
@@ -37,8 +36,6 @@ class Aws2LambdaProcessor {
private static final List<String> INTERCEPTOR_PATHS = List.of(
"software/amazon/awssdk/global/handlers/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -51,14 +48,9 @@ class Aws2LambdaProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-mq/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/mq/deployment/Aws2MqProcessor.java
b/extensions/aws2-mq/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/mq/deployment/Aws2MqProcessor.java
index 65b65666642..aaf38001916 100644
---
a/extensions/aws2-mq/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/mq/deployment/Aws2MqProcessor.java
+++
b/extensions/aws2-mq/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/mq/deployment/Aws2MqProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2MqProcessor {
private static final String FEATURE = "camel-aws2-mq";
@@ -36,8 +35,6 @@ class Aws2MqProcessor {
private static final List<String> INTERCEPTOR_PATHS = List.of(
"software/amazon/awssdk/global/handlers/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -50,14 +47,9 @@ class Aws2MqProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-msk/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/msk/deployment/Aws2MskProcessor.java
b/extensions/aws2-msk/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/msk/deployment/Aws2MskProcessor.java
index 748c7dfbb94..dc5eb0bacc8 100644
---
a/extensions/aws2-msk/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/msk/deployment/Aws2MskProcessor.java
+++
b/extensions/aws2-msk/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/msk/deployment/Aws2MskProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2MskProcessor {
private static final String FEATURE = "camel-aws2-msk";
@@ -36,8 +35,6 @@ class Aws2MskProcessor {
private static final List<String> INTERCEPTOR_PATHS = List.of(
"software/amazon/awssdk/global/handlers/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -50,14 +47,9 @@ class Aws2MskProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-s3/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/s3/deployment/Aws2S3Processor.java
b/extensions/aws2-s3/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/s3/deployment/Aws2S3Processor.java
index 48cf0d29e18..6c5cc5bdd7c 100644
---
a/extensions/aws2-s3/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/s3/deployment/Aws2S3Processor.java
+++
b/extensions/aws2-s3/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/s3/deployment/Aws2S3Processor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2S3Processor {
@@ -38,8 +37,6 @@ class Aws2S3Processor {
"software/amazon/awssdk/global/handlers/execution.interceptors",
"software/amazon/awssdk/services/s3/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -52,14 +49,9 @@ class Aws2S3Processor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git a/extensions/aws2-s3/runtime/pom.xml
b/extensions/aws2-s3/runtime/pom.xml
index 62d4e8e0bf3..c09685be721 100644
--- a/extensions/aws2-s3/runtime/pom.xml
+++ b/extensions/aws2-s3/runtime/pom.xml
@@ -53,11 +53,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jaxp</artifactId>
</dependency>
- <dependency>
- <!-- An optional dep of s3. If we do not have it here, GraalVM
complains about missing classes from aws-crt -->
- <groupId>software.amazon.awssdk.crt</groupId>
- <artifactId>aws-crt</artifactId>
- </dependency>
</dependencies>
<build>
diff --git a/extensions/aws2-s3/runtime/src/main/doc/usage.adoc
b/extensions/aws2-s3/runtime/src/main/doc/usage.adoc
new file mode 100644
index 00000000000..9515390941f
--- /dev/null
+++ b/extensions/aws2-s3/runtime/src/main/doc/usage.adoc
@@ -0,0 +1,20 @@
+=== Optional `aws-crt` dependency
+
+The extension does not depend on `software.amazon.awssdk.crt:aws-crt`. The AWS
SDK only needs it for features
+implemented in the AWS Common Runtime (CRT), such as the `CRC64NVME` and
`XXHASH*` checksum algorithms. If you
+use them, add the dependency to your application. Its version is managed by
the Camel Quarkus BOM:
+
+[source,xml]
+----
+<dependency>
+ <groupId>software.amazon.awssdk.crt</groupId>
+ <artifactId>aws-crt</artifactId>
+</dependency>
+----
+
+CRT-based checksum algorithms are supported in JVM mode only. Without
`aws-crt`, requesting one fails with an error
+asking you to add the dependency.
+
+You can still read objects that carry a `CRC64NVME` checksum, which Amazon S3
computes by default for new objects,
+without `aws-crt`. The SDK then validates the response with another checksum
that the response includes, or skips the
+validation.
diff --git
a/extensions/aws2-ses/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ses/deployment/Aws2SesProcessor.java
b/extensions/aws2-ses/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ses/deployment/Aws2SesProcessor.java
index b12345a9099..b3d6f65d2a1 100644
---
a/extensions/aws2-ses/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ses/deployment/Aws2SesProcessor.java
+++
b/extensions/aws2-ses/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/ses/deployment/Aws2SesProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2SesProcessor {
private static final String FEATURE = "camel-aws2-ses";
@@ -36,8 +35,6 @@ class Aws2SesProcessor {
private static final List<String> INTERCEPTOR_PATHS = List.of(
"software/amazon/awssdk/global/handlers/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -50,14 +47,9 @@ class Aws2SesProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-sns/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sns/deployment/Aws2SnsProcessor.java
b/extensions/aws2-sns/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sns/deployment/Aws2SnsProcessor.java
index ed404450879..487e4c2d25a 100644
---
a/extensions/aws2-sns/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sns/deployment/Aws2SnsProcessor.java
+++
b/extensions/aws2-sns/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sns/deployment/Aws2SnsProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2SnsProcessor {
@@ -38,8 +37,6 @@ class Aws2SnsProcessor {
"software/amazon/awssdk/global/handlers/execution.interceptors",
"software/amazon/awssdk/services/sns/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -52,14 +49,9 @@ class Aws2SnsProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/deployment/Aws2SqsProcessor.java
b/extensions/aws2-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/deployment/Aws2SqsProcessor.java
index 009d4e9474b..cd6af9bc6b0 100644
---
a/extensions/aws2-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/deployment/Aws2SqsProcessor.java
+++
b/extensions/aws2-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/deployment/Aws2SqsProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2SqsProcessor {
private static final String FEATURE = "camel-aws2-sqs";
@@ -37,8 +36,6 @@ class Aws2SqsProcessor {
"software/amazon/awssdk/global/handlers/execution.interceptors",
"software/amazon/awssdk/services/sqs/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -51,14 +48,9 @@ class Aws2SqsProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-sts/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sts/deployment/Aws2StsProcessor.java
b/extensions/aws2-sts/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sts/deployment/Aws2StsProcessor.java
index 53089d03a31..8f6e59fb8a4 100644
---
a/extensions/aws2-sts/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sts/deployment/Aws2StsProcessor.java
+++
b/extensions/aws2-sts/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sts/deployment/Aws2StsProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2StsProcessor {
private static final String FEATURE = "camel-aws2-sts";
@@ -36,8 +35,6 @@ class Aws2StsProcessor {
private static final List<String> INTERCEPTOR_PATHS = List.of(
"software/amazon/awssdk/global/handlers/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -50,14 +47,9 @@ class Aws2StsProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git
a/extensions/aws2-translate/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/translate/deployment/Aws2TranslateProcessor.java
b/extensions/aws2-translate/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/translate/deployment/Aws2TranslateProcessor.java
index 82d96592397..4d6a01a99eb 100644
---
a/extensions/aws2-translate/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/translate/deployment/Aws2TranslateProcessor.java
+++
b/extensions/aws2-translate/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/translate/deployment/Aws2TranslateProcessor.java
@@ -25,8 +25,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.jboss.jandex.DotName;
-import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import
org.apache.camel.quarkus.component.aws.commons.deployment.AwsExecutionInterceptors;
class Aws2TranslateProcessor {
private static final String FEATURE = "camel-aws2-translate";
@@ -36,8 +35,6 @@ class Aws2TranslateProcessor {
private static final List<String> INTERCEPTOR_PATHS = List.of(
"software/amazon/awssdk/global/handlers/execution.interceptors");
- private static final DotName EXECUTION_INTERCEPTOR_NAME =
DotName.createSimple(ExecutionInterceptor.class.getName());
-
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
@@ -50,14 +47,9 @@ class Aws2TranslateProcessor {
INTERCEPTOR_PATHS.forEach(path -> resource.produce(new
NativeImageResourceBuildItem(path)));
- List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
- .getAllKnownImplementations(EXECUTION_INTERCEPTOR_NAME)
- .stream()
- .map(c -> c.name().toString()).toList();
-
- reflectiveClasses.produce(
-
ReflectiveClassBuildItem.builder(knownInterceptorImpls.toArray(new
String[knownInterceptorImpls.size()]))
- .build());
+ reflectiveClasses.produce(ReflectiveClassBuildItem
+
.builder(AwsExecutionInterceptors.knownImplementations(combinedIndexBuildItem.getIndex()))
+ .build());
reflectiveClasses
.produce(ReflectiveClassBuildItem.builder(String.class.getCanonicalName()).methods().build());
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 849b32f306a..61e42eee81b 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -8609,6 +8609,8 @@
<!-- Tika parses only the formats whose parser
modules are present; camel-quarkus-tika
applications add the modules for their
formats -->
<resolutionEntryPointInclude>org.apache.tika:tika-parser-pdf-module</resolutionEntryPointInclude>
+ <!-- Optional for camel-quarkus-aws2-s3:
applications that need CRT-based checksums add it -->
+
<resolutionEntryPointInclude>software.amazon.awssdk.crt:aws-crt</resolutionEntryPointInclude>
</resolutionEntryPointIncludes>
<resolutionExcludes>
<!-- Exclude artifacts that we do not want in
the flattened BOM -->