From 77be42a853a61e79a7a7ae3294bef14c61797436 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Fri, 11 Oct 2024 09:45:41 +0200 Subject: [PATCH] Remove Camel-Kamelets-utils since it is now in core Signed-off-by: Andrea Cosentino --- kamelets/aws-ddb-sink.kamelet.yaml | 2 +- kamelets/aws-ddb-streams-source.kamelet.yaml | 2 +- kamelets/aws-kinesis-source.kamelet.yaml | 2 +- kamelets/aws-s3-source.kamelet.yaml | 2 +- kamelets/aws-sqs-source.kamelet.yaml | 2 +- .../azure-storage-blob-source.kamelet.yaml | 2 +- .../azure-storage-datalake-sink.kamelet.yaml | 2 +- ...azure-storage-datalake-source.kamelet.yaml | 2 +- .../azure-storage-queue-source.kamelet.yaml | 2 +- .../djl-image-to-text-action.kamelet.yaml | 2 +- kamelets/drop-field-action.kamelet.yaml | 2 +- kamelets/extract-field-action.kamelet.yaml | 2 +- kamelets/google-sheets-sink.kamelet.yaml | 2 +- kamelets/hoist-field-action.kamelet.yaml | 2 +- kamelets/insert-field-action.kamelet.yaml | 2 +- kamelets/json-deserialize-action.kamelet.yaml | 2 +- kamelets/json-serialize-action.kamelet.yaml | 2 +- ...o-registry-not-secured-source.kamelet.yaml | 2 +- ...ka-azure-schema-registry-sink.kamelet.yaml | 2 +- ...-azure-schema-registry-source.kamelet.yaml | 2 +- ...o-registry-not-secured-source.kamelet.yaml | 2 +- ...atch-apicurio-registry-source.kamelet.yaml | 2 +- ...-azure-schema-registry-source.kamelet.yaml | 2 +- ...ka-batch-manual-commit-action.kamelet.yaml | 2 +- ...afka-batch-not-secured-source.kamelet.yaml | 2 +- .../kafka-batch-scram-source.kamelet.yaml | 2 +- kamelets/kafka-batch-source.kamelet.yaml | 2 +- kamelets/kafka-batch-ssl-source.kamelet.yaml | 2 +- .../kafka-manual-commit-action.kamelet.yaml | 2 +- ...apicurio-registry-json-source.kamelet.yaml | 2 +- ...ured-apicurio-registry-source.kamelet.yaml | 2 +- kamelets/kafka-not-secured-sink.kamelet.yaml | 2 +- .../kafka-not-secured-source.kamelet.yaml | 2 +- kamelets/kafka-scram-source.kamelet.yaml | 2 +- kamelets/kafka-source.kamelet.yaml | 2 +- kamelets/kafka-ssl-source.kamelet.yaml | 2 +- kamelets/mask-field-action.kamelet.yaml | 2 +- ...ssage-timestamp-router-action.kamelet.yaml | 2 +- ...mongodb-changes-stream-source.kamelet.yaml | 2 +- kamelets/mongodb-sink.kamelet.yaml | 2 +- kamelets/mongodb-source.kamelet.yaml | 2 +- .../protobuf-deserialize-action.kamelet.yaml | 2 +- .../protobuf-serialize-action.kamelet.yaml | 2 +- kamelets/regex-router-action.kamelet.yaml | 2 +- kamelets/replace-field-action.kamelet.yaml | 2 +- .../resolve-pojo-schema-action.kamelet.yaml | 2 +- kamelets/timestamp-router-action.kamelet.yaml | 2 +- kamelets/value-to-key-action.kamelet.yaml | 2 +- library/camel-kamelets-utils/pom.xml | 180 ------------------ .../kamelets/utils/djl/ImageNetUtil.java | 58 ------ .../camel/kamelets/utils/format/MimeType.java | 55 ------ .../schema/DelegatingSchemaResolver.java | 121 ------------ .../gson/JavaTimeInstantTypeAdapter.java | 44 ----- .../kafka/KafkaHeaderDeserializer.java | 96 ---------- .../kamelets/utils/transform/DropField.java | 59 ------ .../utils/transform/ExtractField.java | 110 ----------- .../kamelets/utils/transform/HoistField.java | 38 ---- .../kamelets/utils/transform/InsertField.java | 84 -------- .../kamelets/utils/transform/MaskField.java | 126 ------------ .../transform/MessageTimestampRouter.java | 90 --------- .../kamelets/utils/transform/RegexRouter.java | 49 ----- .../utils/transform/ReplaceField.java | 91 --------- .../utils/transform/TimestampRouter.java | 67 ------- .../Ddb2JsonStructDataTypeTransformer.java | 46 ----- .../transform/kafka/BatchManualCommit.java | 42 ---- .../utils/transform/kafka/ManualCommit.java | 33 ---- .../utils/transform/kafka/ValueToKey.java | 61 ------ .../transformer/aws2-ddb-application-x-struct | 1 - .../aws2-ddb-application-x-struct.json | 13 -- .../kafka/KafkaHeaderDeserializerTest.java | 78 -------- .../utils/transform/ExtractFieldTest.java | 133 ------------- .../utils/transform/HoistFieldTest.java | 57 ------ .../utils/transform/InsertFieldTest.java | 72 ------- .../utils/transform/MaskFieldTest.java | 86 --------- .../utils/transform/RegexRouterTest.java | 51 ----- .../utils/transform/ReplaceFieldTest.java | 115 ----------- .../src/test/resources/log4j2-test.xml | 32 ---- .../kamelets/aws-ddb-sink.kamelet.yaml | 2 +- .../aws-ddb-streams-source.kamelet.yaml | 2 +- .../kamelets/aws-kinesis-source.kamelet.yaml | 2 +- .../kamelets/aws-s3-source.kamelet.yaml | 2 +- .../kamelets/aws-sqs-source.kamelet.yaml | 2 +- .../azure-storage-blob-source.kamelet.yaml | 2 +- .../azure-storage-datalake-sink.kamelet.yaml | 2 +- ...azure-storage-datalake-source.kamelet.yaml | 2 +- .../azure-storage-queue-source.kamelet.yaml | 2 +- .../djl-image-to-text-action.kamelet.yaml | 2 +- .../kamelets/drop-field-action.kamelet.yaml | 2 +- .../extract-field-action.kamelet.yaml | 2 +- .../kamelets/google-sheets-sink.kamelet.yaml | 2 +- .../kamelets/hoist-field-action.kamelet.yaml | 2 +- .../kamelets/insert-field-action.kamelet.yaml | 2 +- .../json-deserialize-action.kamelet.yaml | 2 +- .../json-serialize-action.kamelet.yaml | 2 +- ...o-registry-not-secured-source.kamelet.yaml | 2 +- ...ka-azure-schema-registry-sink.kamelet.yaml | 2 +- ...-azure-schema-registry-source.kamelet.yaml | 2 +- ...o-registry-not-secured-source.kamelet.yaml | 2 +- ...atch-apicurio-registry-source.kamelet.yaml | 2 +- ...-azure-schema-registry-source.kamelet.yaml | 2 +- ...ka-batch-manual-commit-action.kamelet.yaml | 2 +- ...afka-batch-not-secured-source.kamelet.yaml | 2 +- .../kafka-batch-scram-source.kamelet.yaml | 2 +- .../kamelets/kafka-batch-source.kamelet.yaml | 2 +- .../kafka-batch-ssl-source.kamelet.yaml | 2 +- .../kafka-manual-commit-action.kamelet.yaml | 2 +- ...apicurio-registry-json-source.kamelet.yaml | 2 +- ...ured-apicurio-registry-source.kamelet.yaml | 2 +- .../kafka-not-secured-sink.kamelet.yaml | 2 +- .../kafka-not-secured-source.kamelet.yaml | 2 +- .../kamelets/kafka-scram-source.kamelet.yaml | 2 +- .../kamelets/kafka-source.kamelet.yaml | 2 +- .../kamelets/kafka-ssl-source.kamelet.yaml | 2 +- .../kamelets/mask-field-action.kamelet.yaml | 2 +- ...ssage-timestamp-router-action.kamelet.yaml | 2 +- ...mongodb-changes-stream-source.kamelet.yaml | 2 +- .../kamelets/mongodb-sink.kamelet.yaml | 2 +- .../kamelets/mongodb-source.kamelet.yaml | 2 +- .../protobuf-deserialize-action.kamelet.yaml | 2 +- .../protobuf-serialize-action.kamelet.yaml | 2 +- .../kamelets/regex-router-action.kamelet.yaml | 2 +- .../replace-field-action.kamelet.yaml | 2 +- .../resolve-pojo-schema-action.kamelet.yaml | 2 +- .../timestamp-router-action.kamelet.yaml | 2 +- .../kamelets/value-to-key-action.kamelet.yaml | 2 +- pom.xml | 1 - update-kamelets.xml | 2 +- 127 files changed, 97 insertions(+), 2186 deletions(-) delete mode 100644 library/camel-kamelets-utils/pom.xml delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/djl/ImageNetUtil.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/format/MimeType.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/format/schema/DelegatingSchemaResolver.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/serialization/gson/JavaTimeInstantTypeAdapter.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/serialization/kafka/KafkaHeaderDeserializer.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/DropField.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/ExtractField.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/HoistField.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/InsertField.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/MaskField.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/MessageTimestampRouter.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/RegexRouter.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/ReplaceField.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/TimestampRouter.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/aws2/ddb/Ddb2JsonStructDataTypeTransformer.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/BatchManualCommit.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/ManualCommit.java delete mode 100644 library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/ValueToKey.java delete mode 100644 library/camel-kamelets-utils/src/main/resources/META-INF/services/org/apache/camel/transformer/aws2-ddb-application-x-struct delete mode 100644 library/camel-kamelets-utils/src/main/resources/META-INF/services/org/apache/camel/transformer/aws2-ddb-application-x-struct.json delete mode 100644 library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/serialization/kafka/KafkaHeaderDeserializerTest.java delete mode 100644 library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/ExtractFieldTest.java delete mode 100644 library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/HoistFieldTest.java delete mode 100644 library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/InsertFieldTest.java delete mode 100644 library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/MaskFieldTest.java delete mode 100644 library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/RegexRouterTest.java delete mode 100644 library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/ReplaceFieldTest.java delete mode 100644 library/camel-kamelets-utils/src/test/resources/log4j2-test.xml diff --git a/kamelets/aws-ddb-sink.kamelet.yaml b/kamelets/aws-ddb-sink.kamelet.yaml index 8a27c8e73..206c07653 100644 --- a/kamelets/aws-ddb-sink.kamelet.yaml +++ b/kamelets/aws-ddb-sink.kamelet.yaml @@ -159,7 +159,7 @@ spec: type: object description: Attribute value map specifies all attributes to change with the given operation. dependencies: - - mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT + - - "camel:core" - "camel:jackson" - "camel:aws2-ddb" diff --git a/kamelets/aws-ddb-streams-source.kamelet.yaml b/kamelets/aws-ddb-streams-source.kamelet.yaml index f9ee1f0c8..57c2d32f5 100644 --- a/kamelets/aws-ddb-streams-source.kamelet.yaml +++ b/kamelets/aws-ddb-streams-source.kamelet.yaml @@ -155,7 +155,7 @@ spec: description: The exchange creation timestamp as event time. type: string dependencies: - - mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT + - - "camel:gson" - "camel:aws2-ddb" - "camel:kamelet" diff --git a/kamelets/aws-kinesis-source.kamelet.yaml b/kamelets/aws-kinesis-source.kamelet.yaml index 0f9ec0bbd..4cac85d8b 100644 --- a/kamelets/aws-kinesis-source.kamelet.yaml +++ b/kamelets/aws-kinesis-source.kamelet.yaml @@ -129,7 +129,7 @@ spec: - "camel:aws2-kinesis" - "camel:kamelet" - "camel:core" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: from: uri: aws2-kinesis:{{stream}} diff --git a/kamelets/aws-s3-source.kamelet.yaml b/kamelets/aws-s3-source.kamelet.yaml index 6d4a0009c..f51d6287c 100644 --- a/kamelets/aws-s3-source.kamelet.yaml +++ b/kamelets/aws-s3-source.kamelet.yaml @@ -212,7 +212,7 @@ spec: dependencies: - "camel:core" - "camel:aws2-s3" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" template: from: diff --git a/kamelets/aws-sqs-source.kamelet.yaml b/kamelets/aws-sqs-source.kamelet.yaml index f2cd16722..da63a4b00 100644 --- a/kamelets/aws-sqs-source.kamelet.yaml +++ b/kamelets/aws-sqs-source.kamelet.yaml @@ -227,7 +227,7 @@ spec: dependencies: - "camel:core" - "camel:aws2-sqs" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" template: from: diff --git a/kamelets/azure-storage-blob-source.kamelet.yaml b/kamelets/azure-storage-blob-source.kamelet.yaml index b3dda18db..52eca2d13 100644 --- a/kamelets/azure-storage-blob-source.kamelet.yaml +++ b/kamelets/azure-storage-blob-source.kamelet.yaml @@ -149,7 +149,7 @@ spec: - "camel:core" - "camel:jsonpath" - "camel:timer" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: from: uri: "azure-storage-blob:{{accountName}}/{{containerName}}" diff --git a/kamelets/azure-storage-datalake-sink.kamelet.yaml b/kamelets/azure-storage-datalake-sink.kamelet.yaml index 297c148ce..ef7c467a6 100644 --- a/kamelets/azure-storage-datalake-sink.kamelet.yaml +++ b/kamelets/azure-storage-datalake-sink.kamelet.yaml @@ -85,7 +85,7 @@ spec: - "camel:kamelet" - "camel:core" - "camel:timer" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: from: uri: "kamelet:source" diff --git a/kamelets/azure-storage-datalake-source.kamelet.yaml b/kamelets/azure-storage-datalake-source.kamelet.yaml index c8f2aacf9..d618e90e6 100644 --- a/kamelets/azure-storage-datalake-source.kamelet.yaml +++ b/kamelets/azure-storage-datalake-source.kamelet.yaml @@ -231,7 +231,7 @@ spec: - "camel:kamelet" - "camel:core" - "camel:timer" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: from: uri: "azure-storage-datalake:{{accountName}}/{{fileSystemName}}" diff --git a/kamelets/azure-storage-queue-source.kamelet.yaml b/kamelets/azure-storage-queue-source.kamelet.yaml index 7a4f40f6f..bebf4002b 100644 --- a/kamelets/azure-storage-queue-source.kamelet.yaml +++ b/kamelets/azure-storage-queue-source.kamelet.yaml @@ -133,7 +133,7 @@ spec: dependencies: - "camel:azure-storage-queue" - "camel:kamelet" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" template: from: diff --git a/kamelets/djl-image-to-text-action.kamelet.yaml b/kamelets/djl-image-to-text-action.kamelet.yaml index 085224ea2..db3422d62 100644 --- a/kamelets/djl-image-to-text-action.kamelet.yaml +++ b/kamelets/djl-image-to-text-action.kamelet.yaml @@ -40,7 +40,7 @@ spec: - "mvn:ai.djl.pytorch:pytorch-model-zoo:0.29.0" - "mvn:net.sf.extjwnl:extjwnl:2.0.5" - "mvn:net.sf.extjwnl:extjwnl-data-wn31:1.2" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kamelet" - "camel:jackson" diff --git a/kamelets/drop-field-action.kamelet.yaml b/kamelets/drop-field-action.kamelet.yaml index 3efdce5a3..902db105a 100644 --- a/kamelets/drop-field-action.kamelet.yaml +++ b/kamelets/drop-field-action.kamelet.yaml @@ -45,7 +45,7 @@ spec: type: string type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:jackson" - "camel:kamelet" diff --git a/kamelets/extract-field-action.kamelet.yaml b/kamelets/extract-field-action.kamelet.yaml index 177d57a8d..7aef2d8bd 100644 --- a/kamelets/extract-field-action.kamelet.yaml +++ b/kamelets/extract-field-action.kamelet.yaml @@ -74,7 +74,7 @@ spec: default: false type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" - "camel:jackson" diff --git a/kamelets/google-sheets-sink.kamelet.yaml b/kamelets/google-sheets-sink.kamelet.yaml index 0f5f5b5da..5756e6b4e 100644 --- a/kamelets/google-sheets-sink.kamelet.yaml +++ b/kamelets/google-sheets-sink.kamelet.yaml @@ -146,7 +146,7 @@ spec: type: string mediaType: application/json dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:jackson" - "camel:kamelet" diff --git a/kamelets/hoist-field-action.kamelet.yaml b/kamelets/hoist-field-action.kamelet.yaml index 2fe78dd1f..54274130a 100644 --- a/kamelets/hoist-field-action.kamelet.yaml +++ b/kamelets/hoist-field-action.kamelet.yaml @@ -40,7 +40,7 @@ spec: type: string type: object dependencies: - - mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT + - - "camel:core" - "camel:jackson" - "camel:kamelet" diff --git a/kamelets/insert-field-action.kamelet.yaml b/kamelets/insert-field-action.kamelet.yaml index 63a8fd5fd..c653adbf5 100644 --- a/kamelets/insert-field-action.kamelet.yaml +++ b/kamelets/insert-field-action.kamelet.yaml @@ -50,7 +50,7 @@ spec: type: string type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:jackson" - "camel:kamelet" diff --git a/kamelets/json-deserialize-action.kamelet.yaml b/kamelets/json-deserialize-action.kamelet.yaml index a62749455..625f54788 100644 --- a/kamelets/json-deserialize-action.kamelet.yaml +++ b/kamelets/json-deserialize-action.kamelet.yaml @@ -33,7 +33,7 @@ spec: description: "Deserialize payload to JSON" type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" - "camel:jackson" diff --git a/kamelets/json-serialize-action.kamelet.yaml b/kamelets/json-serialize-action.kamelet.yaml index e32ec229c..86a5f5af9 100644 --- a/kamelets/json-serialize-action.kamelet.yaml +++ b/kamelets/json-serialize-action.kamelet.yaml @@ -33,7 +33,7 @@ spec: description: "Serialize payload to JSON" type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" - "camel:jackson" diff --git a/kamelets/kafka-apicurio-registry-not-secured-source.kamelet.yaml b/kamelets/kafka-apicurio-registry-not-secured-source.kamelet.yaml index 04bc00a83..bc69a4945 100644 --- a/kamelets/kafka-apicurio-registry-not-secured-source.kamelet.yaml +++ b/kamelets/kafka-apicurio-registry-not-secured-source.kamelet.yaml @@ -106,7 +106,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/kamelets/kafka-azure-schema-registry-sink.kamelet.yaml b/kamelets/kafka-azure-schema-registry-sink.kamelet.yaml index 5df28f250..310084efa 100644 --- a/kamelets/kafka-azure-schema-registry-sink.kamelet.yaml +++ b/kamelets/kafka-azure-schema-registry-sink.kamelet.yaml @@ -90,7 +90,7 @@ spec: type: string example: "com.example.Order" dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/kamelets/kafka-azure-schema-registry-source.kamelet.yaml b/kamelets/kafka-azure-schema-registry-source.kamelet.yaml index da8f1234e..9692d44de 100644 --- a/kamelets/kafka-azure-schema-registry-source.kamelet.yaml +++ b/kamelets/kafka-azure-schema-registry-source.kamelet.yaml @@ -131,7 +131,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/kamelets/kafka-batch-apicurio-registry-not-secured-source.kamelet.yaml b/kamelets/kafka-batch-apicurio-registry-not-secured-source.kamelet.yaml index b08bfb300..0f8fa9954 100644 --- a/kamelets/kafka-batch-apicurio-registry-not-secured-source.kamelet.yaml +++ b/kamelets/kafka-batch-apicurio-registry-not-secured-source.kamelet.yaml @@ -125,7 +125,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/kamelets/kafka-batch-apicurio-registry-source.kamelet.yaml b/kamelets/kafka-batch-apicurio-registry-source.kamelet.yaml index 0e9648d53..e3539afc0 100644 --- a/kamelets/kafka-batch-apicurio-registry-source.kamelet.yaml +++ b/kamelets/kafka-batch-apicurio-registry-source.kamelet.yaml @@ -166,7 +166,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/kamelets/kafka-batch-azure-schema-registry-source.kamelet.yaml b/kamelets/kafka-batch-azure-schema-registry-source.kamelet.yaml index 34b3848f5..94e1f58cd 100644 --- a/kamelets/kafka-batch-azure-schema-registry-source.kamelet.yaml +++ b/kamelets/kafka-batch-azure-schema-registry-source.kamelet.yaml @@ -145,7 +145,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/kamelets/kafka-batch-manual-commit-action.kamelet.yaml b/kamelets/kafka-batch-manual-commit-action.kamelet.yaml index 355c16f36..cd3fc5a09 100644 --- a/kamelets/kafka-batch-manual-commit-action.kamelet.yaml +++ b/kamelets/kafka-batch-manual-commit-action.kamelet.yaml @@ -33,7 +33,7 @@ spec: description: "Manually commit Kafka Batch Offset" type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" template: from: diff --git a/kamelets/kafka-batch-not-secured-source.kamelet.yaml b/kamelets/kafka-batch-not-secured-source.kamelet.yaml index 124038aa0..5fe7d7062 100644 --- a/kamelets/kafka-batch-not-secured-source.kamelet.yaml +++ b/kamelets/kafka-batch-not-secured-source.kamelet.yaml @@ -107,7 +107,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/kamelets/kafka-batch-scram-source.kamelet.yaml b/kamelets/kafka-batch-scram-source.kamelet.yaml index f7b7ba69d..2818c11f6 100644 --- a/kamelets/kafka-batch-scram-source.kamelet.yaml +++ b/kamelets/kafka-batch-scram-source.kamelet.yaml @@ -138,7 +138,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/kamelets/kafka-batch-source.kamelet.yaml b/kamelets/kafka-batch-source.kamelet.yaml index b9d36c063..d3f76ad4b 100644 --- a/kamelets/kafka-batch-source.kamelet.yaml +++ b/kamelets/kafka-batch-source.kamelet.yaml @@ -138,7 +138,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/kamelets/kafka-batch-ssl-source.kamelet.yaml b/kamelets/kafka-batch-ssl-source.kamelet.yaml index 9ddcee3e1..364d8a606 100644 --- a/kamelets/kafka-batch-ssl-source.kamelet.yaml +++ b/kamelets/kafka-batch-ssl-source.kamelet.yaml @@ -162,7 +162,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/kamelets/kafka-manual-commit-action.kamelet.yaml b/kamelets/kafka-manual-commit-action.kamelet.yaml index ec03507b0..5e131a4c0 100644 --- a/kamelets/kafka-manual-commit-action.kamelet.yaml +++ b/kamelets/kafka-manual-commit-action.kamelet.yaml @@ -33,7 +33,7 @@ spec: description: "Manually commit Kafka Offset" type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" template: from: diff --git a/kamelets/kafka-not-secured-apicurio-registry-json-source.kamelet.yaml b/kamelets/kafka-not-secured-apicurio-registry-json-source.kamelet.yaml index c19140864..ad213e9c4 100644 --- a/kamelets/kafka-not-secured-apicurio-registry-json-source.kamelet.yaml +++ b/kamelets/kafka-not-secured-apicurio-registry-json-source.kamelet.yaml @@ -147,7 +147,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/kamelets/kafka-not-secured-apicurio-registry-source.kamelet.yaml b/kamelets/kafka-not-secured-apicurio-registry-source.kamelet.yaml index 5f36d8d7a..af069afc8 100644 --- a/kamelets/kafka-not-secured-apicurio-registry-source.kamelet.yaml +++ b/kamelets/kafka-not-secured-apicurio-registry-source.kamelet.yaml @@ -152,7 +152,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/kamelets/kafka-not-secured-sink.kamelet.yaml b/kamelets/kafka-not-secured-sink.kamelet.yaml index 2f6020ae9..6cbc12790 100644 --- a/kamelets/kafka-not-secured-sink.kamelet.yaml +++ b/kamelets/kafka-not-secured-sink.kamelet.yaml @@ -56,7 +56,7 @@ spec: dependencies: - "camel:core" - "camel:kafka" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" template: from: diff --git a/kamelets/kafka-not-secured-source.kamelet.yaml b/kamelets/kafka-not-secured-source.kamelet.yaml index 8f67edeaa..dc83f7317 100644 --- a/kamelets/kafka-not-secured-source.kamelet.yaml +++ b/kamelets/kafka-not-secured-source.kamelet.yaml @@ -93,7 +93,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/kamelets/kafka-scram-source.kamelet.yaml b/kamelets/kafka-scram-source.kamelet.yaml index de228f15b..2e977f7ef 100644 --- a/kamelets/kafka-scram-source.kamelet.yaml +++ b/kamelets/kafka-scram-source.kamelet.yaml @@ -124,7 +124,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/kamelets/kafka-source.kamelet.yaml b/kamelets/kafka-source.kamelet.yaml index 4391c4b88..cf2362813 100644 --- a/kamelets/kafka-source.kamelet.yaml +++ b/kamelets/kafka-source.kamelet.yaml @@ -124,7 +124,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/kamelets/kafka-ssl-source.kamelet.yaml b/kamelets/kafka-ssl-source.kamelet.yaml index 534e8b011..6cf7c93a9 100644 --- a/kamelets/kafka-ssl-source.kamelet.yaml +++ b/kamelets/kafka-ssl-source.kamelet.yaml @@ -148,7 +148,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/kamelets/mask-field-action.kamelet.yaml b/kamelets/mask-field-action.kamelet.yaml index 8aa01d6eb..f8bdaf50a 100644 --- a/kamelets/mask-field-action.kamelet.yaml +++ b/kamelets/mask-field-action.kamelet.yaml @@ -45,7 +45,7 @@ spec: type: string type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:jackson" - "camel:kamelet" - "camel:core" diff --git a/kamelets/message-timestamp-router-action.kamelet.yaml b/kamelets/message-timestamp-router-action.kamelet.yaml index 589c3d904..c3ff77c1d 100644 --- a/kamelets/message-timestamp-router-action.kamelet.yaml +++ b/kamelets/message-timestamp-router-action.kamelet.yaml @@ -55,7 +55,7 @@ spec: default: "timestamp" type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:jackson" - "camel:kamelet" - "camel:core" diff --git a/kamelets/mongodb-changes-stream-source.kamelet.yaml b/kamelets/mongodb-changes-stream-source.kamelet.yaml index 310c1ce17..c051a83c3 100644 --- a/kamelets/mongodb-changes-stream-source.kamelet.yaml +++ b/kamelets/mongodb-changes-stream-source.kamelet.yaml @@ -82,7 +82,7 @@ spec: - "camel:kamelet" - "camel:mongodb" - "camel:jackson" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: beans: - name: local-mongodb diff --git a/kamelets/mongodb-sink.kamelet.yaml b/kamelets/mongodb-sink.kamelet.yaml index 4e8b6ac21..556826211 100644 --- a/kamelets/mongodb-sink.kamelet.yaml +++ b/kamelets/mongodb-sink.kamelet.yaml @@ -95,7 +95,7 @@ spec: - "camel:kamelet" - "camel:mongodb" - "camel:jackson" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: beans: - name: local-mongodb diff --git a/kamelets/mongodb-source.kamelet.yaml b/kamelets/mongodb-source.kamelet.yaml index afc534b54..edc599275 100644 --- a/kamelets/mongodb-source.kamelet.yaml +++ b/kamelets/mongodb-source.kamelet.yaml @@ -92,7 +92,7 @@ spec: - "camel:kamelet" - "camel:mongodb" - "camel:jackson" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: beans: - name: local-mongodb diff --git a/kamelets/protobuf-deserialize-action.kamelet.yaml b/kamelets/protobuf-deserialize-action.kamelet.yaml index fb5d9769a..c9356fb98 100644 --- a/kamelets/protobuf-deserialize-action.kamelet.yaml +++ b/kamelets/protobuf-deserialize-action.kamelet.yaml @@ -39,7 +39,7 @@ spec: type: string example: 'message Person { required string first = 1; required string last = 2; }' dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" - "camel:jackson-protobuf" diff --git a/kamelets/protobuf-serialize-action.kamelet.yaml b/kamelets/protobuf-serialize-action.kamelet.yaml index 454b823eb..dfb62be86 100644 --- a/kamelets/protobuf-serialize-action.kamelet.yaml +++ b/kamelets/protobuf-serialize-action.kamelet.yaml @@ -39,7 +39,7 @@ spec: type: string example: 'message Person { required string first = 1; required string last = 2; }' dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" - "camel:jackson-protobuf" diff --git a/kamelets/regex-router-action.kamelet.yaml b/kamelets/regex-router-action.kamelet.yaml index d31c1b46c..4ea579fef 100644 --- a/kamelets/regex-router-action.kamelet.yaml +++ b/kamelets/regex-router-action.kamelet.yaml @@ -45,7 +45,7 @@ spec: type: string type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" template: diff --git a/kamelets/replace-field-action.kamelet.yaml b/kamelets/replace-field-action.kamelet.yaml index 00f646970..c946aff59 100644 --- a/kamelets/replace-field-action.kamelet.yaml +++ b/kamelets/replace-field-action.kamelet.yaml @@ -65,7 +65,7 @@ spec: in: mediaType: application/json dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:jackson" - "camel:kamelet" diff --git a/kamelets/resolve-pojo-schema-action.kamelet.yaml b/kamelets/resolve-pojo-schema-action.kamelet.yaml index d681bfd38..10b21292e 100644 --- a/kamelets/resolve-pojo-schema-action.kamelet.yaml +++ b/kamelets/resolve-pojo-schema-action.kamelet.yaml @@ -55,7 +55,7 @@ spec: type: string example: "application/json" dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" - "camel:jackson-avro" diff --git a/kamelets/timestamp-router-action.kamelet.yaml b/kamelets/timestamp-router-action.kamelet.yaml index bf92edb2d..cd9d216ea 100644 --- a/kamelets/timestamp-router-action.kamelet.yaml +++ b/kamelets/timestamp-router-action.kamelet.yaml @@ -49,7 +49,7 @@ spec: default: "kafka.TIMESTAMP" type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" template: diff --git a/kamelets/value-to-key-action.kamelet.yaml b/kamelets/value-to-key-action.kamelet.yaml index f0564a2d8..c77298c28 100644 --- a/kamelets/value-to-key-action.kamelet.yaml +++ b/kamelets/value-to-key-action.kamelet.yaml @@ -40,7 +40,7 @@ spec: type: string type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:jackson" - "camel:kamelet" diff --git a/library/camel-kamelets-utils/pom.xml b/library/camel-kamelets-utils/pom.xml deleted file mode 100644 index f4871d44e..000000000 --- a/library/camel-kamelets-utils/pom.xml +++ /dev/null @@ -1,180 +0,0 @@ - - - - 4.0.0 - - - org.apache.camel.kamelets - camel-kamelets-parent - 4.9.0-SNAPSHOT - ../../pom.xml - - - camel-kamelets-utils - jar - - Camel Kamelets Utils - Camel Kamelets Utilities - - - - - org.apache.camel - camel-bom - ${camel.version} - pom - import - - - - - - - org.apache.camel - camel-api - - - - org.apache.camel - camel-jackson-protobuf - - - - org.apache.camel - camel-jackson - - - - org.apache.camel - camel-jackson-avro - - - - org.apache.camel - camel-kafka - - - - - org.apache.camel - camel-gson - provided - - - - - org.apache.camel - camel-azure-storage-blob - provided - - - - - org.apache.camel - camel-mongodb - provided - - - - - org.apache.camel - camel-djl - provided - - - net.sf.extjwnl - extjwnl - 2.0.5 - provided - - - net.sf.extjwnl - extjwnl-data-wn31 - 1.2 - provided - - - - - org.junit.jupiter - junit-jupiter-api - ${junit-jupiter-version} - test - - - org.junit.jupiter - junit-jupiter-params - ${junit-jupiter-version} - test - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-jupiter-version} - test - - - - org.skyscreamer - jsonassert - ${jsonassert-version} - test - - - - - org.apache.logging.log4j - log4j-api - ${log4j2-version} - test - - - org.apache.logging.log4j - log4j-core - ${log4j2-version} - test - - - org.apache.logging.log4j - log4j-slf4j2-impl - ${log4j2-version} - test - - - - - - - org.jboss.jandex - jandex-maven-plugin - 1.2.3 - - - make-index - - jandex - - - - - - - diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/djl/ImageNetUtil.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/djl/ImageNetUtil.java deleted file mode 100644 index 26dad8808..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/djl/ImageNetUtil.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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.kamelets.utils.djl; - -import java.util.List; - -import org.apache.camel.Exchange; -import org.apache.camel.RuntimeCamelException; - -import ai.djl.modality.Classifications; -import net.sf.extjwnl.data.IndexWord; -import net.sf.extjwnl.data.POS; -import net.sf.extjwnl.data.PointerUtils; -import net.sf.extjwnl.data.list.PointerTargetNodeList; -import net.sf.extjwnl.dictionary.Dictionary; - -/** - * A utility bean class for handling ImageNet (https://image-net.org/) classifications. - */ -public class ImageNetUtil { - - public ImageNetUtil() { - } - - public void extractClassName(Exchange exchange) { - Classifications body = exchange.getMessage().getBody(Classifications.class); - String className = body.best().getClassName().split(",")[0].split(" ", 2)[1]; - exchange.getMessage().setBody(className); - } - - public void addHypernym(Exchange exchange) throws Exception { - String className = exchange.getMessage().getBody(String.class); - Dictionary dic = Dictionary.getDefaultResourceInstance(); - IndexWord word = dic.getIndexWord(POS.NOUN, className); - if (word == null) { - throw new RuntimeCamelException("Word not found: " + className); - } - PointerTargetNodeList hypernyms = PointerUtils.getDirectHypernyms(word.getSenses().get(0)); - String hypernym = hypernyms.stream() - .map(h -> h.getSynset().getWords().get(0).getLemma()) - .findFirst().orElse(className); - exchange.getMessage().setBody(List.of(className, hypernym)); - } -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/format/MimeType.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/format/MimeType.java deleted file mode 100644 index 4c819bb89..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/format/MimeType.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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.kamelets.utils.format; - -import java.util.Objects; - -public enum MimeType { - JSON("application/json"), - PROTOBUF("application/protobuf"), - PROTOBUF_BINARY("protobuf/binary"), - PROTOBUF_STRUCT("protobuf/x-struct"), - AVRO("application/avro"), - AVRO_BINARY("avro/binary"), - AVRO_STRUCT("avro/x-struct"), - BINARY("application/octet-stream"), - TEXT("text/plain"), - JAVA_OBJECT("application/x-java-object"), - STRUCT("application/x-struct"); - - private static final MimeType[] VALUES = values(); - private final String type; - - MimeType(String type) { - this.type = type; - } - - public String type() { - return type; - } - - public static MimeType of(String type) { - for (MimeType mt : VALUES) { - if (Objects.equals(type, mt.type)) { - return mt; - } - } - - throw new IllegalArgumentException("Unsupported type: " + type); - } -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/format/schema/DelegatingSchemaResolver.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/format/schema/DelegatingSchemaResolver.java deleted file mode 100644 index 0c05a37b4..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/format/schema/DelegatingSchemaResolver.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * 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.kamelets.utils.format.schema; - -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.apache.camel.component.jackson.avro.transform.AvroSchemaResolver; -import org.apache.camel.component.jackson.protobuf.transform.ProtobufSchemaResolver; -import org.apache.camel.component.jackson.transform.JsonSchemaResolver; -import org.apache.camel.kamelets.utils.format.MimeType; -import org.apache.camel.util.ObjectHelper; - -/** - * Schema resolver processor delegates to either Avro or Json schema resolver based on the given mimetype property. - * When mimetype is of type application/x-java-object uses additional target mimetype (usually the produces mimetype) to - * determine the schema resolver (Avro or Json). - * Delegates to schema resolver and sets proper content class and schema properties on the delegate. - */ -public class DelegatingSchemaResolver implements Processor { - private String mimeType; - private String targetMimeType; - - private String schema; - private String contentClass; - - @Override - public void process(Exchange exchange) throws Exception { - if (ObjectHelper.isEmpty(mimeType)) { - return; - } - - MimeType mimeType = MimeType.of(this.mimeType); - Processor resolver; - if (mimeType.equals(MimeType.JAVA_OBJECT)) { - if (ObjectHelper.isEmpty(targetMimeType)) { - return; - } - resolver = fromMimeType(MimeType.of(targetMimeType)); - } else { - resolver = fromMimeType(mimeType); - } - - if (resolver != null) { - resolver.process(exchange); - } - } - - private Processor fromMimeType(MimeType mimeType) { - switch (mimeType) { - case PROTOBUF: - case PROTOBUF_BINARY: - case PROTOBUF_STRUCT: - ProtobufSchemaResolver protobufSchemaResolver = new ProtobufSchemaResolver(); - protobufSchemaResolver.setSchema(this.schema); - protobufSchemaResolver.setContentClass(this.contentClass); - return protobufSchemaResolver; - case AVRO: - case AVRO_BINARY: - case AVRO_STRUCT: - AvroSchemaResolver avroSchemaResolver = new AvroSchemaResolver(); - avroSchemaResolver.setSchema(this.schema); - avroSchemaResolver.setContentClass(this.contentClass); - return avroSchemaResolver; - case JSON: - case STRUCT: - JsonSchemaResolver jsonSchemaResolver = new JsonSchemaResolver(); - jsonSchemaResolver.setSchema(this.schema); - jsonSchemaResolver.setContentClass(this.contentClass); - return jsonSchemaResolver; - default: - return null; - } - } - - public String getMimeType() { - return mimeType; - } - - public void setMimeType(String mimeType) { - this.mimeType = mimeType; - } - - public String getSchema() { - return schema; - } - - public void setSchema(String schema) { - this.schema = schema; - } - - public String getContentClass() { - return contentClass; - } - - public void setContentClass(String contentClass) { - this.contentClass = contentClass; - } - - public String getTargetMimeType() { - return targetMimeType; - } - - public void setTargetMimeType(String targetMimeType) { - this.targetMimeType = targetMimeType; - } -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/serialization/gson/JavaTimeInstantTypeAdapter.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/serialization/gson/JavaTimeInstantTypeAdapter.java deleted file mode 100644 index eaeb5e7ad..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/serialization/gson/JavaTimeInstantTypeAdapter.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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.kamelets.utils.serialization.gson; - -import java.lang.reflect.Type; -import java.time.Instant; - -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonParseException; -import com.google.gson.JsonPrimitive; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; - -public class JavaTimeInstantTypeAdapter implements JsonSerializer, JsonDeserializer { - - @Override - public JsonElement serialize(final Instant time, final Type typeOfSrc, - final JsonSerializationContext context) { - return new JsonPrimitive(time.getEpochSecond() * 1000); - } - - @Override - public Instant deserialize(final JsonElement json, final Type typeOfT, - final JsonDeserializationContext context) throws JsonParseException { - return Instant.ofEpochMilli(json.getAsLong()); - } -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/serialization/kafka/KafkaHeaderDeserializer.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/serialization/kafka/KafkaHeaderDeserializer.java deleted file mode 100644 index 3fc24cc8f..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/serialization/kafka/KafkaHeaderDeserializer.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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.kamelets.utils.serialization.kafka; - -import java.nio.charset.StandardCharsets; -import java.util.Map; - -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.apache.camel.TypeConverter; -import org.apache.camel.component.kafka.KafkaConstants; -import org.apache.camel.support.SimpleTypeConverter; - -/** - * Header deserializer used in Kafka source Kamelet. Automatically converts all message headers to String. - * Uses given type converter implementation set on the Camel context to convert values. If no type converter is set - * the deserializer uses its own fallback conversion implementation. - */ -public class KafkaHeaderDeserializer implements Processor { - - boolean enabled = false; - - private final SimpleTypeConverter defaultTypeConverter = new SimpleTypeConverter(true, KafkaHeaderDeserializer::convert); - - @Override - public void process(Exchange exchange) throws Exception { - if (!enabled) { - return; - } - - Map headers = exchange.getMessage().getHeaders(); - - TypeConverter typeConverter = exchange.getContext().getTypeConverter(); - if (typeConverter == null) { - typeConverter = defaultTypeConverter; - } - - for (Map.Entry header : headers.entrySet()) { - if (shouldDeserialize(header)) { - header.setValue(typeConverter.convertTo(String.class, header.getValue())); - } - } - } - - /** - * Fallback conversion strategy supporting null values, String and byte[]. Converts headers to respective - * String representation or null. - * @param type target type, always String in this case. - * @param exchange the exchange containing all headers to convert. - * @param value the current value to convert. - * @return String representation of given value or null if value itself is null. - */ - private static Object convert(Class type, Exchange exchange, Object value) { - if (value == null) { - return null; - } - - if (value instanceof String) { - return value; - } - - if (value instanceof byte[]) { - return new String((byte[]) value, StandardCharsets.UTF_8); - } - - return value.toString(); - } - - /** - * Exclude special Kafka headers from auto deserialization. - * @param entry - * @return - */ - private boolean shouldDeserialize(Map.Entry entry) { - return !entry.getKey().equals(KafkaConstants.HEADERS) && !entry.getKey().equals(KafkaConstants.MANUAL_COMMIT); - } - - public void setEnabled(String enabled) { - this.enabled = Boolean.parseBoolean(enabled); - } -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/DropField.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/DropField.java deleted file mode 100644 index 9641669f4..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/DropField.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.JsonNodeType; -import com.fasterxml.jackson.databind.node.ObjectNode; -import org.apache.camel.Exchange; -import org.apache.camel.InvalidPayloadException; -import org.apache.camel.Processor; - -public class DropField implements Processor { - - String field; - - /** - * Default constructor. - */ - public DropField() { - } - - /** - * Constructor using fields. - * @param field the field name to drop. - */ - public DropField(String field, String value) { - this.field = field; - } - - public void process(Exchange ex) throws InvalidPayloadException { - JsonNode body = ex.getMessage().getBody(JsonNode.class); - if (body == null) { - throw new InvalidPayloadException(ex, JsonNode.class); - } - - if (body.getNodeType().equals(JsonNodeType.OBJECT)) { - ((ObjectNode) body).remove(field); - ex.getMessage().setBody(body); - } - } - - public void setField(String field) { - this.field = field; - } -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/ExtractField.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/ExtractField.java deleted file mode 100644 index bdb636b5b..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/ExtractField.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import java.util.Map; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.camel.Exchange; -import org.apache.camel.InvalidPayloadException; -import org.apache.camel.Processor; - -public class ExtractField implements Processor { - - String field; - String headerOutputName; - boolean headerOutput; - boolean strictHeaderCheck; - boolean trimField; - - static final String EXTRACTED_FIELD_HEADER = "CamelKameletsExtractFieldName"; - - /** - * Default constructor - */ - public ExtractField() { - } - - /** - * Constructor using field member. - * @param field the field name to extract. - */ - public ExtractField(String field) { - this.field = field; - } - - @Override - public void process(Exchange ex) throws InvalidPayloadException { - ObjectMapper mapper = new ObjectMapper(); - JsonNode jsonNodeBody = ex.getMessage().getBody(JsonNode.class); - - if (jsonNodeBody == null) { - throw new InvalidPayloadException(ex, JsonNode.class); - - } - - Map body = mapper.convertValue(jsonNodeBody, new TypeReference>(){}); - if (!headerOutput || (strictHeaderCheck && checkHeaderExistence(ex))) { - ex.getMessage().setBody(body.get(field)); - } else { - extractToHeader(ex, body); - } - if (trimField) { - ex.setProperty("trimField", "true"); - } else { - ex.setProperty("trimField", "false"); - } - } - - private void extractToHeader(Exchange ex, Map body) { - if (headerOutputName == null || headerOutputName.isEmpty() || "none".equalsIgnoreCase(headerOutputName)) { - ex.getMessage().setHeader(EXTRACTED_FIELD_HEADER, body.get(field)); - } else { - ex.getMessage().setHeader(headerOutputName, body.get(field)); - } - } - - private boolean checkHeaderExistence(Exchange exchange) { - if (headerOutputName == null || headerOutputName.isEmpty() || "none".equalsIgnoreCase(headerOutputName)) { - return exchange.getMessage().getHeaders().containsKey(EXTRACTED_FIELD_HEADER); - } else { - return exchange.getMessage().getHeaders().containsKey(headerOutputName); - } - } - - public void setField(String field) { - this.field = field; - } - - public void setHeaderOutput(boolean headerOutput) { - this.headerOutput = headerOutput; - } - - public void setHeaderOutputName(String headerOutputName) { - this.headerOutputName = headerOutputName; - } - - public void setStrictHeaderCheck(boolean strictHeaderCheck) { - this.strictHeaderCheck = strictHeaderCheck; - } - - public void setTrimField(boolean trimField) { - this.trimField = trimField; - } -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/HoistField.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/HoistField.java deleted file mode 100644 index f92720427..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/HoistField.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.camel.Exchange; -import org.apache.camel.ExchangeProperty; -import org.apache.camel.InvalidPayloadException; - -import java.util.HashMap; -import java.util.Map; - -public class HoistField { - - public JsonNode process(@ExchangeProperty("field") String field, Exchange ex) throws InvalidPayloadException { - ObjectMapper mapper = new ObjectMapper(); - Object body = ex.getMessage().getBody(); - Map updatedBody = new HashMap<>(); - updatedBody.put(field, body); - return mapper.valueToTree(updatedBody); - } - -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/InsertField.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/InsertField.java deleted file mode 100644 index f7a491beb..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/InsertField.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; -import org.apache.camel.Exchange; -import org.apache.camel.InvalidPayloadException; -import org.apache.camel.Processor; -import org.apache.camel.support.LanguageSupport; - -public class InsertField implements Processor { - - String field; - String value; - - /** - * Default constructor. - */ - public InsertField() { - } - - /** - * Constructor using fields. - * @param field the field name to insert. - * @param value the value of the new field. - */ - public InsertField(String field, String value) { - this.field = field; - this.value = value; - } - - public void process(Exchange ex) throws InvalidPayloadException { - JsonNode body = ex.getMessage().getBody(JsonNode.class); - - if (body == null) { - throw new InvalidPayloadException(ex, JsonNode.class); - } - - String resolvedValue; - if (LanguageSupport.hasSimpleFunction(value)) { - resolvedValue = ex.getContext().resolveLanguage("simple").createExpression(value).evaluate(ex, String.class); - } else { - resolvedValue = value; - } - - switch (body.getNodeType()) { - case ARRAY: - ((ArrayNode) body).add(resolvedValue); - break; - case OBJECT: - ((ObjectNode) body).put(field, resolvedValue); - break; - default: - ((ObjectNode) body).put(field, resolvedValue); - break; - } - - ex.getMessage().setBody(body); - } - - public void setField(String field) { - this.field = field; - } - - public void setValue(String value) { - this.value = value; - } -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/MaskField.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/MaskField.java deleted file mode 100644 index 00adb6cb6..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/MaskField.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.camel.Exchange; -import org.apache.camel.ExchangeProperty; -import org.apache.camel.InvalidPayloadException; -import org.apache.camel.util.ObjectHelper; - -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.function.Function; -import java.util.stream.Collectors; - -public class MaskField { - - private static final Map, Function> MAPPING_FUNC = new HashMap<>(); - private static final Map, Object> BASIC_MAPPING = new HashMap<>(); - - static { - BASIC_MAPPING.put(Boolean.class, Boolean.FALSE); - BASIC_MAPPING.put(Byte.class, (byte) 0); - BASIC_MAPPING.put(Short.class, (short) 0); - BASIC_MAPPING.put(Integer.class, 0); - BASIC_MAPPING.put(Long.class, 0L); - BASIC_MAPPING.put(Float.class, 0f); - BASIC_MAPPING.put(Double.class, 0d); - BASIC_MAPPING.put(BigInteger.class, BigInteger.ZERO); - BASIC_MAPPING.put(BigDecimal.class, BigDecimal.ZERO); - BASIC_MAPPING.put(Date.class, new Date(0)); - BASIC_MAPPING.put(String.class, ""); - - MAPPING_FUNC.put(Byte.class, Byte::parseByte); - MAPPING_FUNC.put(Short.class, Short::parseShort); - MAPPING_FUNC.put(Integer.class, Integer::parseInt); - MAPPING_FUNC.put(Long.class, Long::parseLong); - MAPPING_FUNC.put(Float.class, Float::parseFloat); - MAPPING_FUNC.put(Double.class, Double::parseDouble); - MAPPING_FUNC.put(String.class, Function.identity()); - MAPPING_FUNC.put(BigDecimal.class, BigDecimal::new); - MAPPING_FUNC.put(BigInteger.class, BigInteger::new); - } - - public JsonNode process(@ExchangeProperty("fields") String fields, @ExchangeProperty("replacement") String replacement, Exchange ex) throws InvalidPayloadException { - ObjectMapper mapper = new ObjectMapper(); - List splittedFields = new ArrayList<>(); - JsonNode jsonNodeBody = ex.getMessage().getBody(JsonNode.class); - Map body = mapper.convertValue(jsonNodeBody, new TypeReference>(){}); - if (ObjectHelper.isNotEmpty(fields)) { - splittedFields = Arrays.stream(fields.split(",")).collect(Collectors.toList()); - } - - Map updatedBody = new HashMap<>(); - for (Map.Entry entry: - body.entrySet()) { - final String fieldName = (String) entry.getKey(); - final Object origFieldValue = entry.getValue(); - updatedBody.put(fieldName, filterNames(fieldName, splittedFields) ? masked(origFieldValue, replacement) : origFieldValue); - } - if (!updatedBody.isEmpty()) { - return mapper.valueToTree(updatedBody); - } else { - return mapper.valueToTree(body); - } - } - - boolean filterNames(String fieldName, List splittedFields) { - return splittedFields.contains(fieldName); - } - - private Object masked(Object value, String replacement) { - if (value == null) { - return null; - } - return replacement == null ? maskWithNullValue(value) : maskWithCustomReplacement(value, replacement); - } - - private static Object maskWithCustomReplacement(Object value, String replacement) { - Function replacementMapper = MAPPING_FUNC.get(value.getClass()); - if (replacementMapper == null) { - throw new IllegalArgumentException("Unable to mask value of type " + value.getClass() + " with custom replacement."); - } - try { - return replacementMapper.apply(replacement); - } catch (NumberFormatException ex) { - throw new IllegalArgumentException("Unable to convert " + replacement + " (" + replacement.getClass() + ") to number", ex); - } - } - - private static Object maskWithNullValue(Object value) { - Object maskedValue = BASIC_MAPPING.get(value.getClass()); - if (maskedValue == null) { - if (value instanceof List) - maskedValue = Collections.emptyList(); - else if (value instanceof Map) - maskedValue = Collections.emptyMap(); - else - throw new IllegalArgumentException("Unable to mask value of type: " + value.getClass()); - } - return maskedValue; - } -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/MessageTimestampRouter.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/MessageTimestampRouter.java deleted file mode 100644 index aac0c7f08..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/MessageTimestampRouter.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.TimeZone; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.camel.Exchange; -import org.apache.camel.ExchangeProperty; -import org.apache.camel.component.kafka.KafkaConstants; -import org.apache.camel.util.ObjectHelper; - -public class MessageTimestampRouter { - - public void process(@ExchangeProperty("topicFormat") String topicFormat, @ExchangeProperty("timestampFormat") String timestampFormat, @ExchangeProperty("timestampKeys") String timestampKeys, @ExchangeProperty("timestampKeyFormat") String timestampKeyFormat, Exchange ex) throws ParseException { - final Pattern TOPIC = Pattern.compile("$[topic]", Pattern.LITERAL); - - final Pattern TIMESTAMP = Pattern.compile("$[timestamp]", Pattern.LITERAL); - - final SimpleDateFormat fmt = new SimpleDateFormat(timestampFormat); - fmt.setTimeZone(TimeZone.getTimeZone("UTC")); - - ObjectMapper mapper = new ObjectMapper(); - List splittedKeys = new ArrayList<>(); - JsonNode jsonNodeBody = ex.getMessage().getBody(JsonNode.class); - Map body = mapper.convertValue(jsonNodeBody, new TypeReference>(){}); - if (ObjectHelper.isNotEmpty(timestampKeys)) { - splittedKeys = Arrays.stream(timestampKeys.split(",")).collect(Collectors.toList()); - } - - Object rawTimestamp = null; - String topicName = ex.getMessage().getHeader(KafkaConstants.TOPIC, String.class); - for (String key: - splittedKeys) { - if (ObjectHelper.isNotEmpty(key)) { - rawTimestamp = body.get(key); - break; - } - } - Long timestamp = null; - if (ObjectHelper.isNotEmpty(timestampKeyFormat) && ObjectHelper.isNotEmpty(rawTimestamp) && !timestampKeyFormat.equalsIgnoreCase("timestamp")) { - final SimpleDateFormat timestampKeyFmt = new SimpleDateFormat(timestampKeyFormat); - timestampKeyFmt.setTimeZone(TimeZone.getTimeZone("UTC")); - timestamp = timestampKeyFmt.parse((String) rawTimestamp).getTime(); - } else if (ObjectHelper.isNotEmpty(rawTimestamp)) { - timestamp = Long.parseLong(rawTimestamp.toString()); - } - if (ObjectHelper.isNotEmpty(timestamp)) { - final String formattedTimestamp = fmt.format(new Date(timestamp)); - String replace1; - String updatedTopic; - - if (ObjectHelper.isNotEmpty(topicName)) { - replace1 = TOPIC.matcher(topicFormat).replaceAll(Matcher.quoteReplacement(topicName)); - updatedTopic = TIMESTAMP.matcher(replace1).replaceAll(Matcher.quoteReplacement(formattedTimestamp)); - } else { - replace1 = TOPIC.matcher(topicFormat).replaceAll(Matcher.quoteReplacement("")); - updatedTopic = TIMESTAMP.matcher(replace1).replaceAll(Matcher.quoteReplacement(formattedTimestamp)); - } - ex.getMessage().setHeader(KafkaConstants.OVERRIDE_TOPIC, updatedTopic); - } - } - -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/RegexRouter.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/RegexRouter.java deleted file mode 100644 index c219f196a..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/RegexRouter.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import org.apache.camel.Exchange; -import org.apache.camel.ExchangeProperty; -import org.apache.camel.component.kafka.KafkaConstants; -import org.apache.camel.util.ObjectHelper; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class RegexRouter { - - public void process(@ExchangeProperty("regex") String regex, @ExchangeProperty("replacement") String replacement, Exchange ex) { - Pattern regexPattern = Pattern.compile(regex); - String topicName = ex.getMessage().getHeader(KafkaConstants.TOPIC, String.class); - if (ObjectHelper.isNotEmpty(topicName)) { - final Matcher matcher = regexPattern.matcher(topicName); - if (matcher.matches()) { - final String topicUpdated = matcher.replaceFirst(replacement); - ex.getMessage().setHeader(KafkaConstants.OVERRIDE_TOPIC, topicUpdated); - } - } - String ceType = ex.getMessage().getHeader("ce-type", String.class); - if (ObjectHelper.isNotEmpty(ceType)) { - final Matcher matcher = regexPattern.matcher(ceType); - if (matcher.matches()) { - final String ceTypeUpdated = matcher.replaceFirst(replacement); - ex.getMessage().setHeader("ce-type", ceTypeUpdated); - } - } - } - -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/ReplaceField.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/ReplaceField.java deleted file mode 100644 index a9b011663..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/ReplaceField.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.camel.Exchange; -import org.apache.camel.ExchangeProperty; -import org.apache.camel.InvalidPayloadException; -import org.apache.camel.util.ObjectHelper; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -public class ReplaceField { - - public JsonNode process(@ExchangeProperty("enabled") String enabled, @ExchangeProperty("disabled") String disabled, @ExchangeProperty("renames") String renames,Exchange ex) throws InvalidPayloadException { - ObjectMapper mapper = new ObjectMapper(); - List enabledFields = new ArrayList<>(); - List disabledFields = new ArrayList<>(); - List renameFields = new ArrayList<>(); - JsonNode jsonNodeBody = ex.getMessage().getBody(JsonNode.class); - Map body = mapper.convertValue(jsonNodeBody, new TypeReference>(){}); - if (ObjectHelper.isNotEmpty(enabled) && !enabled.equalsIgnoreCase("all")) { - enabledFields = Arrays.stream(enabled.split(",")).collect(Collectors.toList()); - } - if (ObjectHelper.isNotEmpty(disabled) && !disabled.equalsIgnoreCase("none")) { - disabledFields = Arrays.stream(disabled.split(",")).collect(Collectors.toList()); - } - if (ObjectHelper.isNotEmpty(disabled)) { - renameFields = Arrays.stream(renames.split(",")).collect(Collectors.toList()); - } - Map updatedBody = new HashMap<>(); - - if (ObjectHelper.isNotEmpty(renameFields)) { - Map renamingMap = parseNames(renameFields); - - for (Map.Entry entry : - body.entrySet()) { - final String fieldName = (String) entry.getKey(); - if (filterNames(fieldName, enabledFields, disabledFields)) { - final Object fieldValue = entry.getValue(); - updatedBody.put(renameOptional(fieldName, renamingMap), fieldValue); - } - } - } - if (!updatedBody.isEmpty()) { - return mapper.valueToTree(updatedBody); - } else { - return mapper.valueToTree(body); - } - } - - boolean filterNames(String fieldName, List enabledFields, List disabledFields) { - return !disabledFields.contains(fieldName) && (enabledFields.isEmpty() || enabledFields.contains(fieldName)); - } - - static Map parseNames(List mappings) { - final Map m = new HashMap<>(); - for (String mapping : mappings) { - final String[] parts = mapping.split(":"); - m.put(parts[0], parts[1]); - } - return m; - } - - String renameOptional(String fieldName, Map renames) { - final String mapping = renames.get(fieldName); - return mapping == null ? fieldName : mapping; - } - -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/TimestampRouter.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/TimestampRouter.java deleted file mode 100644 index f102bc3d9..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/TimestampRouter.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import java.text.SimpleDateFormat; -import java.time.Instant; -import java.util.Date; -import java.util.TimeZone; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.apache.camel.Exchange; -import org.apache.camel.ExchangeProperty; -import org.apache.camel.component.kafka.KafkaConstants; -import org.apache.camel.util.ObjectHelper; - -public class TimestampRouter { - - public void process(@ExchangeProperty("topicFormat") String topicFormat, @ExchangeProperty("timestampFormat") String timestampFormat, @ExchangeProperty("timestampHeaderName") String timestampHeaderName, Exchange ex) { - final Pattern TOPIC = Pattern.compile("$[topic]", Pattern.LITERAL); - - final Pattern TIMESTAMP = Pattern.compile("$[timestamp]", Pattern.LITERAL); - - final SimpleDateFormat fmt = new SimpleDateFormat(timestampFormat); - fmt.setTimeZone(TimeZone.getTimeZone("UTC")); - - Long timestamp = null; - String topicName = ex.getMessage().getHeader(KafkaConstants.TOPIC, String.class); - Object rawTimestamp = ex.getMessage().getHeader(timestampHeaderName); - if (rawTimestamp instanceof Long) { - timestamp = (Long) rawTimestamp; - } else if (rawTimestamp instanceof Instant) { - timestamp = ((Instant) rawTimestamp).toEpochMilli(); - } else if (ObjectHelper.isNotEmpty(rawTimestamp)) { - timestamp = Long.parseLong(rawTimestamp.toString()); - } - if (ObjectHelper.isNotEmpty(timestamp)) { - final String formattedTimestamp = fmt.format(new Date(timestamp)); - String replace1; - String updatedTopic; - - if (ObjectHelper.isNotEmpty(topicName)) { - replace1 = TOPIC.matcher(topicFormat).replaceAll(Matcher.quoteReplacement(topicName)); - updatedTopic = TIMESTAMP.matcher(replace1).replaceAll(Matcher.quoteReplacement(formattedTimestamp)); - } else { - replace1 = TOPIC.matcher(topicFormat).replaceAll(Matcher.quoteReplacement("")); - updatedTopic = TIMESTAMP.matcher(replace1).replaceAll(Matcher.quoteReplacement(formattedTimestamp)); - } - ex.getMessage().setHeader(KafkaConstants.OVERRIDE_TOPIC, updatedTopic); - } - } - -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/aws2/ddb/Ddb2JsonStructDataTypeTransformer.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/aws2/ddb/Ddb2JsonStructDataTypeTransformer.java deleted file mode 100644 index 0a204e0fb..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/aws2/ddb/Ddb2JsonStructDataTypeTransformer.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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.kamelets.utils.transform.aws2.ddb; - -import java.time.Instant; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import org.apache.camel.Message; -import org.apache.camel.kamelets.utils.serialization.gson.JavaTimeInstantTypeAdapter; -import org.apache.camel.spi.DataType; -import org.apache.camel.spi.DataTypeTransformer; -import org.apache.camel.spi.Transformer; - -@DataTypeTransformer(name = "aws2-ddb:application-x-struct", - description = "Transforms DynamoDB record into a Json node") -public class Ddb2JsonStructDataTypeTransformer extends Transformer { - - private final Gson gson = new GsonBuilder() - .registerTypeAdapter(Instant.class, new JavaTimeInstantTypeAdapter()) - .create(); - - @Override - public void transform(Message message, DataType fromType, DataType toType) { - if (message.getBody() instanceof String) { - return; - } - - message.setBody(gson.toJson(message.getBody())); - } -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/BatchManualCommit.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/BatchManualCommit.java deleted file mode 100644 index f6d7d8412..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/BatchManualCommit.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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.kamelets.utils.transform.kafka; - -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.apache.camel.component.kafka.KafkaConstants; -import org.apache.camel.component.kafka.consumer.KafkaManualCommit; - -import java.util.List; - -public class BatchManualCommit implements Processor { - - @Override - public void process(Exchange exchange) throws Exception { - List exchanges = exchange.getMessage().getBody(List.class); - if (exchanges.size() > 0) { - final Object tmp = exchanges.get(exchanges.size() - 1); - if (tmp instanceof Exchange element) { - KafkaManualCommit manual - = element.getMessage().getHeader(KafkaConstants.MANUAL_COMMIT, KafkaManualCommit.class); - if (manual != null) { - manual.commit(); - } - } - } - } -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/ManualCommit.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/ManualCommit.java deleted file mode 100644 index 3fa21eb6e..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/ManualCommit.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.kamelets.utils.transform.kafka; - -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.apache.camel.component.kafka.KafkaConstants; -import org.apache.camel.component.kafka.consumer.KafkaManualCommit; - -public class ManualCommit implements Processor { - - @Override - public void process(Exchange exchange) throws Exception { - KafkaManualCommit manual = exchange.getMessage().getHeader(KafkaConstants.MANUAL_COMMIT, KafkaManualCommit.class); - if (manual != null) { - manual.commit(); - } - } -} diff --git a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/ValueToKey.java b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/ValueToKey.java deleted file mode 100644 index bc5af6ebf..000000000 --- a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/ValueToKey.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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.kamelets.utils.transform.kafka; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.camel.Exchange; -import org.apache.camel.ExchangeProperty; -import org.apache.camel.InvalidPayloadException; -import org.apache.camel.component.kafka.KafkaConstants; -import org.apache.camel.util.ObjectHelper; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -public class ValueToKey { - - public void process(@ExchangeProperty("fields") String fields, Exchange ex) throws InvalidPayloadException { - List splittedFields = new ArrayList<>(); - ObjectMapper mapper = new ObjectMapper(); - JsonNode jsonNodeBody = ex.getMessage().getBody(JsonNode.class); - Map body = mapper.convertValue(jsonNodeBody, new TypeReference>(){}); - if (ObjectHelper.isNotEmpty(fields)) { - splittedFields = Arrays.stream(fields.split(",")).collect(Collectors.toList()); - } - Map key = new HashMap<>(); - for (Map.Entry entry: - body.entrySet()) { - final String fieldName = (String) entry.getKey(); - if (filterNames(fieldName, splittedFields)) { - final Object fieldValue = entry.getValue(); - key.put(entry.getKey(), fieldValue); - } - } - - ex.getMessage().setHeader(KafkaConstants.KEY, key); - } - - boolean filterNames(String fieldName, List splittedFields) { - return splittedFields.contains(fieldName); - } -} diff --git a/library/camel-kamelets-utils/src/main/resources/META-INF/services/org/apache/camel/transformer/aws2-ddb-application-x-struct b/library/camel-kamelets-utils/src/main/resources/META-INF/services/org/apache/camel/transformer/aws2-ddb-application-x-struct deleted file mode 100644 index 32bb47c16..000000000 --- a/library/camel-kamelets-utils/src/main/resources/META-INF/services/org/apache/camel/transformer/aws2-ddb-application-x-struct +++ /dev/null @@ -1 +0,0 @@ -class=org.apache.camel.kamelets.utils.transform.aws2.ddb.Ddb2JsonStructDataTypeTransformer diff --git a/library/camel-kamelets-utils/src/main/resources/META-INF/services/org/apache/camel/transformer/aws2-ddb-application-x-struct.json b/library/camel-kamelets-utils/src/main/resources/META-INF/services/org/apache/camel/transformer/aws2-ddb-application-x-struct.json deleted file mode 100644 index c69ebae18..000000000 --- a/library/camel-kamelets-utils/src/main/resources/META-INF/services/org/apache/camel/transformer/aws2-ddb-application-x-struct.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "transformer": { - "kind": "transformer", - "name": "aws2-ddb:application-x-struct", - "title": "Aws2 Ddb (Application Json Struct)", - "description": "Transforms DynamoDB record into a Json node", - "deprecated": false, - "javaType": "org.apache.camel.kamelets.utils.transform.aws2.ddb.Ddb2JsonStructDataTypeTransformer", - "groupId": "org.apache.camel", - "artifactId": "camel-aws2-ddb", - "version": "4.6.0-SNAPSHOT" - } -} diff --git a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/serialization/kafka/KafkaHeaderDeserializerTest.java b/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/serialization/kafka/KafkaHeaderDeserializerTest.java deleted file mode 100644 index 37d34291d..000000000 --- a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/serialization/kafka/KafkaHeaderDeserializerTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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.kamelets.utils.serialization.kafka; - -import java.nio.charset.StandardCharsets; -import java.util.Arrays; - -import org.apache.camel.Exchange; -import org.apache.camel.impl.DefaultCamelContext; -import org.apache.camel.spi.TypeConverterRegistry; -import org.apache.camel.support.DefaultExchange; -import org.apache.camel.support.SimpleTypeConverter; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -class KafkaHeaderDeserializerTest { - - private DefaultCamelContext camelContext; - - private final KafkaHeaderDeserializer processor = new KafkaHeaderDeserializer(); - - @BeforeEach - void setup() { - this.camelContext = new DefaultCamelContext(); - } - - @Test - void shouldDeserializeHeaders() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setHeader("foo", "bar"); - exchange.getMessage().setHeader("fooBytes", "barBytes".getBytes(StandardCharsets.UTF_8)); - exchange.getMessage().setHeader("fooNull", null); - exchange.getMessage().setHeader("number", 1L); - - processor.enabled = true; - processor.process(exchange); - - Assertions.assertTrue(exchange.getMessage().hasHeaders()); - Assertions.assertEquals("bar", exchange.getMessage().getHeader("foo")); - Assertions.assertEquals("barBytes", exchange.getMessage().getHeader("fooBytes")); - Assertions.assertTrue(exchange.getMessage().getHeaders().containsKey("fooNull")); - Assertions.assertNull(exchange.getMessage().getHeader("fooNull")); - Assertions.assertEquals("1", exchange.getMessage().getHeader("number")); - } - - @Test - void shouldNotDeserializeHeadersWhenDisabled() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setHeader("foo", "bar"); - exchange.getMessage().setHeader("fooBytes", "barBytes".getBytes(StandardCharsets.UTF_8)); - - processor.enabled = false; - processor.process(exchange); - - Assertions.assertTrue(exchange.getMessage().hasHeaders()); - Assertions.assertEquals("bar", exchange.getMessage().getHeader("foo")); - Assertions.assertTrue(exchange.getMessage().getHeader("fooBytes") instanceof byte[]); - Assertions.assertEquals(Arrays.toString("barBytes".getBytes(StandardCharsets.UTF_8)), Arrays.toString((byte[]) exchange.getMessage().getHeader("fooBytes"))); - } -} diff --git a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/ExtractFieldTest.java b/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/ExtractFieldTest.java deleted file mode 100644 index 95fcbe88c..000000000 --- a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/ExtractFieldTest.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.camel.Exchange; -import org.apache.camel.impl.DefaultCamelContext; -import org.apache.camel.support.DefaultExchange; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -class ExtractFieldTest { - - private DefaultCamelContext camelContext; - - private final ObjectMapper mapper = new ObjectMapper(); - - private ExtractField processor; - - private final String baseJson = "{" + "\n" + - " \"name\" : \"Rajesh Koothrappali\"" + "\n" + - "}"; - - @BeforeEach - void setup() { - camelContext = new DefaultCamelContext(); - processor = new ExtractField(); - } - - @Test - void shouldExtractFieldFromJsonNode() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - processor.setField("name"); - processor.process(exchange); - - Assertions.assertEquals("Rajesh Koothrappali", exchange.getMessage().getBody(String.class)); - } - - @Test - void shouldExtractFieldToHeader() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - processor.setField("name"); - processor.setHeaderOutput(true); - processor.setHeaderOutputName("name"); - processor.process(exchange); - - Assertions.assertEquals(baseJson, exchange.getMessage().getBody(String.class)); - Assertions.assertEquals("Rajesh Koothrappali", exchange.getMessage().getHeader("name")); - } - - @Test - void shouldExtractFieldToHeaderWithStrictHeaderCheck() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - processor.setField("name"); - processor.setHeaderOutput(true); - processor.setHeaderOutputName("name"); - processor.setStrictHeaderCheck(true); - processor.process(exchange); - - Assertions.assertEquals(baseJson, exchange.getMessage().getBody(String.class)); - Assertions.assertEquals("Rajesh Koothrappali", exchange.getMessage().getHeader("name")); - - exchange.getMessage().setHeader("name", "somethingElse"); - - processor.process(exchange); - - Assertions.assertEquals("Rajesh Koothrappali", exchange.getMessage().getBody(String.class)); - Assertions.assertEquals("somethingElse", exchange.getMessage().getHeader("name")); - } - - @Test - void shouldExtractFieldToDefaultHeader() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - processor.setField("name"); - processor.setHeaderOutput(true); - processor.process(exchange); - - Assertions.assertEquals(baseJson, exchange.getMessage().getBody(String.class)); - Assertions.assertEquals("Rajesh Koothrappali", exchange.getMessage().getHeader(ExtractField.EXTRACTED_FIELD_HEADER)); - - exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - processor.setHeaderOutputName("none"); - processor.process(exchange); - - Assertions.assertEquals(baseJson, exchange.getMessage().getBody(String.class)); - Assertions.assertEquals("Rajesh Koothrappali", exchange.getMessage().getHeader(ExtractField.EXTRACTED_FIELD_HEADER)); - } - - @Test - void shouldExtractFieldWithT() throws Exception { - final String baseJson = "{\"id\":\"1\",\"message\":\"Camel\\\\tRocks\"}"; - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - processor.setField("message"); - processor.setTrimField(true); - processor.process(exchange); - - Assertions.assertEquals("Camel\\tRocks", exchange.getMessage().getBody()); - } - -} diff --git a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/HoistFieldTest.java b/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/HoistFieldTest.java deleted file mode 100644 index eb912eb1b..000000000 --- a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/HoistFieldTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.camel.Exchange; -import org.apache.camel.impl.DefaultCamelContext; -import org.apache.camel.support.DefaultExchange; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -class HoistFieldTest { - - private DefaultCamelContext camelContext; - - private final ObjectMapper mapper = new ObjectMapper(); - - private HoistField processor; - - private final String baseJson = "{" + "\n" + - " \"name\" : \"Rajesh Koothrappali\"" + "\n" + - "}"; - - @BeforeEach - void setup() { - camelContext = new DefaultCamelContext(); - processor = new HoistField(); - } - - @Test - void shouldHoistField() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - JsonNode s = processor.process("element", exchange); - Assertions.assertEquals("{" + "\"element\"" + ":" + "{" + - "\"name\":\"Rajesh Koothrappali\"" + - "}" + "}" , s.toString()); - } -} diff --git a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/InsertFieldTest.java b/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/InsertFieldTest.java deleted file mode 100644 index 9719aa118..000000000 --- a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/InsertFieldTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.camel.Exchange; -import org.apache.camel.impl.DefaultCamelContext; -import org.apache.camel.support.DefaultExchange; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -class InsertFieldTest { - - private DefaultCamelContext camelContext; - - private final ObjectMapper mapper = new ObjectMapper(); - - private InsertField processor; - - private final String baseJson = "{" + - "\"name\":\"Rajesh Koothrappali\"" + - "}"; - - @BeforeEach - void setup() { - camelContext = new DefaultCamelContext(); - processor = new InsertField(); - } - @Test - void shouldAddFieldToPlainJson() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - processor = new InsertField("age", "29"); - processor.process(exchange); - - Assertions.assertEquals(exchange.getMessage().getBody(String.class), "{" + "\n" + - " \"name\" : \"Rajesh Koothrappali\"," + "\n" + - " \"age\" : \"29\"" + "\n" + - "}"); - } - - @Test - void shouldAddFieldToArrayJson() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - String arrayJson = "[\"batman\",\"spiderman\",\"wonderwoman\"]"; - exchange.getMessage().setBody(mapper.readTree(arrayJson)); - - processor.setValue("green lantern"); - processor.process(exchange); - - Assertions.assertEquals(exchange.getMessage().getBody(String.class), - "[ \"batman\", \"spiderman\", \"wonderwoman\", \"green lantern\" ]"); - } -} diff --git a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/MaskFieldTest.java b/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/MaskFieldTest.java deleted file mode 100644 index 6aa48e8f7..000000000 --- a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/MaskFieldTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.camel.Exchange; -import org.apache.camel.impl.DefaultCamelContext; -import org.apache.camel.support.DefaultExchange; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -class MaskFieldTest { - - private DefaultCamelContext camelContext; - - private final ObjectMapper mapper = new ObjectMapper(); - - private MaskField processor; - - private final String baseJson = "{" + "\n" + - " \"name\" : \"Rajesh Koothrappali\"" + "\n" + - "}"; - - @BeforeEach - void setup() { - camelContext = new DefaultCamelContext(); - processor = new MaskField(); - } - - @Test - void shouldMaskField() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - JsonNode s = processor.process("name", "xxxx", exchange); - Assertions.assertEquals("\"xxxx\"" , s.get("name").toString()); - } - - @Test - void shouldMaskFieldWithNull() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - JsonNode s = processor.process("name", null, exchange); - Assertions.assertEquals("\"\"" , s.get("name").toString()); - } - - @Test - void shouldMaskFieldList() throws Exception { - Map> names = new HashMap<>(); - Exchange exchange = new DefaultExchange(camelContext); - List els = new ArrayList<>(); - els.add("Sheldon"); - els.add("Rajesh"); - els.add("Leonard"); - names.put("names", els); - - exchange.getMessage().setBody(mapper.writeValueAsString(names)); - - JsonNode s = processor.process("names", null, exchange); - Assertions.assertEquals("[]" , s.get("names").toString()); - } -} diff --git a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/RegexRouterTest.java b/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/RegexRouterTest.java deleted file mode 100644 index ed8f775a0..000000000 --- a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/RegexRouterTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import org.apache.camel.Exchange; -import org.apache.camel.component.kafka.KafkaConstants; -import org.apache.camel.impl.DefaultCamelContext; -import org.apache.camel.support.DefaultExchange; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -class RegexRouterTest { - - private DefaultCamelContext camelContext; - - private RegexRouter processor; - - private final String topic = "hello"; - - @BeforeEach - void setup() { - camelContext = new DefaultCamelContext(); - processor = new RegexRouter(); - } - - @Test - void shouldReplaceFieldToPlainJson() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setHeader(KafkaConstants.TOPIC, topic); - - processor.process(".*ll.*","newTopic", exchange); - - Assertions.assertEquals("newTopic", exchange.getMessage().getHeader(KafkaConstants.OVERRIDE_TOPIC)); - } -} diff --git a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/ReplaceFieldTest.java b/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/ReplaceFieldTest.java deleted file mode 100644 index 5a6e06e72..000000000 --- a/library/camel-kamelets-utils/src/test/java/org/apache/camel/kamelets/utils/transform/ReplaceFieldTest.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * 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.kamelets.utils.transform; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.camel.Exchange; -import org.apache.camel.impl.DefaultCamelContext; -import org.apache.camel.support.DefaultExchange; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -class ReplaceFieldTest { - - private DefaultCamelContext camelContext; - - private final ObjectMapper mapper = new ObjectMapper(); - - private ReplaceField processor; - - private final String baseJson = "{" + "\n" + - " \"name\" : \"Rajesh Koothrappali\"," + "\n" + - " \"age\" : \"29\"" + "\n" + - "}"; - - @BeforeEach - void setup() { - camelContext = new DefaultCamelContext(); - processor = new ReplaceField(); - } - - @Test - void shouldReplaceFieldToPlainJson() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - JsonNode node = processor.process("all", "none", "name:firstName,age:years", exchange); - - Assertions.assertEquals(node.toString(), "{" + - "\"firstName\":\"Rajesh Koothrappali\"," + - "\"years\":\"29\"" + - "}"); - } - - @Test - void shouldReplaceFieldWithSpecificRename() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - JsonNode node = processor.process("name,age", "none", "name:firstName", exchange); - - Assertions.assertEquals(node.toString(), "{" + - "\"firstName\":\"Rajesh Koothrappali\"," + - "\"age\":\"29\"" + - "}"); - } - - @Test - void shouldReplaceFieldWithSpecificRenameAndDisableFields() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - JsonNode node = processor.process("name", "none", "name:firstName", exchange); - - Assertions.assertEquals(node.toString(), "{" + - "\"firstName\":\"Rajesh Koothrappali\"" + - "}"); - } - - @Test - void shouldReplaceFieldWithSpecificDisableFields() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - JsonNode node = processor.process("all", "name,age", "name:firstName", exchange); - - Assertions.assertEquals(node.toString(), "{" + - "\"name\":\"Rajesh Koothrappali\"," + - "\"age\":\"29\"" + - "}"); - } - - @Test - void shouldReplaceFieldWithDisableAllFields() throws Exception { - Exchange exchange = new DefaultExchange(camelContext); - - exchange.getMessage().setBody(mapper.readTree(baseJson)); - - JsonNode node = processor.process("none", "all", "name:firstName", exchange); - - Assertions.assertEquals(node.toString(), "{" + - "\"name\":\"Rajesh Koothrappali\"," + - "\"age\":\"29\"" + - "}"); - } -} diff --git a/library/camel-kamelets-utils/src/test/resources/log4j2-test.xml b/library/camel-kamelets-utils/src/test/resources/log4j2-test.xml deleted file mode 100644 index 1d6d8f383..000000000 --- a/library/camel-kamelets-utils/src/test/resources/log4j2-test.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-sink.kamelet.yaml index 8a27c8e73..206c07653 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-sink.kamelet.yaml @@ -159,7 +159,7 @@ spec: type: object description: Attribute value map specifies all attributes to change with the given operation. dependencies: - - mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT + - - "camel:core" - "camel:jackson" - "camel:aws2-ddb" diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-streams-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-streams-source.kamelet.yaml index f9ee1f0c8..57c2d32f5 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-streams-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-streams-source.kamelet.yaml @@ -155,7 +155,7 @@ spec: description: The exchange creation timestamp as event time. type: string dependencies: - - mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT + - - "camel:gson" - "camel:aws2-ddb" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-source.kamelet.yaml index 0f9ec0bbd..4cac85d8b 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-source.kamelet.yaml @@ -129,7 +129,7 @@ spec: - "camel:aws2-kinesis" - "camel:kamelet" - "camel:core" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: from: uri: aws2-kinesis:{{stream}} diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-source.kamelet.yaml index 6d4a0009c..f51d6287c 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-source.kamelet.yaml @@ -212,7 +212,7 @@ spec: dependencies: - "camel:core" - "camel:aws2-s3" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" template: from: diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml index f2cd16722..da63a4b00 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml @@ -227,7 +227,7 @@ spec: dependencies: - "camel:core" - "camel:aws2-sqs" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" template: from: diff --git a/library/camel-kamelets/src/main/resources/kamelets/azure-storage-blob-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-blob-source.kamelet.yaml index b3dda18db..52eca2d13 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/azure-storage-blob-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-blob-source.kamelet.yaml @@ -149,7 +149,7 @@ spec: - "camel:core" - "camel:jsonpath" - "camel:timer" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: from: uri: "azure-storage-blob:{{accountName}}/{{containerName}}" diff --git a/library/camel-kamelets/src/main/resources/kamelets/azure-storage-datalake-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-datalake-sink.kamelet.yaml index 297c148ce..ef7c467a6 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/azure-storage-datalake-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-datalake-sink.kamelet.yaml @@ -85,7 +85,7 @@ spec: - "camel:kamelet" - "camel:core" - "camel:timer" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: from: uri: "kamelet:source" diff --git a/library/camel-kamelets/src/main/resources/kamelets/azure-storage-datalake-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-datalake-source.kamelet.yaml index c8f2aacf9..d618e90e6 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/azure-storage-datalake-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-datalake-source.kamelet.yaml @@ -231,7 +231,7 @@ spec: - "camel:kamelet" - "camel:core" - "camel:timer" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: from: uri: "azure-storage-datalake:{{accountName}}/{{fileSystemName}}" diff --git a/library/camel-kamelets/src/main/resources/kamelets/azure-storage-queue-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-queue-source.kamelet.yaml index 7a4f40f6f..bebf4002b 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/azure-storage-queue-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-queue-source.kamelet.yaml @@ -133,7 +133,7 @@ spec: dependencies: - "camel:azure-storage-queue" - "camel:kamelet" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" template: from: diff --git a/library/camel-kamelets/src/main/resources/kamelets/djl-image-to-text-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/djl-image-to-text-action.kamelet.yaml index 085224ea2..db3422d62 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/djl-image-to-text-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/djl-image-to-text-action.kamelet.yaml @@ -40,7 +40,7 @@ spec: - "mvn:ai.djl.pytorch:pytorch-model-zoo:0.29.0" - "mvn:net.sf.extjwnl:extjwnl:2.0.5" - "mvn:net.sf.extjwnl:extjwnl-data-wn31:1.2" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kamelet" - "camel:jackson" diff --git a/library/camel-kamelets/src/main/resources/kamelets/drop-field-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/drop-field-action.kamelet.yaml index 3efdce5a3..902db105a 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/drop-field-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/drop-field-action.kamelet.yaml @@ -45,7 +45,7 @@ spec: type: string type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:jackson" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/extract-field-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/extract-field-action.kamelet.yaml index 177d57a8d..7aef2d8bd 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/extract-field-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/extract-field-action.kamelet.yaml @@ -74,7 +74,7 @@ spec: default: false type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" - "camel:jackson" diff --git a/library/camel-kamelets/src/main/resources/kamelets/google-sheets-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/google-sheets-sink.kamelet.yaml index 0f5f5b5da..5756e6b4e 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/google-sheets-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/google-sheets-sink.kamelet.yaml @@ -146,7 +146,7 @@ spec: type: string mediaType: application/json dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:jackson" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/hoist-field-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/hoist-field-action.kamelet.yaml index 2fe78dd1f..54274130a 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/hoist-field-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/hoist-field-action.kamelet.yaml @@ -40,7 +40,7 @@ spec: type: string type: object dependencies: - - mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT + - - "camel:core" - "camel:jackson" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/insert-field-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/insert-field-action.kamelet.yaml index 63a8fd5fd..c653adbf5 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/insert-field-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/insert-field-action.kamelet.yaml @@ -50,7 +50,7 @@ spec: type: string type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:jackson" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/json-deserialize-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/json-deserialize-action.kamelet.yaml index a62749455..625f54788 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/json-deserialize-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/json-deserialize-action.kamelet.yaml @@ -33,7 +33,7 @@ spec: description: "Deserialize payload to JSON" type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" - "camel:jackson" diff --git a/library/camel-kamelets/src/main/resources/kamelets/json-serialize-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/json-serialize-action.kamelet.yaml index e32ec229c..86a5f5af9 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/json-serialize-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/json-serialize-action.kamelet.yaml @@ -33,7 +33,7 @@ spec: description: "Serialize payload to JSON" type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" - "camel:jackson" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-apicurio-registry-not-secured-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-apicurio-registry-not-secured-source.kamelet.yaml index 04bc00a83..bc69a4945 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-apicurio-registry-not-secured-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-apicurio-registry-not-secured-source.kamelet.yaml @@ -106,7 +106,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-azure-schema-registry-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-azure-schema-registry-sink.kamelet.yaml index 5df28f250..310084efa 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-azure-schema-registry-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-azure-schema-registry-sink.kamelet.yaml @@ -90,7 +90,7 @@ spec: type: string example: "com.example.Order" dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-azure-schema-registry-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-azure-schema-registry-source.kamelet.yaml index da8f1234e..9692d44de 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-azure-schema-registry-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-azure-schema-registry-source.kamelet.yaml @@ -131,7 +131,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-apicurio-registry-not-secured-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-apicurio-registry-not-secured-source.kamelet.yaml index b08bfb300..0f8fa9954 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-apicurio-registry-not-secured-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-apicurio-registry-not-secured-source.kamelet.yaml @@ -125,7 +125,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-apicurio-registry-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-apicurio-registry-source.kamelet.yaml index 0e9648d53..e3539afc0 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-apicurio-registry-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-apicurio-registry-source.kamelet.yaml @@ -166,7 +166,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-azure-schema-registry-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-azure-schema-registry-source.kamelet.yaml index 34b3848f5..94e1f58cd 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-azure-schema-registry-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-azure-schema-registry-source.kamelet.yaml @@ -145,7 +145,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-manual-commit-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-manual-commit-action.kamelet.yaml index 355c16f36..cd3fc5a09 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-manual-commit-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-manual-commit-action.kamelet.yaml @@ -33,7 +33,7 @@ spec: description: "Manually commit Kafka Batch Offset" type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" template: from: diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-not-secured-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-not-secured-source.kamelet.yaml index 124038aa0..5fe7d7062 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-not-secured-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-not-secured-source.kamelet.yaml @@ -107,7 +107,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-scram-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-scram-source.kamelet.yaml index f7b7ba69d..2818c11f6 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-scram-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-scram-source.kamelet.yaml @@ -138,7 +138,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-source.kamelet.yaml index b9d36c063..d3f76ad4b 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-source.kamelet.yaml @@ -138,7 +138,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-ssl-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-ssl-source.kamelet.yaml index 9ddcee3e1..364d8a606 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-ssl-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-batch-ssl-source.kamelet.yaml @@ -162,7 +162,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-manual-commit-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-manual-commit-action.kamelet.yaml index ec03507b0..5e131a4c0 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-manual-commit-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-manual-commit-action.kamelet.yaml @@ -33,7 +33,7 @@ spec: description: "Manually commit Kafka Offset" type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" template: from: diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-apicurio-registry-json-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-apicurio-registry-json-source.kamelet.yaml index c19140864..ad213e9c4 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-apicurio-registry-json-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-apicurio-registry-json-source.kamelet.yaml @@ -147,7 +147,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-apicurio-registry-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-apicurio-registry-source.kamelet.yaml index 5f36d8d7a..af069afc8 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-apicurio-registry-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-apicurio-registry-source.kamelet.yaml @@ -152,7 +152,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-sink.kamelet.yaml index 2f6020ae9..6cbc12790 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-sink.kamelet.yaml @@ -56,7 +56,7 @@ spec: dependencies: - "camel:core" - "camel:kafka" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" template: from: diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-source.kamelet.yaml index 8f67edeaa..dc83f7317 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-not-secured-source.kamelet.yaml @@ -93,7 +93,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kafka" - "camel:core" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-scram-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-scram-source.kamelet.yaml index de228f15b..2e977f7ef 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-scram-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-scram-source.kamelet.yaml @@ -124,7 +124,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-source.kamelet.yaml index 4391c4b88..cf2362813 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-source.kamelet.yaml @@ -124,7 +124,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/kafka-ssl-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/kafka-ssl-source.kamelet.yaml index 534e8b011..6cf7c93a9 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/kafka-ssl-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/kafka-ssl-source.kamelet.yaml @@ -148,7 +148,7 @@ spec: type: boolean default: false dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:kafka" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/mask-field-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/mask-field-action.kamelet.yaml index 8aa01d6eb..f8bdaf50a 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/mask-field-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/mask-field-action.kamelet.yaml @@ -45,7 +45,7 @@ spec: type: string type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:jackson" - "camel:kamelet" - "camel:core" diff --git a/library/camel-kamelets/src/main/resources/kamelets/message-timestamp-router-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/message-timestamp-router-action.kamelet.yaml index 589c3d904..c3ff77c1d 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/message-timestamp-router-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/message-timestamp-router-action.kamelet.yaml @@ -55,7 +55,7 @@ spec: default: "timestamp" type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:jackson" - "camel:kamelet" - "camel:core" diff --git a/library/camel-kamelets/src/main/resources/kamelets/mongodb-changes-stream-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/mongodb-changes-stream-source.kamelet.yaml index 310c1ce17..c051a83c3 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/mongodb-changes-stream-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/mongodb-changes-stream-source.kamelet.yaml @@ -82,7 +82,7 @@ spec: - "camel:kamelet" - "camel:mongodb" - "camel:jackson" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: beans: - name: local-mongodb diff --git a/library/camel-kamelets/src/main/resources/kamelets/mongodb-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/mongodb-sink.kamelet.yaml index 4e8b6ac21..556826211 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/mongodb-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/mongodb-sink.kamelet.yaml @@ -95,7 +95,7 @@ spec: - "camel:kamelet" - "camel:mongodb" - "camel:jackson" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: beans: - name: local-mongodb diff --git a/library/camel-kamelets/src/main/resources/kamelets/mongodb-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/mongodb-source.kamelet.yaml index afc534b54..edc599275 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/mongodb-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/mongodb-source.kamelet.yaml @@ -92,7 +92,7 @@ spec: - "camel:kamelet" - "camel:mongodb" - "camel:jackson" - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" template: beans: - name: local-mongodb diff --git a/library/camel-kamelets/src/main/resources/kamelets/protobuf-deserialize-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/protobuf-deserialize-action.kamelet.yaml index fb5d9769a..c9356fb98 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/protobuf-deserialize-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/protobuf-deserialize-action.kamelet.yaml @@ -39,7 +39,7 @@ spec: type: string example: 'message Person { required string first = 1; required string last = 2; }' dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" - "camel:jackson-protobuf" diff --git a/library/camel-kamelets/src/main/resources/kamelets/protobuf-serialize-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/protobuf-serialize-action.kamelet.yaml index 454b823eb..dfb62be86 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/protobuf-serialize-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/protobuf-serialize-action.kamelet.yaml @@ -39,7 +39,7 @@ spec: type: string example: 'message Person { required string first = 1; required string last = 2; }' dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" - "camel:jackson-protobuf" diff --git a/library/camel-kamelets/src/main/resources/kamelets/regex-router-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/regex-router-action.kamelet.yaml index d31c1b46c..4ea579fef 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/regex-router-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/regex-router-action.kamelet.yaml @@ -45,7 +45,7 @@ spec: type: string type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" template: diff --git a/library/camel-kamelets/src/main/resources/kamelets/replace-field-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/replace-field-action.kamelet.yaml index 00f646970..c946aff59 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/replace-field-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/replace-field-action.kamelet.yaml @@ -65,7 +65,7 @@ spec: in: mediaType: application/json dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:jackson" - "camel:kamelet" diff --git a/library/camel-kamelets/src/main/resources/kamelets/resolve-pojo-schema-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/resolve-pojo-schema-action.kamelet.yaml index d681bfd38..10b21292e 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/resolve-pojo-schema-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/resolve-pojo-schema-action.kamelet.yaml @@ -55,7 +55,7 @@ spec: type: string example: "application/json" dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" - "camel:jackson-avro" diff --git a/library/camel-kamelets/src/main/resources/kamelets/timestamp-router-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/timestamp-router-action.kamelet.yaml index bf92edb2d..cd9d216ea 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/timestamp-router-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/timestamp-router-action.kamelet.yaml @@ -49,7 +49,7 @@ spec: default: "kafka.TIMESTAMP" type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:kamelet" - "camel:core" template: diff --git a/library/camel-kamelets/src/main/resources/kamelets/value-to-key-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/value-to-key-action.kamelet.yaml index f0564a2d8..c77298c28 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/value-to-key-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/value-to-key-action.kamelet.yaml @@ -40,7 +40,7 @@ spec: type: string type: object dependencies: - - "mvn:org.apache.camel.kamelets:camel-kamelets-utils:4.9.0-SNAPSHOT" + - "" - "camel:core" - "camel:jackson" - "camel:kamelet" diff --git a/pom.xml b/pom.xml index 1279ca908..acf1864de 100644 --- a/pom.xml +++ b/pom.xml @@ -38,7 +38,6 @@ library/camel-kamelets library/camel-kamelets-catalog library/kamelets-maven-plugin - library/camel-kamelets-utils library/camel-kamelets-bom tests/camel-kamelets-itest diff --git a/update-kamelets.xml b/update-kamelets.xml index 61ae01ff9..f1423ee98 100644 --- a/update-kamelets.xml +++ b/update-kamelets.xml @@ -29,7 +29,7 @@ - +