This is an automated email from the ASF dual-hosted git repository. ppalaga pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 2c04a067a4fb94ff7fce8b013058da1669311bc2 Author: Peter Palaga <[email protected]> AuthorDate: Mon Oct 18 23:15:02 2021 +0200 Improve AWS2 S3 docs #3195 --- .../ROOT/pages/reference/extensions/aws2-s3.adoc | 17 ++++++++++++----- .../aws2-s3/runtime/src/main/doc/configuration.adoc | 17 ++++++++++++----- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/docs/modules/ROOT/pages/reference/extensions/aws2-s3.adoc b/docs/modules/ROOT/pages/reference/extensions/aws2-s3.adoc index 941dcbe..792db17 100644 --- a/docs/modules/ROOT/pages/reference/extensions/aws2-s3.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/aws2-s3.adoc @@ -50,8 +50,8 @@ https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide]. === Optional integration with Quarkus Amazon S3 If desired, it is possible to use the Quarkus Amazon S3 Client extension in conjunction with Camel Quarkus AWS2 S3. -Note that this optional and not at all mandatory. -Follow the https://quarkus.io/guides/amazon-s3#configuring-s3-clients[documentation] with some caveats. +Note that this is fully optional and not at all mandatory. +Follow the https://quarkus.io/guides/amazon-s3#configuring-s3-clients[Quarkus documentation] with some caveats. 1. The Apache client type has to be selected by configuring the following property. + @@ -60,13 +60,20 @@ Follow the https://quarkus.io/guides/amazon-s3#configuring-s3-clients[documentat quarkus.s3.sync-client.type=apache ---- -2. The `S3Client` has to be injected somewhere in the application. This triggers its creation so that the Camel component can discover it. +2. The `S3Client` has to be "unremovable" in the sense of https://quarkus.io/guides/cdi-reference#remove_unused_beans[Quarkus CDI reference] so that Camel Quarkus is able to look it up at runtime. +You can reach that e.g. by adding a dummy bean injecting `S3Client`: + [source,java] ---- +import javax.enterprise.context.ApplicationScoped; +import io.quarkus.arc.Unremovable; import software.amazon.awssdk.services.s3.S3Client; -@Inject -S3Client s3Client; +@ApplicationScoped +@Unremovable +class UnremovableS3Client { + @Inject + S3Client s3Client; +} ---- diff --git a/extensions/aws2-s3/runtime/src/main/doc/configuration.adoc b/extensions/aws2-s3/runtime/src/main/doc/configuration.adoc index 72b08a6..f8748fc 100644 --- a/extensions/aws2-s3/runtime/src/main/doc/configuration.adoc +++ b/extensions/aws2-s3/runtime/src/main/doc/configuration.adoc @@ -1,8 +1,8 @@ === Optional integration with Quarkus Amazon S3 If desired, it is possible to use the Quarkus Amazon S3 Client extension in conjunction with Camel Quarkus AWS2 S3. -Note that this optional and not at all mandatory. -Follow the https://quarkus.io/guides/amazon-s3#configuring-s3-clients[documentation] with some caveats. +Note that this is fully optional and not at all mandatory. +Follow the https://quarkus.io/guides/amazon-s3#configuring-s3-clients[Quarkus documentation] with some caveats. 1. The Apache client type has to be selected by configuring the following property. + @@ -11,12 +11,19 @@ Follow the https://quarkus.io/guides/amazon-s3#configuring-s3-clients[documentat quarkus.s3.sync-client.type=apache ---- -2. The `S3Client` has to be injected somewhere in the application. This triggers its creation so that the Camel component can discover it. +2. The `S3Client` has to be "unremovable" in the sense of https://quarkus.io/guides/cdi-reference#remove_unused_beans[Quarkus CDI reference] so that Camel Quarkus is able to look it up at runtime. +You can reach that e.g. by adding a dummy bean injecting `S3Client`: + [source,java] ---- +import javax.enterprise.context.ApplicationScoped; +import io.quarkus.arc.Unremovable; import software.amazon.awssdk.services.s3.S3Client; -@Inject -S3Client s3Client; +@ApplicationScoped +@Unremovable +class UnremovableS3Client { + @Inject + S3Client s3Client; +} ----
