You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/12/24 08:02:24 UTC

[camel-quarkus] branch main updated (2d5f335 -> 7ce5eba)

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

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


    from 2d5f335  Manage Eclipse jgit version and jzlib version Fixes #3414
     new 189af5f  Added Json-Patch Extension
     new 0f82445  Added Json-Patch Extension
     new 6f5b6b7  Added Json-Patch Extension
     new c5dc28b  Added Json-Patch Extension
     new 7e6a9ce  Added Json-Patch Extension
     new 7ce5eba  Added Json-Patch Extension

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


Summary of changes:
 catalog/pom.xml                                    | 13 +++++++++
 .../ROOT/examples/components/json-patch.yml        | 13 +++++++++
 docs/modules/ROOT/nav.adoc                         |  1 +
 .../extensions/{asterisk.adoc => json-patch.adoc}  | 16 +++++------
 .../json-patch/deployment/pom.xml                  | 14 +++++-----
 .../json/patch/deployment/JsonPatchProcessor.java} |  8 +++---
 .../json-patch/pom.xml                             |  8 +++---
 .../json-patch/runtime/pom.xml                     | 32 ++++++++++++----------
 .../main/resources/META-INF/quarkus-extension.yaml |  6 ++--
 extensions-jvm/pom.xml                             |  1 +
 .../{splunk-hec => json-patch}/pom.xml             | 15 +++++-----
 .../json/patch/it/JsonPatchResource.java}          | 20 +++++++-------
 .../component/json/patch/it/JsonPatchTest.java}    |  8 +++---
 integration-tests-jvm/pom.xml                      |  1 +
 poms/bom/pom.xml                                   | 15 ++++++++++
 15 files changed, 109 insertions(+), 62 deletions(-)
 create mode 100644 docs/modules/ROOT/examples/components/json-patch.yml
 copy docs/modules/ROOT/pages/reference/extensions/{asterisk.adoc => json-patch.adoc} (57%)
 copy tooling/create-extension-templates/deployment-pom.xml => extensions-jvm/json-patch/deployment/pom.xml (83%)
 copy extensions-jvm/{xslt-saxon/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/saxon/deployment/XsltSaxonProcessor.java => json-patch/deployment/src/main/java/org/apache/camel/quarkus/component/json/patch/deployment/JsonPatchProcessor.java} (88%)
 copy tooling/create-extension-templates/parent-pom.xml => extensions-jvm/json-patch/pom.xml (86%)
 copy tooling/create-extension-templates/runtime-pom.xml => extensions-jvm/json-patch/runtime/pom.xml (81%)
 copy extensions-jvm/{aws-xray => json-patch}/runtime/src/main/resources/META-INF/quarkus-extension.yaml (88%)
 copy integration-tests-jvm/{splunk-hec => json-patch}/pom.xml (83%)
 copy integration-tests-jvm/{xslt-saxon/src/main/java/org/apache/camel/quarkus/component/xslt/saxon/it/XsltSaxonResource.java => json-patch/src/main/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchResource.java} (74%)
 copy integration-tests-jvm/{splunk-hec/src/test/java/org/apache/camel/quarkus/component/splunk/hec/it/SplunkHecTest.java => json-patch/src/test/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchTest.java} (84%)

[camel-quarkus] 04/06: Added Json-Patch Extension

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

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

commit c5dc28b4774b6b3e5d24f63b937d71ec741d0b39
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 23 18:18:05 2021 +0100

    Added Json-Patch Extension
---
 .../camel/quarkus/component/json/patch/it/JsonPatchResource.java      | 4 ----
 .../apache/camel/quarkus/component/json/patch/it/JsonPatchTest.java   | 3 ---
 2 files changed, 7 deletions(-)

diff --git a/integration-tests-jvm/json-patch/src/main/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchResource.java b/integration-tests-jvm/json-patch/src/main/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchResource.java
index f2bff4f..e0dbaf0 100644
--- a/integration-tests-jvm/json-patch/src/main/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchResource.java
+++ b/integration-tests-jvm/json-patch/src/main/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchResource.java
@@ -16,13 +16,9 @@
  */
 package org.apache.camel.quarkus.component.json.patch.it;
 
-import java.net.URI;
-
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
-import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
-import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
diff --git a/integration-tests-jvm/json-patch/src/test/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchTest.java b/integration-tests-jvm/json-patch/src/test/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchTest.java
index 1b004e6..01ec4c1 100644
--- a/integration-tests-jvm/json-patch/src/test/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchTest.java
+++ b/integration-tests-jvm/json-patch/src/test/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchTest.java
@@ -18,9 +18,6 @@ package org.apache.camel.quarkus.component.json.patch.it;
 
 import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;
-import io.restassured.http.ContentType;
-
-import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
 @QuarkusTest

[camel-quarkus] 02/06: Added Json-Patch Extension

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

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

commit 0f8244543925e673e51ef54ee18e37f0cd104509
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 23 15:30:53 2021 +0100

    Added Json-Patch Extension
---
 catalog/pom.xml                                       | 13 +++++++++++++
 docs/modules/ROOT/nav.adoc                            |  1 +
 .../json-patch/pom.xml                                | 19 -------------------
 .../component/json/patch/it/JsonPatchResource.java    |  0
 .../component/json/patch/it/JsonPatchTest.java        |  0
 integration-tests-jvm/pom.xml                         |  1 +
 integration-tests/pom.xml                             |  1 -
 7 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index 40d6f4a..41b80fa 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -2198,6 +2198,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-json-patch</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-json-validator</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 31b3a6f..b767ea5 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -188,6 +188,7 @@
 *** xref:reference/extensions/jing.adoc[Jing]
 *** xref:reference/extensions/jira.adoc[Jira]
 *** xref:reference/extensions/johnzon.adoc[Johnzon]
+*** xref:reference/extensions/json-patch.adoc[JsonPatch]
 *** xref:reference/extensions/kafka.adoc[Kafka]
 *** xref:reference/extensions/kamelet.adoc[Kamelet]
 *** xref:reference/extensions/kamelet-reify.adoc[Kamelet Reify]
diff --git a/integration-tests/json-patch/pom.xml b/integration-tests-jvm/json-patch/pom.xml
similarity index 82%
rename from integration-tests/json-patch/pom.xml
rename to integration-tests-jvm/json-patch/pom.xml
index a39ab63..a469710 100644
--- a/integration-tests/json-patch/pom.xml
+++ b/integration-tests-jvm/json-patch/pom.xml
@@ -32,25 +32,6 @@
     <name>Camel Quarkus :: Integration Tests :: JsonPatch</name>
     <description>Integration tests for Camel Quarkus JsonPatch extension</description>
 
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>${quarkus.platform.group-id}</groupId>
-                <artifactId>${quarkus.platform.artifact-id}</artifactId>
-                <version>${quarkus.platform.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.camel.quarkus</groupId>
-                <artifactId>camel-quarkus-bom-test</artifactId>
-                <version>${camel-quarkus.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
     <dependencies>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
diff --git a/integration-tests/json-patch/src/main/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchResource.java b/integration-tests-jvm/json-patch/src/main/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchResource.java
similarity index 100%
rename from integration-tests/json-patch/src/main/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchResource.java
rename to integration-tests-jvm/json-patch/src/main/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchResource.java
diff --git a/integration-tests/json-patch/src/test/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchTest.java b/integration-tests-jvm/json-patch/src/test/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchTest.java
similarity index 100%
rename from integration-tests/json-patch/src/test/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchTest.java
rename to integration-tests-jvm/json-patch/src/test/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchTest.java
diff --git a/integration-tests-jvm/pom.xml b/integration-tests-jvm/pom.xml
index e95792d..32adcf0 100644
--- a/integration-tests-jvm/pom.xml
+++ b/integration-tests-jvm/pom.xml
@@ -86,6 +86,7 @@
         <module>jooq</module>
         <module>joor</module>
         <module>jsonapi</module>
+        <module>json-patch</module>
         <module>jt400</module>
         <module>kamelet-reify</module>
         <module>kotlin-dsl</module>
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 08f2ae2..436955f 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -126,7 +126,6 @@
         <module>js-dsl</module>
         <module>jsch</module>
         <module>jslt</module>
-        <module>json-patch</module>
         <module>json-validator</module>
         <module>jsonata</module>
         <module>jsonpath</module>

[camel-quarkus] 03/06: Added Json-Patch Extension

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

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

commit 6f5b6b78fca0cdd16e19dce68814dd5ce9eec770
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 23 15:35:04 2021 +0100

    Added Json-Patch Extension
---
 extensions-jvm/json-patch/runtime/pom.xml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/extensions-jvm/json-patch/runtime/pom.xml b/extensions-jvm/json-patch/runtime/pom.xml
index 778bffe..5b24af0 100644
--- a/extensions-jvm/json-patch/runtime/pom.xml
+++ b/extensions-jvm/json-patch/runtime/pom.xml
@@ -56,6 +56,12 @@
         <dependency>
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-json-patch</artifactId>
+            <exclusions>
+               <exclusion>
+                  <groupId>com.google.code.findbugs</groupId>
+                  <artifactId>jsr305</artifactId>
+               </exclusion>
+            </exclusions>
         </dependency>
     </dependencies>
 

[camel-quarkus] 06/06: Added Json-Patch Extension

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

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

commit 7ce5eba1e6a09d43b0b4e4415131a0e5a4eddfeb
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 23 21:29:55 2021 +0100

    Added Json-Patch Extension
---
 .../ROOT/examples/components/json-patch.yml        | 13 ++++++++
 .../pages/reference/extensions/json-patch.adoc     | 35 ++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/docs/modules/ROOT/examples/components/json-patch.yml b/docs/modules/ROOT/examples/components/json-patch.yml
new file mode 100644
index 0000000..603c229
--- /dev/null
+++ b/docs/modules/ROOT/examples/components/json-patch.yml
@@ -0,0 +1,13 @@
+# Do not edit directly!
+# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+cqArtifactId: camel-quarkus-json-patch
+cqArtifactIdBase: json-patch
+cqNativeSupported: false
+cqStatus: Preview
+cqDeprecated: false
+cqJvmSince: 2.7.0
+cqNativeSince: n/a
+cqCamelPartName: json-patch
+cqCamelPartTitle: JsonPatch
+cqCamelPartDescription: JsonPatch component which transform JSON using JSON patch (RFC 6902).
+cqExtensionPageTitle: JsonPatch
diff --git a/docs/modules/ROOT/pages/reference/extensions/json-patch.adoc b/docs/modules/ROOT/pages/reference/extensions/json-patch.adoc
new file mode 100644
index 0000000..8701365
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/json-patch.adoc
@@ -0,0 +1,35 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+= JsonPatch
+:linkattrs:
+:cq-artifact-id: camel-quarkus-json-patch
+:cq-native-supported: false
+:cq-status: Preview
+:cq-status-deprecation: Preview
+:cq-description: JsonPatch component which transform JSON using JSON patch (RFC 6902).
+:cq-deprecated: false
+:cq-jvm-since: 2.7.0
+:cq-native-since: n/a
+
+[.badges]
+[.badge-key]##JVM since##[.badge-supported]##2.7.0## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+
+JsonPatch component which transform JSON using JSON patch (RFC 6902).
+
+== What's inside
+
+* xref:{cq-camel-components}::json-patch-component.adoc[JsonPatch component], URI syntax: `json-patch:resourceUri`
+
+Please refer to the above link for usage and configuration details.
+
+== Maven coordinates
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.camel.quarkus</groupId>
+    <artifactId>camel-quarkus-json-patch</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.

[camel-quarkus] 01/06: Added Json-Patch Extension

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

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

commit 189af5fc6bafcb6365789829cc49860a6879f6b6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 23 08:11:38 2021 +0100

    Added Json-Patch Extension
---
 extensions-jvm/json-patch/deployment/pom.xml       |  63 ++++++++++++
 .../json/patch/deployment/JsonPatchProcessor.java  |  46 +++++++++
 extensions-jvm/json-patch/pom.xml                  |  39 +++++++
 extensions-jvm/json-patch/runtime/pom.xml          | 112 +++++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 ++++++
 extensions-jvm/pom.xml                             |   1 +
 integration-tests/json-patch/pom.xml               | 103 +++++++++++++++++++
 .../component/json/patch/it/JsonPatchResource.java |  55 ++++++++++
 .../component/json/patch/it/JsonPatchTest.java     |  37 +++++++
 integration-tests/pom.xml                          |   1 +
 poms/bom/pom.xml                                   |  15 +++
 11 files changed, 504 insertions(+)

diff --git a/extensions-jvm/json-patch/deployment/pom.xml b/extensions-jvm/json-patch/deployment/pom.xml
new file mode 100644
index 0000000..87f4f6e
--- /dev/null
+++ b/extensions-jvm/json-patch/deployment/pom.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-json-patch-parent</artifactId>
+        <version>2.7.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-json-patch-deployment</artifactId>
+    <name>Camel Quarkus :: JsonPatch :: Deployment</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-core-deployment</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-json-patch</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <annotationProcessorPaths>
+                        <path>
+                            <groupId>io.quarkus</groupId>
+                            <artifactId>quarkus-extension-processor</artifactId>
+                            <version>${quarkus.version}</version>
+                        </path>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/extensions-jvm/json-patch/deployment/src/main/java/org/apache/camel/quarkus/component/json/patch/deployment/JsonPatchProcessor.java b/extensions-jvm/json-patch/deployment/src/main/java/org/apache/camel/quarkus/component/json/patch/deployment/JsonPatchProcessor.java
new file mode 100644
index 0000000..0e90409
--- /dev/null
+++ b/extensions-jvm/json-patch/deployment/src/main/java/org/apache/camel/quarkus/component/json/patch/deployment/JsonPatchProcessor.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.json.patch.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.annotations.ExecutionTime;
+import io.quarkus.deployment.annotations.Record;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.pkg.steps.NativeBuild;
+import org.apache.camel.quarkus.core.JvmOnlyRecorder;
+import org.jboss.logging.Logger;
+
+class JsonPatchProcessor {
+
+    private static final Logger LOG = Logger.getLogger(JsonPatchProcessor.class);
+    private static final String FEATURE = "camel-json-patch";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+    /**
+     * Remove this once this extension starts supporting the native mode.
+     */
+    @BuildStep(onlyIf = NativeBuild.class)
+    @Record(value = ExecutionTime.RUNTIME_INIT)
+    void warnJvmInNative(JvmOnlyRecorder recorder) {
+        JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
+        recorder.warnJvmInNative(FEATURE); // warn at runtime
+    }
+}
diff --git a/extensions-jvm/json-patch/pom.xml b/extensions-jvm/json-patch/pom.xml
new file mode 100644
index 0000000..f680858
--- /dev/null
+++ b/extensions-jvm/json-patch/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-extensions-jvm</artifactId>
+        <version>2.7.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-json-patch-parent</artifactId>
+    <name>Camel Quarkus :: JsonPatch</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/json-patch/runtime/pom.xml b/extensions-jvm/json-patch/runtime/pom.xml
new file mode 100644
index 0000000..778bffe
--- /dev/null
+++ b/extensions-jvm/json-patch/runtime/pom.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-json-patch-parent</artifactId>
+        <version>2.7.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-json-patch</artifactId>
+    <name>Camel Quarkus :: JsonPatch :: Runtime</name>
+    <description>JsonPatch component which transform JSON using JSON patch (RFC 6902).</description>
+
+    <properties>
+        <camel.quarkus.jvmSince>2.7.0</camel.quarkus.jvmSince>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-json-patch</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-bootstrap-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <annotationProcessorPaths>
+                        <path>
+                            <groupId>io.quarkus</groupId>
+                            <artifactId>quarkus-extension-processor</artifactId>
+                            <version>${quarkus.version}</version>
+                        </path>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+
+    <profiles>
+        <profile>
+            <id>full</id>
+            <activation>
+                <property>
+                    <name>!quickly</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.camel.quarkus</groupId>
+                        <artifactId>camel-quarkus-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>update-extension-doc-page</id>
+                                <goals>
+                                    <goal>update-extension-doc-page</goal>
+                                </goals>
+                                <phase>process-classes</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/extensions-jvm/json-patch/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/json-patch/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..b0364aa
--- /dev/null
+++ b/extensions-jvm/json-patch/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,32 @@
+#
+# 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.
+#
+
+# This is a generated file. Do not edit directly!
+# To re-generate, run the following command from the top level directory:
+#
+#   mvn -N cq:update-quarkus-metadata
+#
+---
+name: "Camel JsonPatch"
+description: "JsonPatch component which transform JSON using JSON patch (RFC 6902)"
+metadata:
+  unlisted: true
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/json-patch.html"
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 70b7efe..077362d 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -87,6 +87,7 @@
         <module>jgroups-raft</module>
         <module>jooq</module>
         <module>joor</module>
+        <module>json-patch</module>
         <module>jsonapi</module>
         <module>jt400</module>
         <module>kamelet-reify</module>
diff --git a/integration-tests/json-patch/pom.xml b/integration-tests/json-patch/pom.xml
new file mode 100644
index 0000000..a39ab63
--- /dev/null
+++ b/integration-tests/json-patch/pom.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-build-parent-it</artifactId>
+        <version>2.7.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-integration-test-json-patch</artifactId>
+    <name>Camel Quarkus :: Integration Tests :: JsonPatch</name>
+    <description>Integration tests for Camel Quarkus JsonPatch extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>${quarkus.platform.group-id}</groupId>
+                <artifactId>${quarkus.platform.artifact-id}</artifactId>
+                <version>${quarkus.platform.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</artifactId>
+                <version>${camel-quarkus.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-json-patch</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy</artifactId>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-junit5</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.rest-assured</groupId>
+            <artifactId>rest-assured</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <profiles>
+        <profile>
+            <id>virtualDependencies</id>
+            <activation>
+                <property>
+                    <name>!noVirtualDependencies</name>
+                </property>
+            </activation>
+            <dependencies>
+                <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
+                <dependency>
+                    <groupId>org.apache.camel.quarkus</groupId>
+                    <artifactId>camel-quarkus-json-patch-deployment</artifactId>
+                    <version>${project.version}</version>
+                    <type>pom</type>
+                    <scope>test</scope>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>*</groupId>
+                            <artifactId>*</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+</project>
diff --git a/integration-tests/json-patch/src/main/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchResource.java b/integration-tests/json-patch/src/main/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchResource.java
new file mode 100644
index 0000000..f2bff4f
--- /dev/null
+++ b/integration-tests/json-patch/src/main/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchResource.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.json.patch.it;
+
+import java.net.URI;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.CamelContext;
+import org.jboss.logging.Logger;
+
+@Path("/json-patch")
+@ApplicationScoped
+public class JsonPatchResource {
+
+    private static final Logger LOG = Logger.getLogger(JsonPatchResource.class);
+
+    private static final String COMPONENT_JSON_PATCH = "json-patch";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/component/json-patch")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadComponentJsonPatch() throws Exception {
+        /* This is an autogenerated test */
+        if (context.getComponent(COMPONENT_JSON_PATCH) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_JSON_PATCH);
+        return Response.status(500, COMPONENT_JSON_PATCH + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/integration-tests/json-patch/src/test/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchTest.java b/integration-tests/json-patch/src/test/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchTest.java
new file mode 100644
index 0000000..1b004e6
--- /dev/null
+++ b/integration-tests/json-patch/src/test/java/org/apache/camel/quarkus/component/json/patch/it/JsonPatchTest.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.json.patch.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class JsonPatchTest {
+
+    @Test
+    public void loadComponentJsonPatch() {
+        /* A simple autogenerated test */
+        RestAssured.get("/json-patch/load/component/json-patch")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 436955f..08f2ae2 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -126,6 +126,7 @@
         <module>js-dsl</module>
         <module>jsch</module>
         <module>jslt</module>
+        <module>json-patch</module>
         <module>json-validator</module>
         <module>jsonata</module>
         <module>jsonpath</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 97d87b9..ecd81a6 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -1473,6 +1473,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-json-patch</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-json-validator</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -4041,6 +4046,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-json-patch</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-json-patch-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-json-validator</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>

[camel-quarkus] 05/06: Added Json-Patch Extension

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

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

commit 7e6a9ce48cda57b96ec8db9df09492ccebc80257
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 23 18:31:55 2021 +0100

    Added Json-Patch Extension
---
 integration-tests-jvm/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/integration-tests-jvm/pom.xml b/integration-tests-jvm/pom.xml
index 32adcf0..6f26e22 100644
--- a/integration-tests-jvm/pom.xml
+++ b/integration-tests-jvm/pom.xml
@@ -85,8 +85,8 @@
         <module>jgroups-raft</module>
         <module>jooq</module>
         <module>joor</module>
-        <module>jsonapi</module>
         <module>json-patch</module>
+        <module>jsonapi</module>
         <module>jt400</module>
         <module>kamelet-reify</module>
         <module>kotlin-dsl</module>