You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/03/20 14:00:07 UTC

[camel] branch master updated (3f3a465 -> 0ff02c5)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 3f3a465  Merge pull request #3655 from saravanakumar1987/master
     new e53d18a  Camel-AWS2-S3: Removed useless import
     new 1ec7065  CAMEL-14658 - Provide a simpler way to connect to a local s3 instance
     new 8187e58  CAMEL-14658 - Provide a simpler way to connect to a local s3 instance, added test
     new 0ff02c5  CAMEL-14658 - Fixed CS

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../aws2/s3/AWS2S3ComponentConfigurer.java         |   4 +
 .../aws2/s3/AWS2S3EndpointConfigurer.java          |   4 +
 .../apache/camel/component/aws2/s3/aws2-s3.json    |   4 +
 .../src/main/docs/aws2-s3-component.adoc           |   8 +-
 .../camel/component/aws2/s3/AWS2S3Component.java   |   2 +-
 .../component/aws2/s3/AWS2S3Configuration.java     |  37 ++++++-
 .../camel/component/aws2/s3/AWS2S3Endpoint.java    |   7 +-
 .../camel/component/aws2/s3/AWS2S3Producer.java    |  17 +--
 .../client/impl/AWS2S3ClientIAMOptimizedImpl.java  |   3 +
 .../s3/client/impl/AWS2S3ClientStandardImpl.java   |   3 +
 .../aws2/s3/S3ComponentConfigurationTest.java}     |  25 ++---
 .../S3CopyObjectOperationIntegrationTest.java      |   8 +-
 .../S3DeleteBucketOperationIntegrationTest.java    |   8 +-
 .../S3ListObjectsOperationIntegrationTest.java     |  22 ++--
 .../S3MultipartUploadOperationIntegrationTest.java |   6 +-
 .../dsl/Aws2S3ComponentBuilderFactory.java         |  28 +++++
 .../endpoint/dsl/AWS2S3EndpointBuilderFactory.java | 121 +++++++++++++++++++++
 17 files changed, 248 insertions(+), 59 deletions(-)
 copy components/{camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpProducerSiteCommandTest.java => camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/S3ComponentConfigurationTest.java} (57%)


[camel] 03/04: CAMEL-14658 - Provide a simpler way to connect to a local s3 instance, added test

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 8187e58c1fdd1b3f025cbd3231a650b692bd783e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 20 14:45:22 2020 +0100

    CAMEL-14658 - Provide a simpler way to connect to a local s3 instance, added test
---
 .../aws2/s3/S3ComponentConfigurationTest.java      | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/S3ComponentConfigurationTest.java b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/S3ComponentConfigurationTest.java
new file mode 100644
index 0000000..a75a925
--- /dev/null
+++ b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/S3ComponentConfigurationTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.component.aws2.s3;
+
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class S3ComponentConfigurationTest extends CamelTestSupport {
+
+    @Test
+    public void createEndpointWithMinimalConfiguration() throws Exception {
+        AWS2S3Component component = context.getComponent("aws2-s3", AWS2S3Component.class);
+        AWS2S3Endpoint endpoint = (AWS2S3Endpoint)component.createEndpoint("aws2-s3://TestDomain?accessKey=xxx&secretKey=yyy&region=us-west-1&overrideEndpoint=true&uriEndpointOverride=http://localhost:4572");
+        assertTrue(endpoint.getConfiguration().isOverrideEndpoint());
+        assertEquals(endpoint.getConfiguration().getUriEndpointOverride(), "http://localhost:4572");
+    }
+}


[camel] 01/04: Camel-AWS2-S3: Removed useless import

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e53d18a3ba0fe8e17e8aaad8db4391531c227be7
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 20 12:23:21 2020 +0100

    Camel-AWS2-S3: Removed useless import
---
 .../java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java    | 2 --
 1 file changed, 2 deletions(-)

diff --git a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
index 9c562d5..c19daa7 100644
--- a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
+++ b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
@@ -19,10 +19,8 @@ package org.apache.camel.component.aws2.s3;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
-import org.apache.camel.util.ObjectHelper;
 import software.amazon.awssdk.core.Protocol;
 import software.amazon.awssdk.services.s3.S3Client;
-import software.amazon.awssdk.services.s3.model.Encryption;
 
 @UriParams
 public class AWS2S3Configuration implements Cloneable {


[camel] 02/04: CAMEL-14658 - Provide a simpler way to connect to a local s3 instance

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1ec70652d008dbef243ef37dfad0d2ca0dc7ffb0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 20 12:46:49 2020 +0100

    CAMEL-14658 - Provide a simpler way to connect to a local s3 instance
---
 .../aws2/s3/AWS2S3ComponentConfigurer.java         |   4 +
 .../aws2/s3/AWS2S3EndpointConfigurer.java          |   4 +
 .../apache/camel/component/aws2/s3/aws2-s3.json    |   4 +
 .../src/main/docs/aws2-s3-component.adoc           |   8 +-
 .../component/aws2/s3/AWS2S3Configuration.java     |  28 ++++-
 .../client/impl/AWS2S3ClientIAMOptimizedImpl.java  |   3 +
 .../s3/client/impl/AWS2S3ClientStandardImpl.java   |   3 +
 .../dsl/Aws2S3ComponentBuilderFactory.java         |  28 +++++
 .../endpoint/dsl/AWS2S3EndpointBuilderFactory.java | 121 +++++++++++++++++++++
 9 files changed, 200 insertions(+), 3 deletions(-)

diff --git a/components/camel-aws2-s3/src/generated/java/org/apache/camel/component/aws2/s3/AWS2S3ComponentConfigurer.java b/components/camel-aws2-s3/src/generated/java/org/apache/camel/component/aws2/s3/AWS2S3ComponentConfigurer.java
index a22804a..3a1c86a 100644
--- a/components/camel-aws2-s3/src/generated/java/org/apache/camel/component/aws2/s3/AWS2S3ComponentConfigurer.java
+++ b/components/camel-aws2-s3/src/generated/java/org/apache/camel/component/aws2/s3/AWS2S3ComponentConfigurer.java
@@ -53,6 +53,8 @@ public class AWS2S3ComponentConfigurer extends PropertyConfigurerSupport impleme
         case "multipartupload":
         case "multiPartUpload": getOrCreateConfiguration(target).setMultiPartUpload(property(camelContext, boolean.class, value)); return true;
         case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.aws2.s3.AWS2S3Operations.class, value)); return true;
+        case "overrideendpoint":
+        case "overrideEndpoint": getOrCreateConfiguration(target).setOverrideEndpoint(property(camelContext, boolean.class, value)); return true;
         case "partsize":
         case "partSize": getOrCreateConfiguration(target).setPartSize(property(camelContext, long.class, value)); return true;
         case "policy": getOrCreateConfiguration(target).setPolicy(property(camelContext, java.lang.String.class, value)); return true;
@@ -68,6 +70,8 @@ public class AWS2S3ComponentConfigurer extends PropertyConfigurerSupport impleme
         case "secretKey": getOrCreateConfiguration(target).setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         case "storageclass":
         case "storageClass": getOrCreateConfiguration(target).setStorageClass(property(camelContext, java.lang.String.class, value)); return true;
+        case "uriendpointoverride":
+        case "uriEndpointOverride": getOrCreateConfiguration(target).setUriEndpointOverride(property(camelContext, java.lang.String.class, value)); return true;
         case "useawskms":
         case "useAwsKMS": getOrCreateConfiguration(target).setUseAwsKMS(property(camelContext, boolean.class, value)); return true;
         case "useiamcredentials":
diff --git a/components/camel-aws2-s3/src/generated/java/org/apache/camel/component/aws2/s3/AWS2S3EndpointConfigurer.java b/components/camel-aws2-s3/src/generated/java/org/apache/camel/component/aws2/s3/AWS2S3EndpointConfigurer.java
index c6cf978..f62ba82 100644
--- a/components/camel-aws2-s3/src/generated/java/org/apache/camel/component/aws2/s3/AWS2S3EndpointConfigurer.java
+++ b/components/camel-aws2-s3/src/generated/java/org/apache/camel/component/aws2/s3/AWS2S3EndpointConfigurer.java
@@ -63,6 +63,8 @@ public class AWS2S3EndpointConfigurer extends PropertyConfigurerSupport implemen
         case "multipartupload":
         case "multiPartUpload": target.getConfiguration().setMultiPartUpload(property(camelContext, boolean.class, value)); return true;
         case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.aws2.s3.AWS2S3Operations.class, value)); return true;
+        case "overrideendpoint":
+        case "overrideEndpoint": target.getConfiguration().setOverrideEndpoint(property(camelContext, boolean.class, value)); return true;
         case "partsize":
         case "partSize": target.getConfiguration().setPartSize(property(camelContext, long.class, value)); return true;
         case "policy": target.getConfiguration().setPolicy(property(camelContext, java.lang.String.class, value)); return true;
@@ -96,6 +98,8 @@ public class AWS2S3EndpointConfigurer extends PropertyConfigurerSupport implemen
         case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true;
         case "timeunit":
         case "timeUnit": target.setTimeUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true;
+        case "uriendpointoverride":
+        case "uriEndpointOverride": target.getConfiguration().setUriEndpointOverride(property(camelContext, java.lang.String.class, value)); return true;
         case "useawskms":
         case "useAwsKMS": target.getConfiguration().setUseAwsKMS(property(camelContext, boolean.class, value)); return true;
         case "usefixeddelay":
diff --git a/components/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json b/components/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json
index b10f201..d2d8222 100644
--- a/components/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json
+++ b/components/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json
@@ -22,11 +22,13 @@
     "amazonS3Client": { "kind": "property", "displayName": "Amazon S3 Client", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.s3.S3Client", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Reference to a com.amazonaws.services.s3.AmazonS3 in the registry." },
     "autoCreateBucket": { "kind": "property", "displayName": "Auto Create Bucket", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Setting the autocreation of the bucket" },
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "deprecated": false, "secret": false, "description": "The component configuration" },
+    "overrideEndpoint": { "kind": "property", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination with uriEndpointOverride option" },
     "policy": { "kind": "property", "displayName": "Policy", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "The policy for this queue to set in the com.amazonaws.services.s3.AmazonS3#setBucketPolicy() method." },
     "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the SQS client" },
     "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Specify a proxy port to be used inside the client definition." },
     "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the S3 client" },
     "region": { "kind": "property", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "The region in which S3 client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1 [...]
+    "uriEndpointOverride": { "kind": "property", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" },
     "useIAMCredentials": { "kind": "property", "displayName": "Use IAMCredentials", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load credentials on an EC2 instance or to expect static credentials to be  [...]
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by [...]
     "deleteAfterRead": { "kind": "property", "displayName": "Delete After Read", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Delete objects from S3 after they have been retrieved. The delete is only performed if the Exchange is committe [...]
@@ -52,11 +54,13 @@
     "bucketNameOrArn": { "kind": "path", "displayName": "Bucket Name Or Arn", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "description": "Bucket name or ARN" },
     "amazonS3Client": { "kind": "parameter", "displayName": "Amazon S3 Client", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.s3.S3Client", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Reference to a com.amazonaws.services.s3.AmazonS3 in the registry." },
     "autoCreateBucket": { "kind": "parameter", "displayName": "Auto Create Bucket", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Setting the autocreation of the bucket" },
+    "overrideEndpoint": { "kind": "parameter", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination with uriEndpointOverride option" },
     "policy": { "kind": "parameter", "displayName": "Policy", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "The policy for this queue to set in the com.amazonaws.services.s3.AmazonS3#setBucketPolicy() method." },
     "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the SQS client" },
     "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Specify a proxy port to be used inside the client definition." },
     "proxyProtocol": { "kind": "parameter", "displayName": "Proxy Protocol", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the S3 client" },
     "region": { "kind": "parameter", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "The region in which S3 client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east- [...]
+    "uriEndpointOverride": { "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" },
     "useIAMCredentials": { "kind": "parameter", "displayName": "Use IAMCredentials", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load credentials on an EC2 instance or to expect static credentials to be [...]
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled b [...]
     "deleteAfterRead": { "kind": "parameter", "displayName": "Delete After Read", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Delete objects from S3 after they have been retrieved. The delete is only performed if the Exchange is committ [...]
diff --git a/components/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc b/components/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
index dd5c2b8..09c7362 100644
--- a/components/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
+++ b/components/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
@@ -43,7 +43,7 @@ from("aws2-s3://helloBucket?accessKey=yourAccessKey&secretKey=yourSecretKey&pref
 
 
 // component options: START
-The AWS2 S3 Storage Service component supports 28 options, which are listed below.
+The AWS2 S3 Storage Service component supports 30 options, which are listed below.
 
 
 
@@ -53,11 +53,13 @@ The AWS2 S3 Storage Service component supports 28 options, which are listed belo
 | *amazonS3Client* (common) | Reference to a com.amazonaws.services.s3.AmazonS3 in the registry. |  | S3Client
 | *autoCreateBucket* (common) | Setting the autocreation of the bucket | true | boolean
 | *configuration* (common) | The component configuration |  | AWS2S3Configuration
+| *overrideEndpoint* (common) | Set the need for overidding the endpoint. This option needs to be used in combination with uriEndpointOverride option | false | boolean
 | *policy* (common) | The policy for this queue to set in the com.amazonaws.services.s3.AmazonS3#setBucketPolicy() method. |  | String
 | *proxyHost* (common) | To define a proxy host when instantiating the SQS client |  | String
 | *proxyPort* (common) | Specify a proxy port to be used inside the client definition. |  | Integer
 | *proxyProtocol* (common) | To define a proxy protocol when instantiating the S3 client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *region* (common) | The region in which S3 client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() |  | String
+| *uriEndpointOverride* (common) | Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option |  | String
 | *useIAMCredentials* (common) | Set whether the S3 client should expect to load credentials on an EC2 instance or to expect static credentials to be passed in. | false | boolean
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
 | *deleteAfterRead* (consumer) | Delete objects from S3 after they have been retrieved. The delete is only performed if the Exchange is committed. If a rollback occurs, the object is not deleted. If this option is false, then the same objects will be retrieve over and over again on the polls. Therefore you need to use the Idempotent Consumer EIP in the route to filter out duplicates. You can filter using the AWS2S3Constants#BUCKET_NAME and AWS2S3Constants#KEY headers, or only the AWS2S3C [...]
@@ -110,7 +112,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (48 parameters):
+=== Query Parameters (50 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -118,11 +120,13 @@ with the following path and query parameters:
 | Name | Description | Default | Type
 | *amazonS3Client* (common) | Reference to a com.amazonaws.services.s3.AmazonS3 in the registry. |  | S3Client
 | *autoCreateBucket* (common) | Setting the autocreation of the bucket | true | boolean
+| *overrideEndpoint* (common) | Set the need for overidding the endpoint. This option needs to be used in combination with uriEndpointOverride option | false | boolean
 | *policy* (common) | The policy for this queue to set in the com.amazonaws.services.s3.AmazonS3#setBucketPolicy() method. |  | String
 | *proxyHost* (common) | To define a proxy host when instantiating the SQS client |  | String
 | *proxyPort* (common) | Specify a proxy port to be used inside the client definition. |  | Integer
 | *proxyProtocol* (common) | To define a proxy protocol when instantiating the S3 client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *region* (common) | The region in which S3 client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() |  | String
+| *uriEndpointOverride* (common) | Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option |  | String
 | *useIAMCredentials* (common) | Set whether the S3 client should expect to load credentials on an EC2 instance or to expect static credentials to be passed in. | false | boolean
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
 | *deleteAfterRead* (consumer) | Delete objects from S3 after they have been retrieved. The delete is only performed if the Exchange is committed. If a rollback occurs, the object is not deleted. If this option is false, then the same objects will be retrieve over and over again on the polls. Therefore you need to use the Idempotent Consumer EIP in the route to filter out duplicates. You can filter using the AWS2S3Constants#BUCKET_NAME and AWS2S3Constants#KEY headers, or only the AWS2S3C [...]
diff --git a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
index c19daa7..f36aeab 100644
--- a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
+++ b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
@@ -75,6 +75,10 @@ public class AWS2S3Configuration implements Cloneable {
     private boolean useIAMCredentials;
     @UriParam(label = "producer")
     private String keyName;
+    @UriParam(defaultValue = "false")
+    private boolean overrideEndpoint;
+    @UriParam
+    private String uriEndpointOverride;
 
     public long getPartSize() {
         return partSize;
@@ -383,12 +387,34 @@ public class AWS2S3Configuration implements Cloneable {
     public void setKeyName(String keyName) {
         this.keyName = keyName;
     }
+    
+    public boolean isOverrideEndpoint() {
+		return overrideEndpoint;
+	}
+
+    /**
+     * Set the need for overidding the endpoint. This option needs to be used in combination with uriEndpointOverride option
+     */
+	public void setOverrideEndpoint(boolean overrideEndpoint) {
+		this.overrideEndpoint = overrideEndpoint;
+	}
+
+	public String getUriEndpointOverride() {
+		return uriEndpointOverride;
+	}
+
+    /**
+     * Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option
+     */
+	public void setUriEndpointOverride(String uriEndpointOverride) {
+		this.uriEndpointOverride = uriEndpointOverride;
+	}
 
     // *************************************************
     //
     // *************************************************
 
-    public AWS2S3Configuration copy() {
+	public AWS2S3Configuration copy() {
         try {
             return (AWS2S3Configuration)super.clone();
         } catch (CloneNotSupportedException e) {
diff --git a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientIAMOptimizedImpl.java b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientIAMOptimizedImpl.java
index e7dbd04..ab7c308 100644
--- a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientIAMOptimizedImpl.java
+++ b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientIAMOptimizedImpl.java
@@ -81,6 +81,9 @@ public class AWS2S3ClientIAMOptimizedImpl implements AWS2CamelS3InternalClient {
         if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
             clientBuilder = clientBuilder.region(Region.of(configuration.getRegion()));
         }
+        if (configuration.isOverrideEndpoint()) {
+        	clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
+        }
         client = clientBuilder.build();
         return client;
     }
diff --git a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientStandardImpl.java b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientStandardImpl.java
index 006d170..433009e 100644
--- a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientStandardImpl.java
+++ b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientStandardImpl.java
@@ -81,6 +81,9 @@ public class AWS2S3ClientStandardImpl implements AWS2CamelS3InternalClient {
         if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
             clientBuilder = clientBuilder.region(Region.of(configuration.getRegion()));
         }
+        if (configuration.isOverrideEndpoint()) {
+        	clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
+        }
         client = clientBuilder.build();
         return client;
     }
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2S3ComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2S3ComponentBuilderFactory.java
index 78cad4c..155c5a5 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2S3ComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2S3ComponentBuilderFactory.java
@@ -90,6 +90,19 @@ public interface Aws2S3ComponentBuilderFactory {
             return this;
         }
         /**
+         * Set the need for overidding the endpoint. This option needs to be
+         * used in combination with uriEndpointOverride option.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default Aws2S3ComponentBuilder overrideEndpoint(boolean overrideEndpoint) {
+            doSetProperty("overrideEndpoint", overrideEndpoint);
+            return this;
+        }
+        /**
          * The policy for this queue to set in the
          * com.amazonaws.services.s3.AmazonS3#setBucketPolicy() method.
          * 
@@ -152,6 +165,19 @@ public interface Aws2S3ComponentBuilderFactory {
             return this;
         }
         /**
+         * Set the overriding uri endpoint. This option needs to be used in
+         * combination with overrideEndpoint option.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: common
+         */
+        default Aws2S3ComponentBuilder uriEndpointOverride(
+                java.lang.String uriEndpointOverride) {
+            doSetProperty("uriEndpointOverride", uriEndpointOverride);
+            return this;
+        }
+        /**
          * Set whether the S3 client should expect to load credentials on an EC2
          * instance or to expect static credentials to be passed in.
          * 
@@ -459,11 +485,13 @@ public interface Aws2S3ComponentBuilderFactory {
             case "amazonS3Client": getOrCreateConfiguration((AWS2S3Component) component).setAmazonS3Client((software.amazon.awssdk.services.s3.S3Client) value); return true;
             case "autoCreateBucket": getOrCreateConfiguration((AWS2S3Component) component).setAutoCreateBucket((boolean) value); return true;
             case "configuration": ((AWS2S3Component) component).setConfiguration((org.apache.camel.component.aws2.s3.AWS2S3Configuration) value); return true;
+            case "overrideEndpoint": getOrCreateConfiguration((AWS2S3Component) component).setOverrideEndpoint((boolean) value); return true;
             case "policy": getOrCreateConfiguration((AWS2S3Component) component).setPolicy((java.lang.String) value); return true;
             case "proxyHost": getOrCreateConfiguration((AWS2S3Component) component).setProxyHost((java.lang.String) value); return true;
             case "proxyPort": getOrCreateConfiguration((AWS2S3Component) component).setProxyPort((java.lang.Integer) value); return true;
             case "proxyProtocol": getOrCreateConfiguration((AWS2S3Component) component).setProxyProtocol((software.amazon.awssdk.core.Protocol) value); return true;
             case "region": getOrCreateConfiguration((AWS2S3Component) component).setRegion((java.lang.String) value); return true;
+            case "uriEndpointOverride": getOrCreateConfiguration((AWS2S3Component) component).setUriEndpointOverride((java.lang.String) value); return true;
             case "useIAMCredentials": getOrCreateConfiguration((AWS2S3Component) component).setUseIAMCredentials((boolean) value); return true;
             case "bridgeErrorHandler": ((AWS2S3Component) component).setBridgeErrorHandler((boolean) value); return true;
             case "deleteAfterRead": getOrCreateConfiguration((AWS2S3Component) component).setDeleteAfterRead((boolean) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java
index 73fd21c..ed80e50 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java
@@ -100,6 +100,34 @@ public interface AWS2S3EndpointBuilderFactory {
             return this;
         }
         /**
+         * Set the need for overidding the endpoint. This option needs to be
+         * used in combination with uriEndpointOverride option.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default AWS2S3EndpointConsumerBuilder overrideEndpoint(
+                boolean overrideEndpoint) {
+            doSetProperty("overrideEndpoint", overrideEndpoint);
+            return this;
+        }
+        /**
+         * Set the need for overidding the endpoint. This option needs to be
+         * used in combination with uriEndpointOverride option.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default AWS2S3EndpointConsumerBuilder overrideEndpoint(
+                String overrideEndpoint) {
+            doSetProperty("overrideEndpoint", overrideEndpoint);
+            return this;
+        }
+        /**
          * The policy for this queue to set in the
          * com.amazonaws.services.s3.AmazonS3#setBucketPolicy() method.
          * 
@@ -187,6 +215,19 @@ public interface AWS2S3EndpointBuilderFactory {
             return this;
         }
         /**
+         * Set the overriding uri endpoint. This option needs to be used in
+         * combination with overrideEndpoint option.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: common
+         */
+        default AWS2S3EndpointConsumerBuilder uriEndpointOverride(
+                String uriEndpointOverride) {
+            doSetProperty("uriEndpointOverride", uriEndpointOverride);
+            return this;
+        }
+        /**
          * Set whether the S3 client should expect to load credentials on an EC2
          * instance or to expect static credentials to be passed in.
          * 
@@ -1096,6 +1137,34 @@ public interface AWS2S3EndpointBuilderFactory {
             return this;
         }
         /**
+         * Set the need for overidding the endpoint. This option needs to be
+         * used in combination with uriEndpointOverride option.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default AWS2S3EndpointProducerBuilder overrideEndpoint(
+                boolean overrideEndpoint) {
+            doSetProperty("overrideEndpoint", overrideEndpoint);
+            return this;
+        }
+        /**
+         * Set the need for overidding the endpoint. This option needs to be
+         * used in combination with uriEndpointOverride option.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default AWS2S3EndpointProducerBuilder overrideEndpoint(
+                String overrideEndpoint) {
+            doSetProperty("overrideEndpoint", overrideEndpoint);
+            return this;
+        }
+        /**
          * The policy for this queue to set in the
          * com.amazonaws.services.s3.AmazonS3#setBucketPolicy() method.
          * 
@@ -1183,6 +1252,19 @@ public interface AWS2S3EndpointBuilderFactory {
             return this;
         }
         /**
+         * Set the overriding uri endpoint. This option needs to be used in
+         * combination with overrideEndpoint option.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: common
+         */
+        default AWS2S3EndpointProducerBuilder uriEndpointOverride(
+                String uriEndpointOverride) {
+            doSetProperty("uriEndpointOverride", uriEndpointOverride);
+            return this;
+        }
+        /**
          * Set whether the S3 client should expect to load credentials on an EC2
          * instance or to expect static credentials to be passed in.
          * 
@@ -1571,6 +1653,32 @@ public interface AWS2S3EndpointBuilderFactory {
             return this;
         }
         /**
+         * Set the need for overidding the endpoint. This option needs to be
+         * used in combination with uriEndpointOverride option.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default AWS2S3EndpointBuilder overrideEndpoint(boolean overrideEndpoint) {
+            doSetProperty("overrideEndpoint", overrideEndpoint);
+            return this;
+        }
+        /**
+         * Set the need for overidding the endpoint. This option needs to be
+         * used in combination with uriEndpointOverride option.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: common
+         */
+        default AWS2S3EndpointBuilder overrideEndpoint(String overrideEndpoint) {
+            doSetProperty("overrideEndpoint", overrideEndpoint);
+            return this;
+        }
+        /**
          * The policy for this queue to set in the
          * com.amazonaws.services.s3.AmazonS3#setBucketPolicy() method.
          * 
@@ -1657,6 +1765,19 @@ public interface AWS2S3EndpointBuilderFactory {
             return this;
         }
         /**
+         * Set the overriding uri endpoint. This option needs to be used in
+         * combination with overrideEndpoint option.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: common
+         */
+        default AWS2S3EndpointBuilder uriEndpointOverride(
+                String uriEndpointOverride) {
+            doSetProperty("uriEndpointOverride", uriEndpointOverride);
+            return this;
+        }
+        /**
          * Set whether the S3 client should expect to load credentials on an EC2
          * instance or to expect static credentials to be passed in.
          * 


[camel] 04/04: CAMEL-14658 - Fixed CS

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 0ff02c5f42137af2e5dcacee4a428dc5a34ab708
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 20 14:52:51 2020 +0100

    CAMEL-14658 - Fixed CS
---
 .../camel/component/aws2/s3/AWS2S3Component.java   |  2 +-
 .../component/aws2/s3/AWS2S3Configuration.java     | 39 +++++++++++-----------
 .../camel/component/aws2/s3/AWS2S3Endpoint.java    |  7 ++--
 .../camel/component/aws2/s3/AWS2S3Producer.java    | 17 +++++-----
 .../client/impl/AWS2S3ClientIAMOptimizedImpl.java  |  2 +-
 .../s3/client/impl/AWS2S3ClientStandardImpl.java   |  2 +-
 .../aws2/s3/S3ComponentConfigurationTest.java      |  3 +-
 .../S3CopyObjectOperationIntegrationTest.java      |  8 ++---
 .../S3DeleteBucketOperationIntegrationTest.java    |  8 ++---
 .../S3ListObjectsOperationIntegrationTest.java     | 22 ++++++------
 .../S3MultipartUploadOperationIntegrationTest.java |  6 ++--
 11 files changed, 59 insertions(+), 57 deletions(-)

diff --git a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Component.java b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Component.java
index a6cdbac..d01e76c 100644
--- a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Component.java
+++ b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Component.java
@@ -31,7 +31,7 @@ import software.amazon.awssdk.services.s3.S3Client;
 
 @Component("aws2-s3")
 public class AWS2S3Component extends DefaultComponent {
-    
+
     private static final Logger LOG = LoggerFactory.getLogger(AWS2S3Component.class);
 
     @Metadata
diff --git a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
index f36aeab..6ecb0a1 100644
--- a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
+++ b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
@@ -191,10 +191,9 @@ public class AWS2S3Configuration implements Cloneable {
     }
 
     /**
-     * The region in which S3 client needs to work. When using this
-     * parameter, the configuration will expect the lowercase name of the
-     * region (for example ap-east-1) You'll need to use the name
-     * Region.EU_WEST_1.id()
+     * The region in which S3 client needs to work. When using this parameter,
+     * the configuration will expect the lowercase name of the region (for
+     * example ap-east-1) You'll need to use the name Region.EU_WEST_1.id()
      */
     public void setRegion(String region) {
         this.region = region;
@@ -387,34 +386,36 @@ public class AWS2S3Configuration implements Cloneable {
     public void setKeyName(String keyName) {
         this.keyName = keyName;
     }
-    
+
     public boolean isOverrideEndpoint() {
-		return overrideEndpoint;
-	}
+        return overrideEndpoint;
+    }
 
     /**
-     * Set the need for overidding the endpoint. This option needs to be used in combination with uriEndpointOverride option
+     * Set the need for overidding the endpoint. This option needs to be used in
+     * combination with uriEndpointOverride option
      */
-	public void setOverrideEndpoint(boolean overrideEndpoint) {
-		this.overrideEndpoint = overrideEndpoint;
-	}
+    public void setOverrideEndpoint(boolean overrideEndpoint) {
+        this.overrideEndpoint = overrideEndpoint;
+    }
 
-	public String getUriEndpointOverride() {
-		return uriEndpointOverride;
-	}
+    public String getUriEndpointOverride() {
+        return uriEndpointOverride;
+    }
 
     /**
-     * Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option
+     * Set the overriding uri endpoint. This option needs to be used in
+     * combination with overrideEndpoint option
      */
-	public void setUriEndpointOverride(String uriEndpointOverride) {
-		this.uriEndpointOverride = uriEndpointOverride;
-	}
+    public void setUriEndpointOverride(String uriEndpointOverride) {
+        this.uriEndpointOverride = uriEndpointOverride;
+    }
 
     // *************************************************
     //
     // *************************************************
 
-	public AWS2S3Configuration copy() {
+    public AWS2S3Configuration copy() {
         try {
             return (AWS2S3Configuration)super.clone();
         } catch (CloneNotSupportedException e) {
diff --git a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Endpoint.java b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Endpoint.java
index ec5a17b..b3ee73c 100644
--- a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Endpoint.java
+++ b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Endpoint.java
@@ -51,8 +51,8 @@ import software.amazon.awssdk.services.s3.model.ListObjectsRequest;
 import software.amazon.awssdk.services.s3.model.PutBucketPolicyRequest;
 
 /**
- * The aws2-s3 component is used for storing and retrieving object from Amazon S3
- * Storage Service.
+ * The aws2-s3 component is used for storing and retrieving object from Amazon
+ * S3 Storage Service.
  */
 @UriEndpoint(firstVersion = "3.2.0", scheme = "aws2-s3", title = "AWS2 S3 Storage Service", syntax = "aws2-s3://bucketNameOrArn", label = "cloud,file")
 public class AWS2S3Endpoint extends ScheduledPollEndpoint {
@@ -93,8 +93,7 @@ public class AWS2S3Endpoint extends ScheduledPollEndpoint {
     public void doStart() throws Exception {
         super.doStart();
 
-        s3Client = configuration.getAmazonS3Client() != null
-            ? configuration.getAmazonS3Client() : AWS2S3ClientFactory.getAWSS3Client(configuration).getS3Client();
+        s3Client = configuration.getAmazonS3Client() != null ? configuration.getAmazonS3Client() : AWS2S3ClientFactory.getAWSS3Client(configuration).getS3Client();
 
         String fileName = getConfiguration().getFileName();
 
diff --git a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
index 3f05e19..de0e7d2 100644
--- a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
+++ b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
@@ -117,7 +117,7 @@ public class AWS2S3Producer extends DefaultProducer {
             }
         }
     }
-    
+
     public void processMultiPart(final Exchange exchange) throws Exception {
         File filePayload = null;
         Object obj = exchange.getIn().getMandatoryBody();
@@ -141,8 +141,7 @@ public class AWS2S3Producer extends DefaultProducer {
         }
 
         final String keyName = determineKey(exchange);
-        CreateMultipartUploadRequest.Builder createMultipartUploadRequest = CreateMultipartUploadRequest.builder()
-            .bucket(getConfiguration().getBucketName()).key(keyName);
+        CreateMultipartUploadRequest.Builder createMultipartUploadRequest = CreateMultipartUploadRequest.builder().bucket(getConfiguration().getBucketName()).key(keyName);
 
         String storageClass = determineStorageClass(exchange);
         if (storageClass != null) {
@@ -182,8 +181,8 @@ public class AWS2S3Producer extends DefaultProducer {
             for (int part = 1; filePosition < contentLength; part++) {
                 partSize = Math.min(partSize, contentLength - filePosition);
 
-                UploadPartRequest uploadRequest = UploadPartRequest.builder().bucket(getConfiguration().getBucketName()).key(keyName)
-                        .uploadId(initResponse.uploadId()).partNumber(part).build();
+                UploadPartRequest uploadRequest = UploadPartRequest.builder().bucket(getConfiguration().getBucketName()).key(keyName).uploadId(initResponse.uploadId())
+                    .partNumber(part).build();
 
                 LOG.trace("Uploading part [{}] for {}", part, keyName);
                 String etag = getEndpoint().getS3Client().uploadPart(uploadRequest, RequestBody.fromFile(filePayload)).eTag();
@@ -193,12 +192,14 @@ public class AWS2S3Producer extends DefaultProducer {
                 filePosition += partSize;
             }
             CompletedMultipartUpload completeMultipartUpload = CompletedMultipartUpload.builder().parts(completedParts).build();
-            CompleteMultipartUploadRequest compRequest = CompleteMultipartUploadRequest.builder().multipartUpload(completeMultipartUpload).bucket(getConfiguration().getBucketName()).key(keyName).uploadId(initResponse.uploadId()).build();
+            CompleteMultipartUploadRequest compRequest = CompleteMultipartUploadRequest.builder().multipartUpload(completeMultipartUpload)
+                .bucket(getConfiguration().getBucketName()).key(keyName).uploadId(initResponse.uploadId()).build();
 
             uploadResult = getEndpoint().getS3Client().completeMultipartUpload(compRequest);
 
         } catch (Exception e) {
-            getEndpoint().getS3Client().abortMultipartUpload(AbortMultipartUploadRequest.builder().bucket(getConfiguration().getBucketName()).key(keyName).uploadId(initResponse.uploadId()).build());
+            getEndpoint().getS3Client()
+                .abortMultipartUpload(AbortMultipartUploadRequest.builder().bucket(getConfiguration().getBucketName()).key(keyName).uploadId(initResponse.uploadId()).build());
             throw e;
         }
 
@@ -345,7 +346,7 @@ public class AWS2S3Producer extends DefaultProducer {
 
         DeleteBucketRequest.Builder deleteBucketRequest = DeleteBucketRequest.builder().bucket(bucketName);
         DeleteBucketResponse resp = s3Client.deleteBucket(deleteBucketRequest.build());
-        
+
         Message message = getMessageForResponse(exchange);
         message.setBody(resp);
     }
diff --git a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientIAMOptimizedImpl.java b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientIAMOptimizedImpl.java
index ab7c308..0139d9b 100644
--- a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientIAMOptimizedImpl.java
+++ b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientIAMOptimizedImpl.java
@@ -82,7 +82,7 @@ public class AWS2S3ClientIAMOptimizedImpl implements AWS2CamelS3InternalClient {
             clientBuilder = clientBuilder.region(Region.of(configuration.getRegion()));
         }
         if (configuration.isOverrideEndpoint()) {
-        	clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
+            clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
         }
         client = clientBuilder.build();
         return client;
diff --git a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientStandardImpl.java b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientStandardImpl.java
index 433009e..2652311 100644
--- a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientStandardImpl.java
+++ b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientStandardImpl.java
@@ -82,7 +82,7 @@ public class AWS2S3ClientStandardImpl implements AWS2CamelS3InternalClient {
             clientBuilder = clientBuilder.region(Region.of(configuration.getRegion()));
         }
         if (configuration.isOverrideEndpoint()) {
-        	clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
+            clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
         }
         client = clientBuilder.build();
         return client;
diff --git a/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/S3ComponentConfigurationTest.java b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/S3ComponentConfigurationTest.java
index a75a925..1016153 100644
--- a/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/S3ComponentConfigurationTest.java
+++ b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/S3ComponentConfigurationTest.java
@@ -27,7 +27,8 @@ public class S3ComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithMinimalConfiguration() throws Exception {
         AWS2S3Component component = context.getComponent("aws2-s3", AWS2S3Component.class);
-        AWS2S3Endpoint endpoint = (AWS2S3Endpoint)component.createEndpoint("aws2-s3://TestDomain?accessKey=xxx&secretKey=yyy&region=us-west-1&overrideEndpoint=true&uriEndpointOverride=http://localhost:4572");
+        AWS2S3Endpoint endpoint = (AWS2S3Endpoint)component
+            .createEndpoint("aws2-s3://TestDomain?accessKey=xxx&secretKey=yyy&region=us-west-1&overrideEndpoint=true&uriEndpointOverride=http://localhost:4572");
         assertTrue(endpoint.getConfiguration().isOverrideEndpoint());
         assertEquals(endpoint.getConfiguration().getUriEndpointOverride(), "http://localhost:4572");
     }
diff --git a/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3CopyObjectOperationIntegrationTest.java b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3CopyObjectOperationIntegrationTest.java
index a2a35ec..b02c867 100644
--- a/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3CopyObjectOperationIntegrationTest.java
+++ b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3CopyObjectOperationIntegrationTest.java
@@ -38,7 +38,7 @@ public class S3CopyObjectOperationIntegrationTest extends CamelTestSupport {
 
     @BindToRegistry("amazonS3Client")
     S3Client client = S3Client.builder().credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create("xxx", "yyy"))).region(Region.EU_WEST_1).build();
-    
+
     @EndpointInject
     private ProducerTemplate template;
 
@@ -68,7 +68,7 @@ public class S3CopyObjectOperationIntegrationTest extends CamelTestSupport {
                 exchange.getIn().setHeader(AWS2S3Constants.S3_OPERATION, AWS2S3Operations.copyObject);
             }
         });
-        
+
         assertMockEndpointsSatisfied();
     }
 
@@ -78,9 +78,9 @@ public class S3CopyObjectOperationIntegrationTest extends CamelTestSupport {
             @Override
             public void configure() throws Exception {
                 String awsEndpoint = "aws2-s3://mycamel?autoCreateBucket=false";
-              
+
                 from("direct:putObject").to(awsEndpoint);
-                
+
                 from("direct:copyObject").to(awsEndpoint).to("mock:result");
 
             }
diff --git a/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3DeleteBucketOperationIntegrationTest.java b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3DeleteBucketOperationIntegrationTest.java
index 21cf940..c13be62 100644
--- a/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3DeleteBucketOperationIntegrationTest.java
+++ b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3DeleteBucketOperationIntegrationTest.java
@@ -38,7 +38,7 @@ public class S3DeleteBucketOperationIntegrationTest extends CamelTestSupport {
 
     @BindToRegistry("amazonS3Client")
     S3Client client = S3Client.builder().credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create("xxx", "yyy"))).region(Region.EU_WEST_1).build();
-    
+
     @EndpointInject
     private ProducerTemplate template;
 
@@ -65,7 +65,7 @@ public class S3DeleteBucketOperationIntegrationTest extends CamelTestSupport {
                 exchange.getIn().setHeader(AWS2S3Constants.S3_OPERATION, AWS2S3Operations.deleteBucket);
             }
         });
-        
+
         assertMockEndpointsSatisfied();
     }
 
@@ -75,9 +75,9 @@ public class S3DeleteBucketOperationIntegrationTest extends CamelTestSupport {
             @Override
             public void configure() throws Exception {
                 String awsEndpoint = "aws2-s3://mycamel2?autoCreateBucket=true";
-              
+
                 from("direct:listBucket").to(awsEndpoint);
-                
+
                 from("direct:deleteBucket").to(awsEndpoint).to("mock:result");
 
             }
diff --git a/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3ListObjectsOperationIntegrationTest.java b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3ListObjectsOperationIntegrationTest.java
index 63824ba..1864486 100644
--- a/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3ListObjectsOperationIntegrationTest.java
+++ b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3ListObjectsOperationIntegrationTest.java
@@ -44,7 +44,7 @@ public class S3ListObjectsOperationIntegrationTest extends CamelTestSupport {
 
     @BindToRegistry("amazonS3Client")
     S3Client client = S3Client.builder().credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create("xxx", "yyy"))).region(Region.EU_WEST_1).build();
-    
+
     @EndpointInject
     private ProducerTemplate template;
 
@@ -63,7 +63,7 @@ public class S3ListObjectsOperationIntegrationTest extends CamelTestSupport {
                 exchange.getIn().setHeader(AWS2S3Constants.S3_OPERATION, AWS2S3Operations.listBuckets);
             }
         });
-        
+
         template.send("direct:addObject", ExchangePattern.InOnly, new Processor() {
             public void process(Exchange exchange) throws Exception {
                 exchange.getIn().setHeader(AWS2S3Constants.KEY, "CamelUnitTest2");
@@ -71,7 +71,7 @@ public class S3ListObjectsOperationIntegrationTest extends CamelTestSupport {
                 exchange.getIn().removeHeader(AWS2S3Constants.S3_OPERATION);
             }
         });
-        
+
         Exchange ex = template.request("direct:listObjects", new Processor() {
 
             @Override
@@ -80,11 +80,11 @@ public class S3ListObjectsOperationIntegrationTest extends CamelTestSupport {
                 exchange.getIn().setHeader(AWS2S3Constants.S3_OPERATION, AWS2S3Operations.listObjects);
             }
         });
-        
+
         List<S3Object> resp = ex.getMessage().getBody(List.class);
         assertEquals(1, resp.size());
         assertEquals("CamelUnitTest2", resp.get(0).key());
-        
+
         template.send("direct:deleteObject", ExchangePattern.InOnly, new Processor() {
             public void process(Exchange exchange) throws Exception {
                 exchange.getIn().setHeader(AWS2S3Constants.KEY, "CamelUnitTest2");
@@ -101,7 +101,7 @@ public class S3ListObjectsOperationIntegrationTest extends CamelTestSupport {
                 exchange.getIn().setHeader(AWS2S3Constants.S3_OPERATION, AWS2S3Operations.deleteBucket);
             }
         });
-        
+
         assertMockEndpointsSatisfied();
     }
 
@@ -111,15 +111,15 @@ public class S3ListObjectsOperationIntegrationTest extends CamelTestSupport {
             @Override
             public void configure() throws Exception {
                 String awsEndpoint = "aws2-s3://mycamel2?autoCreateBucket=true";
-              
+
                 from("direct:listBucket").to(awsEndpoint);
-                
+
                 from("direct:addObject").to(awsEndpoint);
-                
+
                 from("direct:deleteObject").to(awsEndpoint);
-                
+
                 from("direct:listObjects").to(awsEndpoint);
-                
+
                 from("direct:deleteBucket").to(awsEndpoint).to("mock:result");
 
             }
diff --git a/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3MultipartUploadOperationIntegrationTest.java b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3MultipartUploadOperationIntegrationTest.java
index 87aa7fe..a2c9676 100644
--- a/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3MultipartUploadOperationIntegrationTest.java
+++ b/components/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3MultipartUploadOperationIntegrationTest.java
@@ -39,7 +39,7 @@ public class S3MultipartUploadOperationIntegrationTest extends CamelTestSupport
 
     @BindToRegistry("amazonS3Client")
     S3Client client = S3Client.builder().credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create("xxx", "yyy"))).region(Region.EU_WEST_1).build();
-    
+
     @EndpointInject
     private ProducerTemplate template;
 
@@ -58,7 +58,7 @@ public class S3MultipartUploadOperationIntegrationTest extends CamelTestSupport
                 exchange.getIn().setBody(new File("src/test/resources/empty.txt"));
             }
         });
-        
+
         assertMockEndpointsSatisfied();
     }
 
@@ -68,7 +68,7 @@ public class S3MultipartUploadOperationIntegrationTest extends CamelTestSupport
             @Override
             public void configure() throws Exception {
                 String awsEndpoint = "aws2-s3://mycamel?multiPartUpload=true&autoCreateBucket=false&partSize=1048576";
-              
+
                 from("direct:putObject").to(awsEndpoint).to("mock:result");
 
             }