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 2019/12/23 11:33:01 UTC

[camel-quarkus] 01/01: AWS support: Leverage Quarkus-jackson instead of using Jackson stuff in each extension

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

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

commit 7ad77716d58a178183fe419ed81f71a0ff03d416
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 23 12:32:37 2019 +0100

    AWS support: Leverage Quarkus-jackson instead of using Jackson stuff in each extension
---
 .../quarkus/component/aws/ec2/deployment/AwsEc2Processor.java     | 8 --------
 extensions/aws-ec2/runtime/pom.xml                                | 8 --------
 .../quarkus/component/aws/ecs/deployment/AwsEcsProcessor.java     | 8 --------
 extensions/aws-ecs/runtime/pom.xml                                | 8 --------
 .../quarkus/component/aws/eks/deployment/AwsEKSProcessor.java     | 8 --------
 extensions/aws-eks/runtime/pom.xml                                | 8 --------
 .../quarkus/component/aws/iam/deployment/AwsIamProcessor.java     | 8 --------
 extensions/aws-iam/runtime/pom.xml                                | 8 --------
 .../quarkus/component/aws/kms/deployment/AwsKmsProcessor.java     | 8 --------
 extensions/aws-kms/runtime/pom.xml                                | 8 --------
 .../camel/quarkus/component/aws/s3/deployment/AwsS3Processor.java | 8 --------
 extensions/aws-s3/runtime/pom.xml                                 | 8 --------
 .../quarkus/component/aws/sns/deployment/AwsSNSProcessor.java     | 8 --------
 extensions/aws-sns/runtime/pom.xml                                | 8 --------
 .../quarkus/component/aws/sqs/deployment/AwsSQSProcessor.java     | 8 --------
 extensions/aws-sqs/runtime/pom.xml                                | 8 --------
 extensions/support/aws/runtime/pom.xml                            | 8 ++++++++
 17 files changed, 8 insertions(+), 128 deletions(-)

diff --git a/extensions/aws-ec2/deployment/src/main/java/org/apache/camel/quarkus/component/aws/ec2/deployment/AwsEc2Processor.java b/extensions/aws-ec2/deployment/src/main/java/org/apache/camel/quarkus/component/aws/ec2/deployment/AwsEc2Processor.java
index b39f013..8f36127 100644
--- a/extensions/aws-ec2/deployment/src/main/java/org/apache/camel/quarkus/component/aws/ec2/deployment/AwsEc2Processor.java
+++ b/extensions/aws-ec2/deployment/src/main/java/org/apache/camel/quarkus/component/aws/ec2/deployment/AwsEc2Processor.java
@@ -30,8 +30,6 @@ import com.amazonaws.partitions.model.Partition;
 import com.amazonaws.partitions.model.Partitions;
 import com.amazonaws.partitions.model.Region;
 import com.amazonaws.partitions.model.Service;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
 
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
@@ -65,12 +63,6 @@ class AwsEc2Processor {
         IndexView view = combinedIndexBuildItem.getIndex();
 
         resource.produce(new NativeImageResourceBuildItem("com/amazonaws/partitions/endpoints.json"));
-        for (String s : getImplementations(view, JsonDeserializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
-        for (String s : getImplementations(view, JsonSerializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
         reflectiveClass.produce(new ReflectiveClassBuildItem(true, false,
                 Partitions.class.getCanonicalName(),
                 Partition.class.getCanonicalName(),
diff --git a/extensions/aws-ec2/runtime/pom.xml b/extensions/aws-ec2/runtime/pom.xml
index 81ba1f7..3cc6abc 100644
--- a/extensions/aws-ec2/runtime/pom.xml
+++ b/extensions/aws-ec2/runtime/pom.xml
@@ -82,14 +82,6 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.dataformat</groupId>
-            <artifactId>jackson-dataformat-cbor</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/extensions/aws-ecs/deployment/src/main/java/org/apache/camel/quarkus/component/aws/ecs/deployment/AwsEcsProcessor.java b/extensions/aws-ecs/deployment/src/main/java/org/apache/camel/quarkus/component/aws/ecs/deployment/AwsEcsProcessor.java
index d345470..293c0f5 100644
--- a/extensions/aws-ecs/deployment/src/main/java/org/apache/camel/quarkus/component/aws/ecs/deployment/AwsEcsProcessor.java
+++ b/extensions/aws-ecs/deployment/src/main/java/org/apache/camel/quarkus/component/aws/ecs/deployment/AwsEcsProcessor.java
@@ -30,8 +30,6 @@ import com.amazonaws.partitions.model.Partition;
 import com.amazonaws.partitions.model.Partitions;
 import com.amazonaws.partitions.model.Region;
 import com.amazonaws.partitions.model.Service;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
 
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
@@ -66,12 +64,6 @@ class AwsEcsProcessor {
         IndexView view = combinedIndexBuildItem.getIndex();
 
         resource.produce(new NativeImageResourceBuildItem("com/amazonaws/partitions/endpoints.json"));
-        for (String s : getImplementations(view, JsonDeserializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
-        for (String s : getImplementations(view, JsonSerializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
         reflectiveClass.produce(new ReflectiveClassBuildItem(true, false,
                 Partitions.class.getCanonicalName(),
                 Partition.class.getCanonicalName(),
diff --git a/extensions/aws-ecs/runtime/pom.xml b/extensions/aws-ecs/runtime/pom.xml
index 92ecca5..91a926f 100644
--- a/extensions/aws-ecs/runtime/pom.xml
+++ b/extensions/aws-ecs/runtime/pom.xml
@@ -80,14 +80,6 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.dataformat</groupId>
-            <artifactId>jackson-dataformat-cbor</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/extensions/aws-eks/deployment/src/main/java/org/apache/camel/quarkus/component/aws/eks/deployment/AwsEKSProcessor.java b/extensions/aws-eks/deployment/src/main/java/org/apache/camel/quarkus/component/aws/eks/deployment/AwsEKSProcessor.java
index bba4f31..88d6aee 100644
--- a/extensions/aws-eks/deployment/src/main/java/org/apache/camel/quarkus/component/aws/eks/deployment/AwsEKSProcessor.java
+++ b/extensions/aws-eks/deployment/src/main/java/org/apache/camel/quarkus/component/aws/eks/deployment/AwsEKSProcessor.java
@@ -25,8 +25,6 @@ import com.amazonaws.partitions.model.Partition;
 import com.amazonaws.partitions.model.Partitions;
 import com.amazonaws.partitions.model.Region;
 import com.amazonaws.partitions.model.Service;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
@@ -64,12 +62,6 @@ class AwsEKSProcessor {
         IndexView view = combinedIndexBuildItem.getIndex();
 
         resource.produce(new NativeImageResourceBuildItem("com/amazonaws/partitions/endpoints.json"));
-        for (String s : getImplementations(view, JsonDeserializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
-        for (String s : getImplementations(view, JsonSerializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
         reflectiveClass.produce(new ReflectiveClassBuildItem(true, false,
                 Partitions.class.getCanonicalName(),
                 Partition.class.getCanonicalName(),
diff --git a/extensions/aws-eks/runtime/pom.xml b/extensions/aws-eks/runtime/pom.xml
index 012304c..05f6a6f 100644
--- a/extensions/aws-eks/runtime/pom.xml
+++ b/extensions/aws-eks/runtime/pom.xml
@@ -79,14 +79,6 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.dataformat</groupId>
-            <artifactId>jackson-dataformat-cbor</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/extensions/aws-iam/deployment/src/main/java/org/apache/camel/quarkus/component/aws/iam/deployment/AwsIamProcessor.java b/extensions/aws-iam/deployment/src/main/java/org/apache/camel/quarkus/component/aws/iam/deployment/AwsIamProcessor.java
index cb073b3..c95c5ec 100644
--- a/extensions/aws-iam/deployment/src/main/java/org/apache/camel/quarkus/component/aws/iam/deployment/AwsIamProcessor.java
+++ b/extensions/aws-iam/deployment/src/main/java/org/apache/camel/quarkus/component/aws/iam/deployment/AwsIamProcessor.java
@@ -30,8 +30,6 @@ import com.amazonaws.partitions.model.Partition;
 import com.amazonaws.partitions.model.Partitions;
 import com.amazonaws.partitions.model.Region;
 import com.amazonaws.partitions.model.Service;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
 
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
@@ -66,12 +64,6 @@ class AwsIamProcessor {
         IndexView view = combinedIndexBuildItem.getIndex();
 
         resource.produce(new NativeImageResourceBuildItem("com/amazonaws/partitions/endpoints.json"));
-        for (String s : getImplementations(view, JsonDeserializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
-        for (String s : getImplementations(view, JsonSerializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
         reflectiveClass.produce(new ReflectiveClassBuildItem(true, false,
                 Partitions.class.getCanonicalName(),
                 Partition.class.getCanonicalName(),
diff --git a/extensions/aws-iam/runtime/pom.xml b/extensions/aws-iam/runtime/pom.xml
index 9b5d2f8..34bcfb0 100644
--- a/extensions/aws-iam/runtime/pom.xml
+++ b/extensions/aws-iam/runtime/pom.xml
@@ -80,14 +80,6 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.dataformat</groupId>
-            <artifactId>jackson-dataformat-cbor</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/extensions/aws-kms/deployment/src/main/java/org/apache/camel/quarkus/component/aws/kms/deployment/AwsKmsProcessor.java b/extensions/aws-kms/deployment/src/main/java/org/apache/camel/quarkus/component/aws/kms/deployment/AwsKmsProcessor.java
index 2c0a542..dc3d60d 100644
--- a/extensions/aws-kms/deployment/src/main/java/org/apache/camel/quarkus/component/aws/kms/deployment/AwsKmsProcessor.java
+++ b/extensions/aws-kms/deployment/src/main/java/org/apache/camel/quarkus/component/aws/kms/deployment/AwsKmsProcessor.java
@@ -30,8 +30,6 @@ import com.amazonaws.partitions.model.Partition;
 import com.amazonaws.partitions.model.Partitions;
 import com.amazonaws.partitions.model.Region;
 import com.amazonaws.partitions.model.Service;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
 
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
@@ -66,12 +64,6 @@ class AwsKmsProcessor {
         IndexView view = combinedIndexBuildItem.getIndex();
 
         resource.produce(new NativeImageResourceBuildItem("com/amazonaws/partitions/endpoints.json"));
-        for (String s : getImplementations(view, JsonDeserializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
-        for (String s : getImplementations(view, JsonSerializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
         reflectiveClass.produce(new ReflectiveClassBuildItem(true, false,
                 Partitions.class.getCanonicalName(),
                 Partition.class.getCanonicalName(),
diff --git a/extensions/aws-kms/runtime/pom.xml b/extensions/aws-kms/runtime/pom.xml
index d683e35..f59ca82 100644
--- a/extensions/aws-kms/runtime/pom.xml
+++ b/extensions/aws-kms/runtime/pom.xml
@@ -80,14 +80,6 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.dataformat</groupId>
-            <artifactId>jackson-dataformat-cbor</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/extensions/aws-s3/deployment/src/main/java/org/apache/camel/quarkus/component/aws/s3/deployment/AwsS3Processor.java b/extensions/aws-s3/deployment/src/main/java/org/apache/camel/quarkus/component/aws/s3/deployment/AwsS3Processor.java
index d521afe..6941990 100644
--- a/extensions/aws-s3/deployment/src/main/java/org/apache/camel/quarkus/component/aws/s3/deployment/AwsS3Processor.java
+++ b/extensions/aws-s3/deployment/src/main/java/org/apache/camel/quarkus/component/aws/s3/deployment/AwsS3Processor.java
@@ -27,8 +27,6 @@ import com.amazonaws.partitions.model.Region;
 import com.amazonaws.partitions.model.Service;
 import com.amazonaws.services.s3.internal.AWSS3V4Signer;
 import com.amazonaws.services.s3.model.CryptoConfiguration;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
@@ -72,12 +70,6 @@ class AwsS3Processor {
         IndexView view = combinedIndexBuildItem.getIndex();
 
         resource.produce(new NativeImageResourceBuildItem("com/amazonaws/partitions/endpoints.json"));
-        for (String s : getImplementations(view, JsonDeserializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
-        for (String s : getImplementations(view, JsonSerializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
         reflectiveClass.produce(new ReflectiveClassBuildItem(true, false,
                 Partitions.class.getCanonicalName(),
                 Partition.class.getCanonicalName(),
diff --git a/extensions/aws-s3/runtime/pom.xml b/extensions/aws-s3/runtime/pom.xml
index 0b0e060..7737b28 100644
--- a/extensions/aws-s3/runtime/pom.xml
+++ b/extensions/aws-s3/runtime/pom.xml
@@ -79,14 +79,6 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.dataformat</groupId>
-            <artifactId>jackson-dataformat-cbor</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/extensions/aws-sns/deployment/src/main/java/org/apache/camel/quarkus/component/aws/sns/deployment/AwsSNSProcessor.java b/extensions/aws-sns/deployment/src/main/java/org/apache/camel/quarkus/component/aws/sns/deployment/AwsSNSProcessor.java
index 7874eae..752148d 100644
--- a/extensions/aws-sns/deployment/src/main/java/org/apache/camel/quarkus/component/aws/sns/deployment/AwsSNSProcessor.java
+++ b/extensions/aws-sns/deployment/src/main/java/org/apache/camel/quarkus/component/aws/sns/deployment/AwsSNSProcessor.java
@@ -26,8 +26,6 @@ import com.amazonaws.partitions.model.Partition;
 import com.amazonaws.partitions.model.Partitions;
 import com.amazonaws.partitions.model.Region;
 import com.amazonaws.partitions.model.Service;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
@@ -65,12 +63,6 @@ class AwsSNSProcessor {
         IndexView view = combinedIndexBuildItem.getIndex();
 
         resource.produce(new NativeImageResourceBuildItem("com/amazonaws/partitions/endpoints.json"));
-        for (String s : getImplementations(view, JsonDeserializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
-        for (String s : getImplementations(view, JsonSerializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
         reflectiveClass.produce(new ReflectiveClassBuildItem(true, false,
                 Partitions.class.getCanonicalName(),
                 Partition.class.getCanonicalName(),
diff --git a/extensions/aws-sns/runtime/pom.xml b/extensions/aws-sns/runtime/pom.xml
index 0b42870..5e44ed2 100644
--- a/extensions/aws-sns/runtime/pom.xml
+++ b/extensions/aws-sns/runtime/pom.xml
@@ -79,14 +79,6 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.dataformat</groupId>
-            <artifactId>jackson-dataformat-cbor</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/extensions/aws-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws/sqs/deployment/AwsSQSProcessor.java b/extensions/aws-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws/sqs/deployment/AwsSQSProcessor.java
index e5dc64c..3b905d2 100644
--- a/extensions/aws-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws/sqs/deployment/AwsSQSProcessor.java
+++ b/extensions/aws-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws/sqs/deployment/AwsSQSProcessor.java
@@ -26,8 +26,6 @@ import com.amazonaws.partitions.model.Partition;
 import com.amazonaws.partitions.model.Partitions;
 import com.amazonaws.partitions.model.Region;
 import com.amazonaws.partitions.model.Service;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
@@ -65,12 +63,6 @@ class AwsSQSProcessor {
         IndexView view = combinedIndexBuildItem.getIndex();
 
         resource.produce(new NativeImageResourceBuildItem("com/amazonaws/partitions/endpoints.json"));
-        for (String s : getImplementations(view, JsonDeserializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
-        for (String s : getImplementations(view, JsonSerializer.class)) {
-            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
-        }
         reflectiveClass.produce(new ReflectiveClassBuildItem(true, false,
                 Partitions.class.getCanonicalName(),
                 Partition.class.getCanonicalName(),
diff --git a/extensions/aws-sqs/runtime/pom.xml b/extensions/aws-sqs/runtime/pom.xml
index 919f83c..0af1b1b 100644
--- a/extensions/aws-sqs/runtime/pom.xml
+++ b/extensions/aws-sqs/runtime/pom.xml
@@ -79,14 +79,6 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.dataformat</groupId>
-            <artifactId>jackson-dataformat-cbor</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/extensions/support/aws/runtime/pom.xml b/extensions/support/aws/runtime/pom.xml
index 09260e8..e7a2d40 100644
--- a/extensions/support/aws/runtime/pom.xml
+++ b/extensions/support/aws/runtime/pom.xml
@@ -51,6 +51,14 @@
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-jackson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.dataformat</groupId>
+            <artifactId>jackson-dataformat-cbor</artifactId>
+        </dependency>
     </dependencies>
 
     <build>