You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2020/09/09 05:16:55 UTC

[camel-quarkus] branch master updated (078a0c3 -> 618475a)

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

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


    from 078a0c3  Fixed CS
     new e15c787  JGroups JVM support
     new 106344e  JGroups raft JVM support
     new e36199c  HL7 Terser JVM support
     new a92eb5a  Syslog JVM support
     new d3aeb12  JSonApi JVM support
     new 71c4ffc  ASN.1 File JVM support
     new 4f0d897  Barcode JVM support
     new 6b3c314  BeanIO JVM support
     new 4c1eb00  CBOR JVM support
     new 94b3a5c  JSon Fastjson JVM support
     new 0400fb9  uniVocity JVM support
     new 618475a  Freemarker JVM support

The 12 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                                    | 156 ++++++++++++++++++
 docs/modules/ROOT/nav.adoc                         |  12 ++
 docs/modules/ROOT/pages/reference/components.adoc  |   9 ++
 docs/modules/ROOT/pages/reference/dataformats.adoc |  33 ++++
 .../ROOT/pages/reference/extensions/asn1.adoc      |  29 ++++
 .../ROOT/pages/reference/extensions/barcode.adoc   |  29 ++++
 .../ROOT/pages/reference/extensions/beanio.adoc    |  29 ++++
 .../ROOT/pages/reference/extensions/cbor.adoc      |  29 ++++
 .../ROOT/pages/reference/extensions/fastjson.adoc  |  29 ++++
 .../pages/reference/extensions/freemarker.adoc     |  29 ++++
 .../ROOT/pages/reference/extensions/hl7.adoc       |  30 ++++
 .../pages/reference/extensions/jgroups-raft.adoc   |  29 ++++
 .../ROOT/pages/reference/extensions/jgroups.adoc   |  29 ++++
 .../ROOT/pages/reference/extensions/jsonapi.adoc   |  29 ++++
 .../ROOT/pages/reference/extensions/syslog.adoc    |  29 ++++
 .../reference/extensions/univocity-parsers.adoc    |  31 ++++
 docs/modules/ROOT/pages/reference/index.adoc       |  36 +++++
 docs/modules/ROOT/pages/reference/languages.adoc   |   3 +
 extensions-jvm/asn1/deployment/pom.xml             |  63 ++++++++
 .../component/asn1/deployment/Asn1Processor.java   |  46 ++++++
 extensions-jvm/asn1/integration-test/pom.xml       | 100 ++++++++++++
 .../quarkus/component/asn1/it/Asn1Resource.java    |  51 ++++++
 .../camel/quarkus/component/asn1/it/Asn1Test.java  |  34 ++++
 extensions-jvm/asn1/pom.xml                        |  40 +++++
 extensions-jvm/asn1/runtime/pom.xml                |  94 +++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 ++++
 extensions-jvm/barcode/deployment/pom.xml          |  63 ++++++++
 .../barcode/deployment/BarcodeProcessor.java       |  46 ++++++
 extensions-jvm/barcode/integration-test/pom.xml    | 100 ++++++++++++
 .../component/barcode/it/BarcodeResource.java      |  51 ++++++
 .../quarkus/component/barcode/it/BarcodeTest.java  |  34 ++++
 extensions-jvm/barcode/pom.xml                     |  40 +++++
 extensions-jvm/barcode/runtime/pom.xml             |  94 +++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 ++++
 extensions-jvm/beanio/deployment/pom.xml           |  63 ++++++++
 .../beanio/deployment/BeanioProcessor.java         |  46 ++++++
 extensions-jvm/beanio/integration-test/pom.xml     | 100 ++++++++++++
 .../component/beanio/it/BeanioResource.java        |  51 ++++++
 .../quarkus/component/beanio/it/BeanioTest.java    |  34 ++++
 extensions-jvm/beanio/pom.xml                      |  40 +++++
 extensions-jvm/beanio/runtime/pom.xml              |  94 +++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 ++++
 extensions-jvm/cbor/deployment/pom.xml             |  63 ++++++++
 .../component/cbor/deployment/CborProcessor.java   |  46 ++++++
 extensions-jvm/cbor/integration-test/pom.xml       | 100 ++++++++++++
 .../quarkus/component/cbor/it/CborResource.java    |  51 ++++++
 .../camel/quarkus/component/cbor/it/CborTest.java  |  34 ++++
 extensions-jvm/cbor/pom.xml                        |  40 +++++
 extensions-jvm/cbor/runtime/pom.xml                |  94 +++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 ++++
 extensions-jvm/fastjson/deployment/pom.xml         |  63 ++++++++
 .../fastjson/deployment/FastjsonProcessor.java     |  46 ++++++
 extensions-jvm/fastjson/integration-test/pom.xml   | 100 ++++++++++++
 .../component/fastjson/it/FastjsonResource.java    |  51 ++++++
 .../component/fastjson/it/FastjsonTest.java        |  34 ++++
 extensions-jvm/fastjson/pom.xml                    |  40 +++++
 extensions-jvm/fastjson/runtime/pom.xml            |  94 +++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 ++++
 extensions-jvm/freemarker/deployment/pom.xml       |  63 ++++++++
 .../freemarker/deployment/FreemarkerProcessor.java |  46 ++++++
 extensions-jvm/freemarker/integration-test/pom.xml | 100 ++++++++++++
 .../freemarker/it/FreemarkerResource.java          |  51 ++++++
 .../component/freemarker/it/FreemarkerTest.java    |  34 ++++
 extensions-jvm/freemarker/pom.xml                  |  40 +++++
 extensions-jvm/freemarker/runtime/pom.xml          |  94 +++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 ++++
 extensions-jvm/hl7/deployment/pom.xml              |  63 ++++++++
 .../component/hl7/deployment/Hl7Processor.java     |  46 ++++++
 extensions-jvm/hl7/integration-test/pom.xml        | 100 ++++++++++++
 .../quarkus/component/hl7/it/Hl7Resource.java      |  64 ++++++++
 .../camel/quarkus/component/hl7/it/Hl7Test.java    |  42 +++++
 extensions-jvm/hl7/pom.xml                         |  40 +++++
 extensions-jvm/hl7/runtime/pom.xml                 |  94 +++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 ++++
 extensions-jvm/jgroups-raft/deployment/pom.xml     |  63 ++++++++
 .../raft/deployment/JgroupsRaftProcessor.java      |  46 ++++++
 .../jgroups-raft/integration-test/pom.xml          | 100 ++++++++++++
 .../jgroups/raft/it/JgroupsRaftResource.java       |  51 ++++++
 .../component/jgroups/raft/it/JgroupsRaftTest.java |  34 ++++
 extensions-jvm/jgroups-raft/pom.xml                |  40 +++++
 extensions-jvm/jgroups-raft/runtime/pom.xml        |  94 +++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 ++++
 extensions-jvm/jgroups/deployment/pom.xml          |  63 ++++++++
 .../jgroups/deployment/JgroupsProcessor.java       |  46 ++++++
 extensions-jvm/jgroups/integration-test/pom.xml    | 100 ++++++++++++
 .../component/jgroups/it/JgroupsResource.java      |  51 ++++++
 .../quarkus/component/jgroups/it/JgroupsTest.java  |  34 ++++
 extensions-jvm/jgroups/pom.xml                     |  40 +++++
 extensions-jvm/jgroups/runtime/pom.xml             |  94 +++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 ++++
 extensions-jvm/jsonapi/deployment/pom.xml          |  63 ++++++++
 .../jsonapi/deployment/JsonapiProcessor.java       |  46 ++++++
 extensions-jvm/jsonapi/integration-test/pom.xml    | 100 ++++++++++++
 .../component/jsonapi/it/JsonapiResource.java      |  51 ++++++
 .../quarkus/component/jsonapi/it/JsonapiTest.java  |  34 ++++
 extensions-jvm/jsonapi/pom.xml                     |  40 +++++
 extensions-jvm/jsonapi/runtime/pom.xml             |  94 +++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 ++++
 extensions-jvm/pom.xml                             |  12 ++
 extensions-jvm/syslog/deployment/pom.xml           |  63 ++++++++
 .../syslog/deployment/SyslogProcessor.java         |  46 ++++++
 extensions-jvm/syslog/integration-test/pom.xml     | 100 ++++++++++++
 .../component/syslog/it/SyslogResource.java        |  51 ++++++
 .../quarkus/component/syslog/it/SyslogTest.java    |  34 ++++
 extensions-jvm/syslog/pom.xml                      |  40 +++++
 extensions-jvm/syslog/runtime/pom.xml              |  94 +++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 ++++
 .../univocity-parsers/deployment/pom.xml           |  63 ++++++++
 .../deployment/UnivocityParsersProcessor.java      |  46 ++++++
 .../univocity-parsers/integration-test/pom.xml     | 100 ++++++++++++
 .../parsers/it/UnivocityParsersResource.java       |  77 +++++++++
 .../univocity/parsers/it/UnivocityParsersTest.java |  50 ++++++
 extensions-jvm/univocity-parsers/pom.xml           |  40 +++++
 extensions-jvm/univocity-parsers/runtime/pom.xml   |  94 +++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 ++++
 poms/bom/pom.xml                                   | 180 +++++++++++++++++++++
 116 files changed, 6375 insertions(+)
 create mode 100644 docs/modules/ROOT/pages/reference/extensions/asn1.adoc
 create mode 100644 docs/modules/ROOT/pages/reference/extensions/barcode.adoc
 create mode 100644 docs/modules/ROOT/pages/reference/extensions/beanio.adoc
 create mode 100644 docs/modules/ROOT/pages/reference/extensions/cbor.adoc
 create mode 100644 docs/modules/ROOT/pages/reference/extensions/fastjson.adoc
 create mode 100644 docs/modules/ROOT/pages/reference/extensions/freemarker.adoc
 create mode 100644 docs/modules/ROOT/pages/reference/extensions/hl7.adoc
 create mode 100644 docs/modules/ROOT/pages/reference/extensions/jgroups-raft.adoc
 create mode 100644 docs/modules/ROOT/pages/reference/extensions/jgroups.adoc
 create mode 100644 docs/modules/ROOT/pages/reference/extensions/jsonapi.adoc
 create mode 100644 docs/modules/ROOT/pages/reference/extensions/syslog.adoc
 create mode 100644 docs/modules/ROOT/pages/reference/extensions/univocity-parsers.adoc
 create mode 100644 extensions-jvm/asn1/deployment/pom.xml
 create mode 100644 extensions-jvm/asn1/deployment/src/main/java/org/apache/camel/quarkus/component/asn1/deployment/Asn1Processor.java
 create mode 100644 extensions-jvm/asn1/integration-test/pom.xml
 create mode 100644 extensions-jvm/asn1/integration-test/src/main/java/org/apache/camel/quarkus/component/asn1/it/Asn1Resource.java
 create mode 100644 extensions-jvm/asn1/integration-test/src/test/java/org/apache/camel/quarkus/component/asn1/it/Asn1Test.java
 create mode 100644 extensions-jvm/asn1/pom.xml
 create mode 100644 extensions-jvm/asn1/runtime/pom.xml
 create mode 100644 extensions-jvm/asn1/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 create mode 100644 extensions-jvm/barcode/deployment/pom.xml
 create mode 100644 extensions-jvm/barcode/deployment/src/main/java/org/apache/camel/quarkus/component/barcode/deployment/BarcodeProcessor.java
 create mode 100644 extensions-jvm/barcode/integration-test/pom.xml
 create mode 100644 extensions-jvm/barcode/integration-test/src/main/java/org/apache/camel/quarkus/component/barcode/it/BarcodeResource.java
 create mode 100644 extensions-jvm/barcode/integration-test/src/test/java/org/apache/camel/quarkus/component/barcode/it/BarcodeTest.java
 create mode 100644 extensions-jvm/barcode/pom.xml
 create mode 100644 extensions-jvm/barcode/runtime/pom.xml
 create mode 100644 extensions-jvm/barcode/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 create mode 100644 extensions-jvm/beanio/deployment/pom.xml
 create mode 100644 extensions-jvm/beanio/deployment/src/main/java/org/apache/camel/quarkus/component/beanio/deployment/BeanioProcessor.java
 create mode 100644 extensions-jvm/beanio/integration-test/pom.xml
 create mode 100644 extensions-jvm/beanio/integration-test/src/main/java/org/apache/camel/quarkus/component/beanio/it/BeanioResource.java
 create mode 100644 extensions-jvm/beanio/integration-test/src/test/java/org/apache/camel/quarkus/component/beanio/it/BeanioTest.java
 create mode 100644 extensions-jvm/beanio/pom.xml
 create mode 100644 extensions-jvm/beanio/runtime/pom.xml
 create mode 100644 extensions-jvm/beanio/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 create mode 100644 extensions-jvm/cbor/deployment/pom.xml
 create mode 100644 extensions-jvm/cbor/deployment/src/main/java/org/apache/camel/quarkus/component/cbor/deployment/CborProcessor.java
 create mode 100644 extensions-jvm/cbor/integration-test/pom.xml
 create mode 100644 extensions-jvm/cbor/integration-test/src/main/java/org/apache/camel/quarkus/component/cbor/it/CborResource.java
 create mode 100644 extensions-jvm/cbor/integration-test/src/test/java/org/apache/camel/quarkus/component/cbor/it/CborTest.java
 create mode 100644 extensions-jvm/cbor/pom.xml
 create mode 100644 extensions-jvm/cbor/runtime/pom.xml
 create mode 100644 extensions-jvm/cbor/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 create mode 100644 extensions-jvm/fastjson/deployment/pom.xml
 create mode 100644 extensions-jvm/fastjson/deployment/src/main/java/org/apache/camel/quarkus/component/fastjson/deployment/FastjsonProcessor.java
 create mode 100644 extensions-jvm/fastjson/integration-test/pom.xml
 create mode 100644 extensions-jvm/fastjson/integration-test/src/main/java/org/apache/camel/quarkus/component/fastjson/it/FastjsonResource.java
 create mode 100644 extensions-jvm/fastjson/integration-test/src/test/java/org/apache/camel/quarkus/component/fastjson/it/FastjsonTest.java
 create mode 100644 extensions-jvm/fastjson/pom.xml
 create mode 100644 extensions-jvm/fastjson/runtime/pom.xml
 create mode 100644 extensions-jvm/fastjson/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 create mode 100644 extensions-jvm/freemarker/deployment/pom.xml
 create mode 100644 extensions-jvm/freemarker/deployment/src/main/java/org/apache/camel/quarkus/component/freemarker/deployment/FreemarkerProcessor.java
 create mode 100644 extensions-jvm/freemarker/integration-test/pom.xml
 create mode 100644 extensions-jvm/freemarker/integration-test/src/main/java/org/apache/camel/quarkus/component/freemarker/it/FreemarkerResource.java
 create mode 100644 extensions-jvm/freemarker/integration-test/src/test/java/org/apache/camel/quarkus/component/freemarker/it/FreemarkerTest.java
 create mode 100644 extensions-jvm/freemarker/pom.xml
 create mode 100644 extensions-jvm/freemarker/runtime/pom.xml
 create mode 100644 extensions-jvm/freemarker/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 create mode 100644 extensions-jvm/hl7/deployment/pom.xml
 create mode 100644 extensions-jvm/hl7/deployment/src/main/java/org/apache/camel/quarkus/component/hl7/deployment/Hl7Processor.java
 create mode 100644 extensions-jvm/hl7/integration-test/pom.xml
 create mode 100644 extensions-jvm/hl7/integration-test/src/main/java/org/apache/camel/quarkus/component/hl7/it/Hl7Resource.java
 create mode 100644 extensions-jvm/hl7/integration-test/src/test/java/org/apache/camel/quarkus/component/hl7/it/Hl7Test.java
 create mode 100644 extensions-jvm/hl7/pom.xml
 create mode 100644 extensions-jvm/hl7/runtime/pom.xml
 create mode 100644 extensions-jvm/hl7/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 create mode 100644 extensions-jvm/jgroups-raft/deployment/pom.xml
 create mode 100644 extensions-jvm/jgroups-raft/deployment/src/main/java/org/apache/camel/quarkus/component/jgroups/raft/deployment/JgroupsRaftProcessor.java
 create mode 100644 extensions-jvm/jgroups-raft/integration-test/pom.xml
 create mode 100644 extensions-jvm/jgroups-raft/integration-test/src/main/java/org/apache/camel/quarkus/component/jgroups/raft/it/JgroupsRaftResource.java
 create mode 100644 extensions-jvm/jgroups-raft/integration-test/src/test/java/org/apache/camel/quarkus/component/jgroups/raft/it/JgroupsRaftTest.java
 create mode 100644 extensions-jvm/jgroups-raft/pom.xml
 create mode 100644 extensions-jvm/jgroups-raft/runtime/pom.xml
 create mode 100644 extensions-jvm/jgroups-raft/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 create mode 100644 extensions-jvm/jgroups/deployment/pom.xml
 create mode 100644 extensions-jvm/jgroups/deployment/src/main/java/org/apache/camel/quarkus/component/jgroups/deployment/JgroupsProcessor.java
 create mode 100644 extensions-jvm/jgroups/integration-test/pom.xml
 create mode 100644 extensions-jvm/jgroups/integration-test/src/main/java/org/apache/camel/quarkus/component/jgroups/it/JgroupsResource.java
 create mode 100644 extensions-jvm/jgroups/integration-test/src/test/java/org/apache/camel/quarkus/component/jgroups/it/JgroupsTest.java
 create mode 100644 extensions-jvm/jgroups/pom.xml
 create mode 100644 extensions-jvm/jgroups/runtime/pom.xml
 create mode 100644 extensions-jvm/jgroups/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 create mode 100644 extensions-jvm/jsonapi/deployment/pom.xml
 create mode 100644 extensions-jvm/jsonapi/deployment/src/main/java/org/apache/camel/quarkus/component/jsonapi/deployment/JsonapiProcessor.java
 create mode 100644 extensions-jvm/jsonapi/integration-test/pom.xml
 create mode 100644 extensions-jvm/jsonapi/integration-test/src/main/java/org/apache/camel/quarkus/component/jsonapi/it/JsonapiResource.java
 create mode 100644 extensions-jvm/jsonapi/integration-test/src/test/java/org/apache/camel/quarkus/component/jsonapi/it/JsonapiTest.java
 create mode 100644 extensions-jvm/jsonapi/pom.xml
 create mode 100644 extensions-jvm/jsonapi/runtime/pom.xml
 create mode 100644 extensions-jvm/jsonapi/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 create mode 100644 extensions-jvm/syslog/deployment/pom.xml
 create mode 100644 extensions-jvm/syslog/deployment/src/main/java/org/apache/camel/quarkus/component/syslog/deployment/SyslogProcessor.java
 create mode 100644 extensions-jvm/syslog/integration-test/pom.xml
 create mode 100644 extensions-jvm/syslog/integration-test/src/main/java/org/apache/camel/quarkus/component/syslog/it/SyslogResource.java
 create mode 100644 extensions-jvm/syslog/integration-test/src/test/java/org/apache/camel/quarkus/component/syslog/it/SyslogTest.java
 create mode 100644 extensions-jvm/syslog/pom.xml
 create mode 100644 extensions-jvm/syslog/runtime/pom.xml
 create mode 100644 extensions-jvm/syslog/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 create mode 100644 extensions-jvm/univocity-parsers/deployment/pom.xml
 create mode 100644 extensions-jvm/univocity-parsers/deployment/src/main/java/org/apache/camel/quarkus/component/univocity/parsers/deployment/UnivocityParsersProcessor.java
 create mode 100644 extensions-jvm/univocity-parsers/integration-test/pom.xml
 create mode 100644 extensions-jvm/univocity-parsers/integration-test/src/main/java/org/apache/camel/quarkus/component/univocity/parsers/it/UnivocityParsersResource.java
 create mode 100644 extensions-jvm/univocity-parsers/integration-test/src/test/java/org/apache/camel/quarkus/component/univocity/parsers/it/UnivocityParsersTest.java
 create mode 100644 extensions-jvm/univocity-parsers/pom.xml
 create mode 100644 extensions-jvm/univocity-parsers/runtime/pom.xml
 create mode 100644 extensions-jvm/univocity-parsers/runtime/src/main/resources/META-INF/quarkus-extension.yaml


[camel-quarkus] 08/12: BeanIO JVM support

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

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

commit 6b3c314664d20723203878f9dc79c557f2e7a770
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Sep 8 21:29:15 2020 +0200

    BeanIO JVM support
---
 catalog/pom.xml                                    |  13 +++
 docs/modules/ROOT/nav.adoc                         |   1 +
 docs/modules/ROOT/pages/reference/dataformats.adoc |   3 +
 .../ROOT/pages/reference/extensions/beanio.adoc    |  29 ++++++
 docs/modules/ROOT/pages/reference/index.adoc       |   3 +
 extensions-jvm/beanio/deployment/pom.xml           |  63 +++++++++++++
 .../beanio/deployment/BeanioProcessor.java         |  46 ++++++++++
 extensions-jvm/beanio/integration-test/pom.xml     | 100 +++++++++++++++++++++
 .../component/beanio/it/BeanioResource.java        |  51 +++++++++++
 .../quarkus/component/beanio/it/BeanioTest.java    |  34 +++++++
 extensions-jvm/beanio/pom.xml                      |  40 +++++++++
 extensions-jvm/beanio/runtime/pom.xml              |  94 +++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 +++++++
 extensions-jvm/pom.xml                             |   1 +
 poms/bom/pom.xml                                   |  15 ++++
 15 files changed, 525 insertions(+)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index 3b894a7..38e8541 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -751,6 +751,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-beanio</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-beanstalk</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index c8bb0c7..bdb15fc 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -68,6 +68,7 @@
 *** xref:reference/extensions/base64.adoc[Base64]
 *** xref:reference/extensions/bean.adoc[Bean]
 *** xref:reference/extensions/bean-validator.adoc[Bean Validator]
+*** xref:reference/extensions/beanio.adoc[BeanIO]
 *** xref:reference/extensions/beanstalk.adoc[Beanstalk]
 *** xref:reference/extensions/bindy.adoc[Bindy]
 *** xref:reference/extensions/bonita.adoc[Bonita]
diff --git a/docs/modules/ROOT/pages/reference/dataformats.adoc b/docs/modules/ROOT/pages/reference/dataformats.adoc
index f8c4691..0e90fc1 100644
--- a/docs/modules/ROOT/pages/reference/dataformats.adoc
+++ b/docs/modules/ROOT/pages/reference/dataformats.adoc
@@ -22,6 +22,9 @@ Preview | 1.1.0 | Transform strings to various 1D/2D barcode bitmap formats and
 | xref:reference/extensions/base64.adoc[Base64] | [.camel-element-artifact]##camel-quarkus-base64## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Encode and decode data using Base64.
 
+| xref:reference/extensions/beanio.adoc[BeanIO] | [.camel-element-artifact]##camel-quarkus-beanio## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshal and unmarshal Java beans to and from flat files (such as CSV, delimited, or fixed length formats).
+
 | xref:reference/extensions/bindy.adoc[Bindy CSV] | [.camel-element-artifact]##camel-quarkus-bindy## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Marshal and unmarshal Java beans from and to flat payloads (such as CSV, delimited, fixed length formats, or FIX messages).
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/beanio.adoc b/docs/modules/ROOT/pages/reference/extensions/beanio.adoc
new file mode 100644
index 0000000..d296088
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/beanio.adoc
@@ -0,0 +1,29 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+
+[[beanio]]
+= BeanIO
+:page-aliases: extensions/beanio.adoc
+
+[.badges]
+[.badge-key]##Since Camel Quarkus##[.badge-version]##1.1.0## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+
+Marshal and unmarshal Java beans to and from flat files (such as CSV, delimited, or fixed length formats).
+
+== What's inside
+
+* https://camel.apache.org/components/latest/dataformats/beanio-dataformat.html[BeanIO data format]
+
+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-beanio</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
diff --git a/docs/modules/ROOT/pages/reference/index.adoc b/docs/modules/ROOT/pages/reference/index.adoc
index 3c3ae02..8490458 100644
--- a/docs/modules/ROOT/pages/reference/index.adoc
+++ b/docs/modules/ROOT/pages/reference/index.adoc
@@ -182,6 +182,9 @@ Stable | 0.2.0 | Invoke methods of Java beans
 |  xref:reference/extensions/bean-validator.adoc[Bean Validator]  | camel-quarkus-bean-validator | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Validate the message body using the Java Bean Validation API.
 
+|  xref:reference/extensions/beanio.adoc[BeanIO]  | camel-quarkus-beanio | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshal and unmarshal Java beans to and from flat files (such as CSV, delimited, or fixed length formats).
+
 |  xref:reference/extensions/beanstalk.adoc[Beanstalk]  | camel-quarkus-beanstalk | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Retrieve and post-process Beanstalk jobs.
 
diff --git a/extensions-jvm/beanio/deployment/pom.xml b/extensions-jvm/beanio/deployment/pom.xml
new file mode 100644
index 0000000..269d346
--- /dev/null
+++ b/extensions-jvm/beanio/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-beanio-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-beanio-deployment</artifactId>
+    <name>Camel Quarkus :: BeanIO :: 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-beanio</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/beanio/deployment/src/main/java/org/apache/camel/quarkus/component/beanio/deployment/BeanioProcessor.java b/extensions-jvm/beanio/deployment/src/main/java/org/apache/camel/quarkus/component/beanio/deployment/BeanioProcessor.java
new file mode 100644
index 0000000..d90d52b
--- /dev/null
+++ b/extensions-jvm/beanio/deployment/src/main/java/org/apache/camel/quarkus/component/beanio/deployment/BeanioProcessor.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.beanio.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 BeanioProcessor {
+
+    private static final Logger LOG = Logger.getLogger(BeanioProcessor.class);
+    private static final String FEATURE = "camel-beanio";
+
+    @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/beanio/integration-test/pom.xml b/extensions-jvm/beanio/integration-test/pom.xml
new file mode 100644
index 0000000..dfaed79
--- /dev/null
+++ b/extensions-jvm/beanio/integration-test/pom.xml
@@ -0,0 +1,100 @@
+<?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>1.1.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-beanio-integration-test</artifactId>
+    <name>Camel Quarkus :: BeanIO :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus BeanIO extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</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-beanio</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>
+
+        <!-- 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-beanio-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/beanio/integration-test/src/main/java/org/apache/camel/quarkus/component/beanio/it/BeanioResource.java b/extensions-jvm/beanio/integration-test/src/main/java/org/apache/camel/quarkus/component/beanio/it/BeanioResource.java
new file mode 100644
index 0000000..ffa4212
--- /dev/null
+++ b/extensions-jvm/beanio/integration-test/src/main/java/org/apache/camel/quarkus/component/beanio/it/BeanioResource.java
@@ -0,0 +1,51 @@
+/*
+ * 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.beanio.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+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("/beanio")
+@ApplicationScoped
+public class BeanioResource {
+
+    private static final Logger LOG = Logger.getLogger(BeanioResource.class);
+
+    private static final String DATAFORMAT_BEANIO = "beanio";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/dataformat/beanio")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadDataformatBeanio() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveDataFormat(DATAFORMAT_BEANIO) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", DATAFORMAT_BEANIO);
+        return Response.status(500, DATAFORMAT_BEANIO + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/beanio/integration-test/src/test/java/org/apache/camel/quarkus/component/beanio/it/BeanioTest.java b/extensions-jvm/beanio/integration-test/src/test/java/org/apache/camel/quarkus/component/beanio/it/BeanioTest.java
new file mode 100644
index 0000000..ae1ce7f
--- /dev/null
+++ b/extensions-jvm/beanio/integration-test/src/test/java/org/apache/camel/quarkus/component/beanio/it/BeanioTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.beanio.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class BeanioTest {
+
+    @Test
+    public void loadDataformatBeanio() {
+        /* A simple autogenerated test */
+        RestAssured.get("/beanio/load/dataformat/beanio")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/beanio/pom.xml b/extensions-jvm/beanio/pom.xml
new file mode 100644
index 0000000..099e2d6
--- /dev/null
+++ b/extensions-jvm/beanio/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-beanio-parent</artifactId>
+    <name>Camel Quarkus :: BeanIO</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/beanio/runtime/pom.xml b/extensions-jvm/beanio/runtime/pom.xml
new file mode 100644
index 0000000..4cd34c2
--- /dev/null
+++ b/extensions-jvm/beanio/runtime/pom.xml
@@ -0,0 +1,94 @@
+<?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-beanio-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-beanio</artifactId>
+    <name>Camel Quarkus :: BeanIO :: Runtime</name>
+    <description>Marshal and unmarshal Java beans to and from flat files (such as CSV, delimited, or fixed length formats).</description>
+
+    <properties>
+        <firstVersion>1.1.0</firstVersion>
+    </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-beanio</artifactId>
+        </dependency>
+    </dependencies>
+
+    <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>
+            <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>
+</project>
diff --git a/extensions-jvm/beanio/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/beanio/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..dd29ff1
--- /dev/null
+++ b/extensions-jvm/beanio/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 BeanIO"
+description: "Marshal and unmarshal Java beans to and from flat files (such as CSV, delimited, or fixed length formats)"
+metadata:
+  unlisted: true
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/beanio.html"
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index e50d149..dae65f9 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -45,6 +45,7 @@
         <module>azure-storage-blob</module>
         <module>azure-storage-queue</module>
         <module>barcode</module>
+        <module>beanio</module>
         <module>beanstalk</module>
         <module>bonita</module>
         <module>browse</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 6a29681..23ada11 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -495,6 +495,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-beanio</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-beanstalk</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -2439,6 +2444,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-beanio</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-beanio-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-beanstalk</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 07/12: Barcode JVM support

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

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

commit 4f0d89783908d9247022764d954ed49593e66f60
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Sep 8 21:26:57 2020 +0200

    Barcode JVM support
---
 catalog/pom.xml                                    |  13 +++
 docs/modules/ROOT/nav.adoc                         |   1 +
 docs/modules/ROOT/pages/reference/dataformats.adoc |   3 +
 .../ROOT/pages/reference/extensions/barcode.adoc   |  29 ++++++
 docs/modules/ROOT/pages/reference/index.adoc       |   3 +
 extensions-jvm/barcode/deployment/pom.xml          |  63 +++++++++++++
 .../barcode/deployment/BarcodeProcessor.java       |  46 ++++++++++
 extensions-jvm/barcode/integration-test/pom.xml    | 100 +++++++++++++++++++++
 .../component/barcode/it/BarcodeResource.java      |  51 +++++++++++
 .../quarkus/component/barcode/it/BarcodeTest.java  |  34 +++++++
 extensions-jvm/barcode/pom.xml                     |  40 +++++++++
 extensions-jvm/barcode/runtime/pom.xml             |  94 +++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 +++++++
 extensions-jvm/pom.xml                             |   1 +
 poms/bom/pom.xml                                   |  15 ++++
 15 files changed, 525 insertions(+)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index b0ebd2d..3b894a7 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -699,6 +699,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-barcode</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-base64</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 60ace9a..c8bb0c7 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -64,6 +64,7 @@
 *** xref:reference/extensions/azure.adoc[Azure]
 *** xref:reference/extensions/azure-storage-blob.adoc[Azure Storage Blob Service]
 *** xref:reference/extensions/azure-storage-queue.adoc[Azure Storage Queue Service]
+*** xref:reference/extensions/barcode.adoc[Barcode]
 *** xref:reference/extensions/base64.adoc[Base64]
 *** xref:reference/extensions/bean.adoc[Bean]
 *** xref:reference/extensions/bean-validator.adoc[Bean Validator]
diff --git a/docs/modules/ROOT/pages/reference/dataformats.adoc b/docs/modules/ROOT/pages/reference/dataformats.adoc
index ff9f594..f8c4691 100644
--- a/docs/modules/ROOT/pages/reference/dataformats.adoc
+++ b/docs/modules/ROOT/pages/reference/dataformats.adoc
@@ -16,6 +16,9 @@ Preview | 1.1.0 | Encode and decode data structures using Abstract Syntax Notati
 | xref:reference/extensions/avro.adoc[Avro] | [.camel-element-artifact]##camel-quarkus-avro## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Serialize and deserialize messages using Apache Avro binary data format.
 
+| xref:reference/extensions/barcode.adoc[Barcode] | [.camel-element-artifact]##camel-quarkus-barcode## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Transform strings to various 1D/2D barcode bitmap formats and back.
+
 | xref:reference/extensions/base64.adoc[Base64] | [.camel-element-artifact]##camel-quarkus-base64## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Encode and decode data using Base64.
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/barcode.adoc b/docs/modules/ROOT/pages/reference/extensions/barcode.adoc
new file mode 100644
index 0000000..ca481e2
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/barcode.adoc
@@ -0,0 +1,29 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+
+[[barcode]]
+= Barcode
+:page-aliases: extensions/barcode.adoc
+
+[.badges]
+[.badge-key]##Since Camel Quarkus##[.badge-version]##1.1.0## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+
+Transform strings to various 1D/2D barcode bitmap formats and back.
+
+== What's inside
+
+* https://camel.apache.org/components/latest/dataformats/barcode-dataformat.html[Barcode data format]
+
+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-barcode</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
diff --git a/docs/modules/ROOT/pages/reference/index.adoc b/docs/modules/ROOT/pages/reference/index.adoc
index 3ac0a90..3c3ae02 100644
--- a/docs/modules/ROOT/pages/reference/index.adoc
+++ b/docs/modules/ROOT/pages/reference/index.adoc
@@ -170,6 +170,9 @@ Preview | 1.1.0 | Store and retrieve blobs from Azure Storage Blob Service using
 |  xref:reference/extensions/azure-storage-queue.adoc[Azure Storage Queue Service]  | camel-quarkus-azure-storage-queue | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | The azure-storage-queue component is used for storing and retrieving the messages to/from Azure Storage Queue using Azure SDK v12.
 
+|  xref:reference/extensions/barcode.adoc[Barcode]  | camel-quarkus-barcode | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Transform strings to various 1D/2D barcode bitmap formats and back.
+
 |  xref:reference/extensions/base64.adoc[Base64]  | camel-quarkus-base64 | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Encode and decode data using Base64.
 
diff --git a/extensions-jvm/barcode/deployment/pom.xml b/extensions-jvm/barcode/deployment/pom.xml
new file mode 100644
index 0000000..be3f835
--- /dev/null
+++ b/extensions-jvm/barcode/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-barcode-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-barcode-deployment</artifactId>
+    <name>Camel Quarkus :: Barcode :: 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-barcode</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/barcode/deployment/src/main/java/org/apache/camel/quarkus/component/barcode/deployment/BarcodeProcessor.java b/extensions-jvm/barcode/deployment/src/main/java/org/apache/camel/quarkus/component/barcode/deployment/BarcodeProcessor.java
new file mode 100644
index 0000000..000c8e8
--- /dev/null
+++ b/extensions-jvm/barcode/deployment/src/main/java/org/apache/camel/quarkus/component/barcode/deployment/BarcodeProcessor.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.barcode.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 BarcodeProcessor {
+
+    private static final Logger LOG = Logger.getLogger(BarcodeProcessor.class);
+    private static final String FEATURE = "camel-barcode";
+
+    @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/barcode/integration-test/pom.xml b/extensions-jvm/barcode/integration-test/pom.xml
new file mode 100644
index 0000000..6d6eced
--- /dev/null
+++ b/extensions-jvm/barcode/integration-test/pom.xml
@@ -0,0 +1,100 @@
+<?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>1.1.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-barcode-integration-test</artifactId>
+    <name>Camel Quarkus :: Barcode :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus Barcode extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</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-barcode</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>
+
+        <!-- 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-barcode-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/barcode/integration-test/src/main/java/org/apache/camel/quarkus/component/barcode/it/BarcodeResource.java b/extensions-jvm/barcode/integration-test/src/main/java/org/apache/camel/quarkus/component/barcode/it/BarcodeResource.java
new file mode 100644
index 0000000..ac9db72
--- /dev/null
+++ b/extensions-jvm/barcode/integration-test/src/main/java/org/apache/camel/quarkus/component/barcode/it/BarcodeResource.java
@@ -0,0 +1,51 @@
+/*
+ * 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.barcode.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+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("/barcode")
+@ApplicationScoped
+public class BarcodeResource {
+
+    private static final Logger LOG = Logger.getLogger(BarcodeResource.class);
+
+    private static final String DATAFORMAT_BARCODE = "barcode";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/dataformat/barcode")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadDataformatBarcode() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveDataFormat(DATAFORMAT_BARCODE) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", DATAFORMAT_BARCODE);
+        return Response.status(500, DATAFORMAT_BARCODE + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/barcode/integration-test/src/test/java/org/apache/camel/quarkus/component/barcode/it/BarcodeTest.java b/extensions-jvm/barcode/integration-test/src/test/java/org/apache/camel/quarkus/component/barcode/it/BarcodeTest.java
new file mode 100644
index 0000000..1dda56c
--- /dev/null
+++ b/extensions-jvm/barcode/integration-test/src/test/java/org/apache/camel/quarkus/component/barcode/it/BarcodeTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.barcode.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class BarcodeTest {
+
+    @Test
+    public void loadDataformatBarcode() {
+        /* A simple autogenerated test */
+        RestAssured.get("/barcode/load/dataformat/barcode")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/barcode/pom.xml b/extensions-jvm/barcode/pom.xml
new file mode 100644
index 0000000..d828802
--- /dev/null
+++ b/extensions-jvm/barcode/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-barcode-parent</artifactId>
+    <name>Camel Quarkus :: Barcode</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/barcode/runtime/pom.xml b/extensions-jvm/barcode/runtime/pom.xml
new file mode 100644
index 0000000..2251be2
--- /dev/null
+++ b/extensions-jvm/barcode/runtime/pom.xml
@@ -0,0 +1,94 @@
+<?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-barcode-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-barcode</artifactId>
+    <name>Camel Quarkus :: Barcode :: Runtime</name>
+    <description>Transform strings to various 1D/2D barcode bitmap formats and back.</description>
+
+    <properties>
+        <firstVersion>1.1.0</firstVersion>
+    </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-barcode</artifactId>
+        </dependency>
+    </dependencies>
+
+    <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>
+            <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>
+</project>
diff --git a/extensions-jvm/barcode/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/barcode/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..e1fbf00
--- /dev/null
+++ b/extensions-jvm/barcode/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 Barcode"
+description: "Transform strings to various 1D/2D barcode bitmap formats and back"
+metadata:
+  unlisted: true
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/barcode.html"
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 0a77f3c..e50d149 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -44,6 +44,7 @@
         <module>aws2-kinesis</module>
         <module>azure-storage-blob</module>
         <module>azure-storage-queue</module>
+        <module>barcode</module>
         <module>beanstalk</module>
         <module>bonita</module>
         <module>browse</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index e4d6b18..6a29681 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -470,6 +470,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-barcode</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-base</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -2394,6 +2399,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-barcode</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-barcode-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-base64</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 09/12: CBOR JVM support

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

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

commit 4c1eb0057e0cbde3fb2c14793c6eb1f565489ae3
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Sep 8 21:31:13 2020 +0200

    CBOR JVM support
---
 catalog/pom.xml                                    |  13 +++
 docs/modules/ROOT/nav.adoc                         |   1 +
 docs/modules/ROOT/pages/reference/dataformats.adoc |   3 +
 .../ROOT/pages/reference/extensions/cbor.adoc      |  29 ++++++
 docs/modules/ROOT/pages/reference/index.adoc       |   3 +
 extensions-jvm/cbor/deployment/pom.xml             |  63 +++++++++++++
 .../component/cbor/deployment/CborProcessor.java   |  46 ++++++++++
 extensions-jvm/cbor/integration-test/pom.xml       | 100 +++++++++++++++++++++
 .../quarkus/component/cbor/it/CborResource.java    |  51 +++++++++++
 .../camel/quarkus/component/cbor/it/CborTest.java  |  34 +++++++
 extensions-jvm/cbor/pom.xml                        |  40 +++++++++
 extensions-jvm/cbor/runtime/pom.xml                |  94 +++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 +++++++
 extensions-jvm/pom.xml                             |   1 +
 poms/bom/pom.xml                                   |  15 ++++
 15 files changed, 525 insertions(+)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index 38e8541..2e4fb75 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -881,6 +881,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-cbor</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-chatscript</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index bdb15fc..baec4ca 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -78,6 +78,7 @@
 *** xref:reference/extensions/caffeine.adoc[Caffeine Cache]
 *** xref:reference/extensions/caffeine-lrucache.adoc[Caffeine LRUCache]
 *** xref:reference/extensions/cassandraql.adoc[Cassandra CQL]
+*** xref:reference/extensions/cbor.adoc[CBOR]
 *** xref:reference/extensions/chatscript.adoc[ChatScript]
 *** xref:reference/extensions/chunk.adoc[Chunk]
 *** xref:reference/extensions/core-cloud.adoc[Cloud]
diff --git a/docs/modules/ROOT/pages/reference/dataformats.adoc b/docs/modules/ROOT/pages/reference/dataformats.adoc
index 0e90fc1..666b684 100644
--- a/docs/modules/ROOT/pages/reference/dataformats.adoc
+++ b/docs/modules/ROOT/pages/reference/dataformats.adoc
@@ -34,6 +34,9 @@ Stable | 1.0.0 | Marshal and unmarshal Java beans from and to flat payloads (suc
 | xref:reference/extensions/bindy.adoc[Bindy Key Value Pair] | [.camel-element-artifact]##camel-quarkus-bindy## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Marshal and unmarshal Java beans from and to flat payloads (such as CSV, delimited, fixed length formats, or FIX messages).
 
+| xref:reference/extensions/cbor.adoc[CBOR] | [.camel-element-artifact]##camel-quarkus-cbor## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Unmarshal a CBOR payload to POJO and back.
+
 | xref:reference/extensions/crypto.adoc[Crypto (Java Cryptographic Extension)] | [.camel-element-artifact]##camel-quarkus-crypto## | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Encrypt and decrypt messages using Java Cryptography Extension (JCE).
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/cbor.adoc b/docs/modules/ROOT/pages/reference/extensions/cbor.adoc
new file mode 100644
index 0000000..8f8517e
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/cbor.adoc
@@ -0,0 +1,29 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+
+[[cbor]]
+= CBOR
+:page-aliases: extensions/cbor.adoc
+
+[.badges]
+[.badge-key]##Since Camel Quarkus##[.badge-version]##1.1.0## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+
+Unmarshal a CBOR payload to POJO and back.
+
+== What's inside
+
+* https://camel.apache.org/components/latest/dataformats/cbor-dataformat.html[CBOR data format]
+
+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-cbor</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
diff --git a/docs/modules/ROOT/pages/reference/index.adoc b/docs/modules/ROOT/pages/reference/index.adoc
index 8490458..0502083 100644
--- a/docs/modules/ROOT/pages/reference/index.adoc
+++ b/docs/modules/ROOT/pages/reference/index.adoc
@@ -212,6 +212,9 @@ Stable | 1.0.0 | An LRUCacheFactory implementation based on Caffeine
 |  xref:reference/extensions/cassandraql.adoc[Cassandra CQL]  | camel-quarkus-cassandraql | [.camel-element-JVM]##JVM## +
 Preview | 1.0.0 | Integrate with Cassandra 2.0 using the CQL3 API (not the Thrift API). Based on Cassandra Java Driver provided by DataStax.
 
+|  xref:reference/extensions/cbor.adoc[CBOR]  | camel-quarkus-cbor | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Unmarshal a CBOR payload to POJO and back.
+
 |  xref:reference/extensions/chatscript.adoc[ChatScript]  | camel-quarkus-chatscript | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Chat with a ChatScript Server.
 
diff --git a/extensions-jvm/cbor/deployment/pom.xml b/extensions-jvm/cbor/deployment/pom.xml
new file mode 100644
index 0000000..f27165e
--- /dev/null
+++ b/extensions-jvm/cbor/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-cbor-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-cbor-deployment</artifactId>
+    <name>Camel Quarkus :: CBOR :: 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-cbor</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/cbor/deployment/src/main/java/org/apache/camel/quarkus/component/cbor/deployment/CborProcessor.java b/extensions-jvm/cbor/deployment/src/main/java/org/apache/camel/quarkus/component/cbor/deployment/CborProcessor.java
new file mode 100644
index 0000000..df6f72b
--- /dev/null
+++ b/extensions-jvm/cbor/deployment/src/main/java/org/apache/camel/quarkus/component/cbor/deployment/CborProcessor.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.cbor.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 CborProcessor {
+
+    private static final Logger LOG = Logger.getLogger(CborProcessor.class);
+    private static final String FEATURE = "camel-cbor";
+
+    @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/cbor/integration-test/pom.xml b/extensions-jvm/cbor/integration-test/pom.xml
new file mode 100644
index 0000000..85984e2
--- /dev/null
+++ b/extensions-jvm/cbor/integration-test/pom.xml
@@ -0,0 +1,100 @@
+<?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>1.1.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-cbor-integration-test</artifactId>
+    <name>Camel Quarkus :: CBOR :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus CBOR extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</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-cbor</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>
+
+        <!-- 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-cbor-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/cbor/integration-test/src/main/java/org/apache/camel/quarkus/component/cbor/it/CborResource.java b/extensions-jvm/cbor/integration-test/src/main/java/org/apache/camel/quarkus/component/cbor/it/CborResource.java
new file mode 100644
index 0000000..5ce2c9f
--- /dev/null
+++ b/extensions-jvm/cbor/integration-test/src/main/java/org/apache/camel/quarkus/component/cbor/it/CborResource.java
@@ -0,0 +1,51 @@
+/*
+ * 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.cbor.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+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("/cbor")
+@ApplicationScoped
+public class CborResource {
+
+    private static final Logger LOG = Logger.getLogger(CborResource.class);
+
+    private static final String DATAFORMAT_CBOR = "cbor";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/dataformat/cbor")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadDataformatCbor() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveDataFormat(DATAFORMAT_CBOR) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", DATAFORMAT_CBOR);
+        return Response.status(500, DATAFORMAT_CBOR + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/cbor/integration-test/src/test/java/org/apache/camel/quarkus/component/cbor/it/CborTest.java b/extensions-jvm/cbor/integration-test/src/test/java/org/apache/camel/quarkus/component/cbor/it/CborTest.java
new file mode 100644
index 0000000..35a4e8f
--- /dev/null
+++ b/extensions-jvm/cbor/integration-test/src/test/java/org/apache/camel/quarkus/component/cbor/it/CborTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.cbor.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class CborTest {
+
+    @Test
+    public void loadDataformatCbor() {
+        /* A simple autogenerated test */
+        RestAssured.get("/cbor/load/dataformat/cbor")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/cbor/pom.xml b/extensions-jvm/cbor/pom.xml
new file mode 100644
index 0000000..b1a4be8
--- /dev/null
+++ b/extensions-jvm/cbor/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-cbor-parent</artifactId>
+    <name>Camel Quarkus :: CBOR</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/cbor/runtime/pom.xml b/extensions-jvm/cbor/runtime/pom.xml
new file mode 100644
index 0000000..9f08062
--- /dev/null
+++ b/extensions-jvm/cbor/runtime/pom.xml
@@ -0,0 +1,94 @@
+<?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-cbor-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-cbor</artifactId>
+    <name>Camel Quarkus :: CBOR :: Runtime</name>
+    <description>Unmarshal a CBOR payload to POJO and back.</description>
+
+    <properties>
+        <firstVersion>1.1.0</firstVersion>
+    </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-cbor</artifactId>
+        </dependency>
+    </dependencies>
+
+    <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>
+            <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>
+</project>
diff --git a/extensions-jvm/cbor/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/cbor/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..3f12b01
--- /dev/null
+++ b/extensions-jvm/cbor/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 CBOR"
+description: "Unmarshal a CBOR payload to POJO and back"
+metadata:
+  unlisted: true
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/cbor.html"
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index dae65f9..9c67f97 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -51,6 +51,7 @@
         <module>browse</module>
         <module>caffeine</module>
         <module>cassandraql</module>
+        <module>cbor</module>
         <module>chatscript</module>
         <module>chunk</module>
         <module>cm-sms</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 23ada11..e797896 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -550,6 +550,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-cbor</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-chatscript</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -2544,6 +2549,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-cbor</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-cbor-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-chatscript</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 06/12: ASN.1 File JVM support

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

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

commit 71c4ffcf9ae53e088769ad2f324a9a1af81d372f
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Sep 8 21:25:04 2020 +0200

    ASN.1 File JVM support
---
 catalog/pom.xml                                    |  13 +++
 docs/modules/ROOT/nav.adoc                         |   1 +
 docs/modules/ROOT/pages/reference/dataformats.adoc |   3 +
 .../ROOT/pages/reference/extensions/asn1.adoc      |  29 ++++++
 docs/modules/ROOT/pages/reference/index.adoc       |   3 +
 extensions-jvm/asn1/deployment/pom.xml             |  63 +++++++++++++
 .../component/asn1/deployment/Asn1Processor.java   |  46 ++++++++++
 extensions-jvm/asn1/integration-test/pom.xml       | 100 +++++++++++++++++++++
 .../quarkus/component/asn1/it/Asn1Resource.java    |  51 +++++++++++
 .../camel/quarkus/component/asn1/it/Asn1Test.java  |  34 +++++++
 extensions-jvm/asn1/pom.xml                        |  40 +++++++++
 extensions-jvm/asn1/runtime/pom.xml                |  94 +++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 +++++++
 extensions-jvm/pom.xml                             |   1 +
 poms/bom/pom.xml                                   |  15 ++++
 15 files changed, 525 insertions(+)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index 37d6fe6..b0ebd2d 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -153,6 +153,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-asn1</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-asterisk</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 12cfb5d..60ace9a 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -20,6 +20,7 @@
 *** xref:reference/extensions/apns.adoc[APNS]
 *** xref:reference/extensions/arangodb.adoc[ArangoDb]
 *** xref:reference/extensions/as2.adoc[AS2]
+*** xref:reference/extensions/asn1.adoc[ASN.1 File]
 *** xref:reference/extensions/asterisk.adoc[Asterisk]
 *** xref:reference/extensions/ahc.adoc[Async HTTP Client (AHC)]
 *** xref:reference/extensions/ahc-ws.adoc[Async HTTP Client (AHC) Websocket]
diff --git a/docs/modules/ROOT/pages/reference/dataformats.adoc b/docs/modules/ROOT/pages/reference/dataformats.adoc
index 5fa45f1..ff9f594 100644
--- a/docs/modules/ROOT/pages/reference/dataformats.adoc
+++ b/docs/modules/ROOT/pages/reference/dataformats.adoc
@@ -10,6 +10,9 @@
 |===
 | Data format | Artifact | Support Level | Since | Description
 
+| xref:reference/extensions/asn1.adoc[ASN.1 File] | [.camel-element-artifact]##camel-quarkus-asn1## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Encode and decode data structures using Abstract Syntax Notation One (ASN.1).
+
 | xref:reference/extensions/avro.adoc[Avro] | [.camel-element-artifact]##camel-quarkus-avro## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Serialize and deserialize messages using Apache Avro binary data format.
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/asn1.adoc b/docs/modules/ROOT/pages/reference/extensions/asn1.adoc
new file mode 100644
index 0000000..bffd387
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/asn1.adoc
@@ -0,0 +1,29 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+
+[[asn1]]
+= ASN.1 File
+:page-aliases: extensions/asn1.adoc
+
+[.badges]
+[.badge-key]##Since Camel Quarkus##[.badge-version]##1.1.0## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+
+Encode and decode data structures using Abstract Syntax Notation One (ASN.1).
+
+== What's inside
+
+* https://camel.apache.org/components/latest/dataformats/asn1-dataformat.html[ASN.1 File data format]
+
+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-asn1</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
diff --git a/docs/modules/ROOT/pages/reference/index.adoc b/docs/modules/ROOT/pages/reference/index.adoc
index 3b660cd..3ac0a90 100644
--- a/docs/modules/ROOT/pages/reference/index.adoc
+++ b/docs/modules/ROOT/pages/reference/index.adoc
@@ -38,6 +38,9 @@ Stable | 1.1.0 | Perform operations on ArangoDb when used as a Document Database
 |  xref:reference/extensions/as2.adoc[AS2]  | camel-quarkus-as2 | [.camel-element-Native]##Native## +
 Stable | 1.0.0-CR4 | Transfer data securely and reliably using the AS2 protocol (RFC4130).
 
+|  xref:reference/extensions/asn1.adoc[ASN.1 File]  | camel-quarkus-asn1 | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Encode and decode data structures using Abstract Syntax Notation One (ASN.1).
+
 |  xref:reference/extensions/asterisk.adoc[Asterisk]  | camel-quarkus-asterisk | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Interact with Asterisk PBX Server.
 
diff --git a/extensions-jvm/asn1/deployment/pom.xml b/extensions-jvm/asn1/deployment/pom.xml
new file mode 100644
index 0000000..3d8dd2c
--- /dev/null
+++ b/extensions-jvm/asn1/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-asn1-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-asn1-deployment</artifactId>
+    <name>Camel Quarkus :: ASN.1 File :: 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-asn1</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/asn1/deployment/src/main/java/org/apache/camel/quarkus/component/asn1/deployment/Asn1Processor.java b/extensions-jvm/asn1/deployment/src/main/java/org/apache/camel/quarkus/component/asn1/deployment/Asn1Processor.java
new file mode 100644
index 0000000..6aa3f03
--- /dev/null
+++ b/extensions-jvm/asn1/deployment/src/main/java/org/apache/camel/quarkus/component/asn1/deployment/Asn1Processor.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.asn1.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 Asn1Processor {
+
+    private static final Logger LOG = Logger.getLogger(Asn1Processor.class);
+    private static final String FEATURE = "camel-asn1";
+
+    @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/asn1/integration-test/pom.xml b/extensions-jvm/asn1/integration-test/pom.xml
new file mode 100644
index 0000000..5f08337
--- /dev/null
+++ b/extensions-jvm/asn1/integration-test/pom.xml
@@ -0,0 +1,100 @@
+<?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>1.1.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-asn1-integration-test</artifactId>
+    <name>Camel Quarkus :: ASN.1 File :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus ASN.1 File extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</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-asn1</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>
+
+        <!-- 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-asn1-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/asn1/integration-test/src/main/java/org/apache/camel/quarkus/component/asn1/it/Asn1Resource.java b/extensions-jvm/asn1/integration-test/src/main/java/org/apache/camel/quarkus/component/asn1/it/Asn1Resource.java
new file mode 100644
index 0000000..f59174b
--- /dev/null
+++ b/extensions-jvm/asn1/integration-test/src/main/java/org/apache/camel/quarkus/component/asn1/it/Asn1Resource.java
@@ -0,0 +1,51 @@
+/*
+ * 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.asn1.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+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("/asn1")
+@ApplicationScoped
+public class Asn1Resource {
+
+    private static final Logger LOG = Logger.getLogger(Asn1Resource.class);
+
+    private static final String DATAFORMAT_ASN1 = "asn1";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/dataformat/asn1")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadDataformatAsn1() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveDataFormat(DATAFORMAT_ASN1) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", DATAFORMAT_ASN1);
+        return Response.status(500, DATAFORMAT_ASN1 + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/asn1/integration-test/src/test/java/org/apache/camel/quarkus/component/asn1/it/Asn1Test.java b/extensions-jvm/asn1/integration-test/src/test/java/org/apache/camel/quarkus/component/asn1/it/Asn1Test.java
new file mode 100644
index 0000000..0f09e24
--- /dev/null
+++ b/extensions-jvm/asn1/integration-test/src/test/java/org/apache/camel/quarkus/component/asn1/it/Asn1Test.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.asn1.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class Asn1Test {
+
+    @Test
+    public void loadDataformatAsn1() {
+        /* A simple autogenerated test */
+        RestAssured.get("/asn1/load/dataformat/asn1")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/asn1/pom.xml b/extensions-jvm/asn1/pom.xml
new file mode 100644
index 0000000..50942c7
--- /dev/null
+++ b/extensions-jvm/asn1/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-asn1-parent</artifactId>
+    <name>Camel Quarkus :: ASN.1 File</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/asn1/runtime/pom.xml b/extensions-jvm/asn1/runtime/pom.xml
new file mode 100644
index 0000000..e9839ae
--- /dev/null
+++ b/extensions-jvm/asn1/runtime/pom.xml
@@ -0,0 +1,94 @@
+<?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-asn1-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-asn1</artifactId>
+    <name>Camel Quarkus :: ASN.1 File :: Runtime</name>
+    <description>Encode and decode data structures using Abstract Syntax Notation One (ASN.1).</description>
+
+    <properties>
+        <firstVersion>1.1.0</firstVersion>
+    </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-asn1</artifactId>
+        </dependency>
+    </dependencies>
+
+    <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>
+            <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>
+</project>
diff --git a/extensions-jvm/asn1/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/asn1/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..fc6db64
--- /dev/null
+++ b/extensions-jvm/asn1/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 ASN.1 File"
+description: "Encode and decode data structures using Abstract Syntax Notation One (ASN.1)"
+metadata:
+  unlisted: true
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/asn1.html"
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 08c49f8..0a77f3c 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -35,6 +35,7 @@
     <modules>
         <!-- extensions a..z; do not remove this comment, it is important when sorting via  mvn process-resources -Pformat -->
         <module>apns</module>
+        <module>asn1</module>
         <module>asterisk</module>
         <module>atmos</module>
         <module>atom</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index d59c041..e4d6b18 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -146,6 +146,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-asn1</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-asterisk</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -1969,6 +1974,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-asn1</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-asn1-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-asterisk</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 11/12: uniVocity JVM support

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

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

commit 0400fb9d6a08ed1cd287aa47b85621e23c0fbf54
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Sep 8 21:35:45 2020 +0200

    uniVocity JVM support
---
 catalog/pom.xml                                    |  13 +++
 docs/modules/ROOT/nav.adoc                         |   1 +
 docs/modules/ROOT/pages/reference/dataformats.adoc |   9 ++
 .../reference/extensions/univocity-parsers.adoc    |  31 +++++++
 docs/modules/ROOT/pages/reference/index.adoc       |   3 +
 extensions-jvm/pom.xml                             |   1 +
 .../univocity-parsers/deployment/pom.xml           |  63 +++++++++++++
 .../deployment/UnivocityParsersProcessor.java      |  46 ++++++++++
 .../univocity-parsers/integration-test/pom.xml     | 100 +++++++++++++++++++++
 .../parsers/it/UnivocityParsersResource.java       |  77 ++++++++++++++++
 .../univocity/parsers/it/UnivocityParsersTest.java |  50 +++++++++++
 extensions-jvm/univocity-parsers/pom.xml           |  40 +++++++++
 extensions-jvm/univocity-parsers/runtime/pom.xml   |  94 +++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 +++++++
 poms/bom/pom.xml                                   |  15 ++++
 15 files changed, 575 insertions(+)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index e5a6c70..97e380c 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -3702,6 +3702,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-univocity-parsers</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-validator</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index a1d6c6c..3c9f89f 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -274,6 +274,7 @@
 *** xref:reference/extensions/timer.adoc[Timer]
 *** xref:reference/extensions/twilio.adoc[Twilio]
 *** xref:reference/extensions/twitter.adoc[Twitter]
+*** xref:reference/extensions/univocity-parsers.adoc[uniVocity CSV]
 *** xref:reference/extensions/validator.adoc[Validator]
 *** xref:reference/extensions/velocity.adoc[Velocity]
 *** xref:reference/extensions/vertx.adoc[Vert.x]
diff --git a/docs/modules/ROOT/pages/reference/dataformats.adoc b/docs/modules/ROOT/pages/reference/dataformats.adoc
index 13c0a1f..70323c6 100644
--- a/docs/modules/ROOT/pages/reference/dataformats.adoc
+++ b/docs/modules/ROOT/pages/reference/dataformats.adoc
@@ -118,6 +118,15 @@ Preview | 1.1.0 | Serialize and deserialize messages using Apache Thrift binary
 | xref:reference/extensions/tagsoup.adoc[TidyMarkup] | [.camel-element-artifact]##camel-quarkus-tagsoup## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Parse (potentially invalid) HTML into valid HTML or DOM.
 
+| xref:reference/extensions/univocity-parsers.adoc[uniVocity CSV] | [.camel-element-artifact]##camel-quarkus-univocity-parsers## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshal and unmarshal Java objects from and to CSV (Comma Separated Values) using UniVocity Parsers.
+
+| xref:reference/extensions/univocity-parsers.adoc[uniVocity Fixed Length] | [.camel-element-artifact]##camel-quarkus-univocity-parsers## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshal and unmarshal Java objects from and to fixed length records using UniVocity Parsers.
+
+| xref:reference/extensions/univocity-parsers.adoc[uniVocity TSV] | [.camel-element-artifact]##camel-quarkus-univocity-parsers## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshal and unmarshal Java objects from and to TSV (Tab-Separated Values) records using UniVocity Parsers.
+
 | xref:reference/extensions/xmlsecurity.adoc[XML Security] | [.camel-element-artifact]##camel-quarkus-xmlsecurity## | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Encrypt and decrypt XML payloads using Apache Santuario.
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/univocity-parsers.adoc b/docs/modules/ROOT/pages/reference/extensions/univocity-parsers.adoc
new file mode 100644
index 0000000..9ec019f
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/univocity-parsers.adoc
@@ -0,0 +1,31 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+
+[[univocity-parsers]]
+= uniVocity CSV
+:page-aliases: extensions/univocity-parsers.adoc
+
+[.badges]
+[.badge-key]##Since Camel Quarkus##[.badge-version]##1.1.0## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+
+Marshal and unmarshal Java objects from and to CSV (Comma Separated Values) using UniVocity Parsers.
+
+== What's inside
+
+* https://camel.apache.org/components/latest/dataformats/univocity-csv-dataformat.html[uniVocity CSV data format]
+* https://camel.apache.org/components/latest/dataformats/univocity-fixed-dataformat.html[uniVocity Fixed Length data format]
+* https://camel.apache.org/components/latest/dataformats/univocity-tsv-dataformat.html[uniVocity TSV data format]
+
+Please refer to the above links for usage and configuration details.
+
+== Maven coordinates
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.camel.quarkus</groupId>
+    <artifactId>camel-quarkus-univocity-parsers</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
diff --git a/docs/modules/ROOT/pages/reference/index.adoc b/docs/modules/ROOT/pages/reference/index.adoc
index 0b3f078..634c641 100644
--- a/docs/modules/ROOT/pages/reference/index.adoc
+++ b/docs/modules/ROOT/pages/reference/index.adoc
@@ -800,6 +800,9 @@ Preview | 1.1.0 | Interact with Twilio REST APIs using Twilio Java SDK.
 |  xref:reference/extensions/twitter.adoc[Twitter]  | camel-quarkus-twitter | [.camel-element-Native]##Native## +
 Stable | 0.2.0 | Send tweets and receive tweets, direct messages and access Twitter Search
 
+|  xref:reference/extensions/univocity-parsers.adoc[uniVocity CSV]  | camel-quarkus-univocity-parsers | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshal and unmarshal Java objects from and to CSV (Comma Separated Values) using UniVocity Parsers.
+
 |  xref:reference/extensions/validator.adoc[Validator]  | camel-quarkus-validator | [.camel-element-Native]##Native## +
 Stable | 0.4.0 | Validate the payload using XML Schema and JAXP Validation.
 
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 097850e..30042ab 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -145,6 +145,7 @@
         <module>syslog</module>
         <module>thrift</module>
         <module>twilio</module>
+        <module>univocity-parsers</module>
         <module>velocity</module>
         <module>web3j</module>
         <module>weka</module>
diff --git a/extensions-jvm/univocity-parsers/deployment/pom.xml b/extensions-jvm/univocity-parsers/deployment/pom.xml
new file mode 100644
index 0000000..1bcca1b
--- /dev/null
+++ b/extensions-jvm/univocity-parsers/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-univocity-parsers-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-univocity-parsers-deployment</artifactId>
+    <name>Camel Quarkus :: uniVocity CSV :: 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-univocity-parsers</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/univocity-parsers/deployment/src/main/java/org/apache/camel/quarkus/component/univocity/parsers/deployment/UnivocityParsersProcessor.java b/extensions-jvm/univocity-parsers/deployment/src/main/java/org/apache/camel/quarkus/component/univocity/parsers/deployment/UnivocityParsersProcessor.java
new file mode 100644
index 0000000..a725f29
--- /dev/null
+++ b/extensions-jvm/univocity-parsers/deployment/src/main/java/org/apache/camel/quarkus/component/univocity/parsers/deployment/UnivocityParsersProcessor.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.univocity.parsers.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 UnivocityParsersProcessor {
+
+    private static final Logger LOG = Logger.getLogger(UnivocityParsersProcessor.class);
+    private static final String FEATURE = "camel-univocity-parsers";
+
+    @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/univocity-parsers/integration-test/pom.xml b/extensions-jvm/univocity-parsers/integration-test/pom.xml
new file mode 100644
index 0000000..210ca2c
--- /dev/null
+++ b/extensions-jvm/univocity-parsers/integration-test/pom.xml
@@ -0,0 +1,100 @@
+<?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>1.1.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-univocity-parsers-integration-test</artifactId>
+    <name>Camel Quarkus :: uniVocity CSV :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus uniVocity CSV extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</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-univocity-parsers</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>
+
+        <!-- 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-univocity-parsers-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/univocity-parsers/integration-test/src/main/java/org/apache/camel/quarkus/component/univocity/parsers/it/UnivocityParsersResource.java b/extensions-jvm/univocity-parsers/integration-test/src/main/java/org/apache/camel/quarkus/component/univocity/parsers/it/UnivocityParsersResource.java
new file mode 100644
index 0000000..427fba4
--- /dev/null
+++ b/extensions-jvm/univocity-parsers/integration-test/src/main/java/org/apache/camel/quarkus/component/univocity/parsers/it/UnivocityParsersResource.java
@@ -0,0 +1,77 @@
+/*
+ * 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.univocity.parsers.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+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("/univocity-parsers")
+@ApplicationScoped
+public class UnivocityParsersResource {
+
+    private static final Logger LOG = Logger.getLogger(UnivocityParsersResource.class);
+
+    private static final String DATAFORMAT_UNIVOCITY_CSV = "univocity-csv";
+    private static final String DATAFORMAT_UNIVOCITY_FIXED = "univocity-fixed";
+    private static final String DATAFORMAT_UNIVOCITY_TSV = "univocity-tsv";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/dataformat/univocity-csv")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadDataformatUnivocityCsv() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveDataFormat(DATAFORMAT_UNIVOCITY_CSV) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", DATAFORMAT_UNIVOCITY_CSV);
+        return Response.status(500, DATAFORMAT_UNIVOCITY_CSV + " could not be loaded from the Camel context").build();
+    }
+
+    @Path("/load/dataformat/univocity-fixed")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadDataformatUnivocityFixed() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveDataFormat(DATAFORMAT_UNIVOCITY_FIXED) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", DATAFORMAT_UNIVOCITY_FIXED);
+        return Response.status(500, DATAFORMAT_UNIVOCITY_FIXED + " could not be loaded from the Camel context").build();
+    }
+
+    @Path("/load/dataformat/univocity-tsv")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadDataformatUnivocityTsv() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveDataFormat(DATAFORMAT_UNIVOCITY_TSV) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", DATAFORMAT_UNIVOCITY_TSV);
+        return Response.status(500, DATAFORMAT_UNIVOCITY_TSV + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/univocity-parsers/integration-test/src/test/java/org/apache/camel/quarkus/component/univocity/parsers/it/UnivocityParsersTest.java b/extensions-jvm/univocity-parsers/integration-test/src/test/java/org/apache/camel/quarkus/component/univocity/parsers/it/UnivocityParsersTest.java
new file mode 100644
index 0000000..40f28ea
--- /dev/null
+++ b/extensions-jvm/univocity-parsers/integration-test/src/test/java/org/apache/camel/quarkus/component/univocity/parsers/it/UnivocityParsersTest.java
@@ -0,0 +1,50 @@
+/*
+ * 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.univocity.parsers.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class UnivocityParsersTest {
+
+    @Test
+    public void loadDataformatUnivocityCsv() {
+        /* A simple autogenerated test */
+        RestAssured.get("/univocity-parsers/load/dataformat/univocity-csv")
+                .then()
+                .statusCode(200);
+    }
+
+    @Test
+    public void loadDataformatUnivocityFixed() {
+        /* A simple autogenerated test */
+        RestAssured.get("/univocity-parsers/load/dataformat/univocity-fixed")
+                .then()
+                .statusCode(200);
+    }
+
+    @Test
+    public void loadDataformatUnivocityTsv() {
+        /* A simple autogenerated test */
+        RestAssured.get("/univocity-parsers/load/dataformat/univocity-tsv")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/univocity-parsers/pom.xml b/extensions-jvm/univocity-parsers/pom.xml
new file mode 100644
index 0000000..1533dfe
--- /dev/null
+++ b/extensions-jvm/univocity-parsers/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-univocity-parsers-parent</artifactId>
+    <name>Camel Quarkus :: uniVocity CSV</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/univocity-parsers/runtime/pom.xml b/extensions-jvm/univocity-parsers/runtime/pom.xml
new file mode 100644
index 0000000..ccb6298
--- /dev/null
+++ b/extensions-jvm/univocity-parsers/runtime/pom.xml
@@ -0,0 +1,94 @@
+<?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-univocity-parsers-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-univocity-parsers</artifactId>
+    <name>Camel Quarkus :: uniVocity CSV :: Runtime</name>
+    <description>Marshal and unmarshal Java objects from and to CSV (Comma Separated Values) using UniVocity Parsers.</description>
+
+    <properties>
+        <firstVersion>1.1.0</firstVersion>
+    </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-univocity-parsers</artifactId>
+        </dependency>
+    </dependencies>
+
+    <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>
+            <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>
+</project>
diff --git a/extensions-jvm/univocity-parsers/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/univocity-parsers/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..4ca500c
--- /dev/null
+++ b/extensions-jvm/univocity-parsers/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 uniVocity CSV"
+description: "Marshal and unmarshal Java objects from and to CSV (Comma Separated Values) using UniVocity Parsers"
+metadata:
+  unlisted: true
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/univocity-parsers.html"
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 3df1fa4..f8fc6cf 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -1767,6 +1767,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-univocity-parsers</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-validator</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -4724,6 +4729,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-univocity-parsers</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-univocity-parsers-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-validator</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 10/12: JSon Fastjson JVM support

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

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

commit 94b3a5c7c6f5cc3f802d22e12c85ec1faad8f760
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Sep 8 21:33:23 2020 +0200

    JSon Fastjson JVM support
---
 catalog/pom.xml                                    |  13 +++
 docs/modules/ROOT/nav.adoc                         |   1 +
 docs/modules/ROOT/pages/reference/dataformats.adoc |   3 +
 .../ROOT/pages/reference/extensions/fastjson.adoc  |  29 ++++++
 docs/modules/ROOT/pages/reference/index.adoc       |   3 +
 extensions-jvm/fastjson/deployment/pom.xml         |  63 +++++++++++++
 .../fastjson/deployment/FastjsonProcessor.java     |  46 ++++++++++
 extensions-jvm/fastjson/integration-test/pom.xml   | 100 +++++++++++++++++++++
 .../component/fastjson/it/FastjsonResource.java    |  51 +++++++++++
 .../component/fastjson/it/FastjsonTest.java        |  34 +++++++
 extensions-jvm/fastjson/pom.xml                    |  40 +++++++++
 extensions-jvm/fastjson/runtime/pom.xml            |  94 +++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 +++++++
 extensions-jvm/pom.xml                             |   1 +
 poms/bom/pom.xml                                   |  15 ++++
 15 files changed, 525 insertions(+)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index 2e4fb75..e5a6c70 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -1375,6 +1375,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-fastjson</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-fhir</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index baec4ca..a1d6c6c 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -168,6 +168,7 @@
 *** xref:reference/extensions/jooq.adoc[JOOQ]
 *** xref:reference/extensions/jpa.adoc[JPA]
 *** xref:reference/extensions/jslt.adoc[JSLT]
+*** xref:reference/extensions/fastjson.adoc[JSON Fastjson]
 *** xref:reference/extensions/gson.adoc[JSON Gson]
 *** xref:reference/extensions/jackson.adoc[JSON Jackson]
 *** xref:reference/extensions/johnzon.adoc[JSON Johnzon]
diff --git a/docs/modules/ROOT/pages/reference/dataformats.adoc b/docs/modules/ROOT/pages/reference/dataformats.adoc
index 666b684..13c0a1f 100644
--- a/docs/modules/ROOT/pages/reference/dataformats.adoc
+++ b/docs/modules/ROOT/pages/reference/dataformats.adoc
@@ -70,6 +70,9 @@ Stable | 1.0.0 | Unmarshal a XML payloads to POJOs and back using XMLMapper exte
 | xref:reference/extensions/jaxb.adoc[JAXB] | [.camel-element-artifact]##camel-quarkus-jaxb## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Unmarshal XML payloads to POJOs and back using JAXB2 XML marshalling standard.
 
+| xref:reference/extensions/fastjson.adoc[JSON Fastjson] | [.camel-element-artifact]##camel-quarkus-fastjson## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshal POJOs to JSON and back.
+
 | xref:reference/extensions/gson.adoc[JSON Gson] | [.camel-element-artifact]##camel-quarkus-gson## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Marshal POJOs to JSON and back.
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/fastjson.adoc b/docs/modules/ROOT/pages/reference/extensions/fastjson.adoc
new file mode 100644
index 0000000..839652d
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/fastjson.adoc
@@ -0,0 +1,29 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+
+[[fastjson]]
+= JSON Fastjson
+:page-aliases: extensions/fastjson.adoc
+
+[.badges]
+[.badge-key]##Since Camel Quarkus##[.badge-version]##1.1.0## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+
+Marshal POJOs to JSON and back.
+
+== What's inside
+
+* https://camel.apache.org/components/latest/dataformats/json-fastjson-dataformat.html[JSON Fastjson data format]
+
+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-fastjson</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
diff --git a/docs/modules/ROOT/pages/reference/index.adoc b/docs/modules/ROOT/pages/reference/index.adoc
index 0502083..0b3f078 100644
--- a/docs/modules/ROOT/pages/reference/index.adoc
+++ b/docs/modules/ROOT/pages/reference/index.adoc
@@ -482,6 +482,9 @@ Stable | 1.0.0 | Store and retrieve Java objects from databases using Java Persi
 |  xref:reference/extensions/jslt.adoc[JSLT]  | camel-quarkus-jslt | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Query or transform JSON payloads using an JSLT.
 
+|  xref:reference/extensions/fastjson.adoc[JSON Fastjson]  | camel-quarkus-fastjson | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshal POJOs to JSON and back.
+
 |  xref:reference/extensions/gson.adoc[JSON Gson]  | camel-quarkus-gson | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Marshal POJOs to JSON and back.
 
diff --git a/extensions-jvm/fastjson/deployment/pom.xml b/extensions-jvm/fastjson/deployment/pom.xml
new file mode 100644
index 0000000..908ce33
--- /dev/null
+++ b/extensions-jvm/fastjson/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-fastjson-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-fastjson-deployment</artifactId>
+    <name>Camel Quarkus :: JSON Fastjson :: 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-fastjson</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/fastjson/deployment/src/main/java/org/apache/camel/quarkus/component/fastjson/deployment/FastjsonProcessor.java b/extensions-jvm/fastjson/deployment/src/main/java/org/apache/camel/quarkus/component/fastjson/deployment/FastjsonProcessor.java
new file mode 100644
index 0000000..c1c632a
--- /dev/null
+++ b/extensions-jvm/fastjson/deployment/src/main/java/org/apache/camel/quarkus/component/fastjson/deployment/FastjsonProcessor.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.fastjson.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 FastjsonProcessor {
+
+    private static final Logger LOG = Logger.getLogger(FastjsonProcessor.class);
+    private static final String FEATURE = "camel-fastjson";
+
+    @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/fastjson/integration-test/pom.xml b/extensions-jvm/fastjson/integration-test/pom.xml
new file mode 100644
index 0000000..c3d0b16
--- /dev/null
+++ b/extensions-jvm/fastjson/integration-test/pom.xml
@@ -0,0 +1,100 @@
+<?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>1.1.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-fastjson-integration-test</artifactId>
+    <name>Camel Quarkus :: JSON Fastjson :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus JSON Fastjson extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</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-fastjson</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>
+
+        <!-- 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-fastjson-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/fastjson/integration-test/src/main/java/org/apache/camel/quarkus/component/fastjson/it/FastjsonResource.java b/extensions-jvm/fastjson/integration-test/src/main/java/org/apache/camel/quarkus/component/fastjson/it/FastjsonResource.java
new file mode 100644
index 0000000..14275b0
--- /dev/null
+++ b/extensions-jvm/fastjson/integration-test/src/main/java/org/apache/camel/quarkus/component/fastjson/it/FastjsonResource.java
@@ -0,0 +1,51 @@
+/*
+ * 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.fastjson.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+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("/fastjson")
+@ApplicationScoped
+public class FastjsonResource {
+
+    private static final Logger LOG = Logger.getLogger(FastjsonResource.class);
+
+    private static final String DATAFORMAT_JSON_FASTJSON = "json-fastjson";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/dataformat/json-fastjson")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadDataformatJsonFastjson() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveDataFormat(DATAFORMAT_JSON_FASTJSON) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", DATAFORMAT_JSON_FASTJSON);
+        return Response.status(500, DATAFORMAT_JSON_FASTJSON + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/fastjson/integration-test/src/test/java/org/apache/camel/quarkus/component/fastjson/it/FastjsonTest.java b/extensions-jvm/fastjson/integration-test/src/test/java/org/apache/camel/quarkus/component/fastjson/it/FastjsonTest.java
new file mode 100644
index 0000000..50afa3c
--- /dev/null
+++ b/extensions-jvm/fastjson/integration-test/src/test/java/org/apache/camel/quarkus/component/fastjson/it/FastjsonTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.fastjson.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class FastjsonTest {
+
+    @Test
+    public void loadDataformatJsonFastjson() {
+        /* A simple autogenerated test */
+        RestAssured.get("/fastjson/load/dataformat/json-fastjson")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/fastjson/pom.xml b/extensions-jvm/fastjson/pom.xml
new file mode 100644
index 0000000..67f08ee
--- /dev/null
+++ b/extensions-jvm/fastjson/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-fastjson-parent</artifactId>
+    <name>Camel Quarkus :: JSON Fastjson</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/fastjson/runtime/pom.xml b/extensions-jvm/fastjson/runtime/pom.xml
new file mode 100644
index 0000000..d3b5a9f
--- /dev/null
+++ b/extensions-jvm/fastjson/runtime/pom.xml
@@ -0,0 +1,94 @@
+<?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-fastjson-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-fastjson</artifactId>
+    <name>Camel Quarkus :: JSON Fastjson :: Runtime</name>
+    <description>Marshal POJOs to JSON and back.</description>
+
+    <properties>
+        <firstVersion>1.1.0</firstVersion>
+    </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-fastjson</artifactId>
+        </dependency>
+    </dependencies>
+
+    <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>
+            <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>
+</project>
diff --git a/extensions-jvm/fastjson/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/fastjson/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..99ffd1d
--- /dev/null
+++ b/extensions-jvm/fastjson/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 JSON Fastjson"
+description: "Marshal POJOs to JSON and back"
+metadata:
+  unlisted: true
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/fastjson.html"
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 9c67f97..097850e 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -71,6 +71,7 @@
         <module>elsql</module>
         <module>etcd</module>
         <module>facebook</module>
+        <module>fastjson</module>
         <module>flink</module>
         <module>fop</module>
         <module>ganglia</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index e797896..3df1fa4 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -784,6 +784,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-fastjson</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-fhir</artifactId>
                 <version>${camel.version}</version>
                 <exclusions>
@@ -2929,6 +2934,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-fastjson</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-fastjson-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-fhir</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 03/12: HL7 Terser JVM support

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

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

commit e36199c7c6a3a49239dc4c1959f4d720afe4a417
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Sep 8 21:03:46 2020 +0200

    HL7 Terser JVM support
---
 catalog/pom.xml                                    |  13 +++
 docs/modules/ROOT/nav.adoc                         |   1 +
 docs/modules/ROOT/pages/reference/dataformats.adoc |   3 +
 .../ROOT/pages/reference/extensions/hl7.adoc       |  30 +++++++
 docs/modules/ROOT/pages/reference/index.adoc       |   3 +
 docs/modules/ROOT/pages/reference/languages.adoc   |   3 +
 extensions-jvm/hl7/deployment/pom.xml              |  63 +++++++++++++
 .../component/hl7/deployment/Hl7Processor.java     |  46 ++++++++++
 extensions-jvm/hl7/integration-test/pom.xml        | 100 +++++++++++++++++++++
 .../quarkus/component/hl7/it/Hl7Resource.java      |  64 +++++++++++++
 .../camel/quarkus/component/hl7/it/Hl7Test.java    |  42 +++++++++
 extensions-jvm/hl7/pom.xml                         |  40 +++++++++
 extensions-jvm/hl7/runtime/pom.xml                 |  94 +++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 +++++++
 extensions-jvm/pom.xml                             |   1 +
 poms/bom/pom.xml                                   |  15 ++++
 16 files changed, 550 insertions(+)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index 62139aa..f621fe9 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -1661,6 +1661,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-hl7</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-http</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 7d7026b..89d66cc 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -137,6 +137,7 @@
 *** xref:reference/extensions/hazelcast.adoc[Hazelcast Atomic Number]
 *** xref:reference/extensions/hdfs.adoc[HDFS]
 *** xref:reference/extensions/hipchat.adoc[Hipchat]
+*** xref:reference/extensions/hl7.adoc[HL7]
 *** xref:reference/extensions/http.adoc[HTTP]
 *** xref:reference/extensions/hystrix.adoc[Hystrix]
 *** xref:reference/extensions/ical.adoc[iCal]
diff --git a/docs/modules/ROOT/pages/reference/dataformats.adoc b/docs/modules/ROOT/pages/reference/dataformats.adoc
index 52fa925..222acce 100644
--- a/docs/modules/ROOT/pages/reference/dataformats.adoc
+++ b/docs/modules/ROOT/pages/reference/dataformats.adoc
@@ -46,6 +46,9 @@ Stable | 1.0.0 | Unmarshal unstructured data to objects using Logstash based Gro
 | xref:reference/extensions/zip-deflater.adoc[GZip Deflater] | [.camel-element-artifact]##camel-quarkus-zip-deflater## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Compress and decompress messages using java.util.zip.GZIPStream.
 
+| xref:reference/extensions/hl7.adoc[HL7] | [.camel-element-artifact]##camel-quarkus-hl7## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshal and unmarshal HL7 (Health Care) model objects using the HL7 MLLP codec.
+
 | xref:reference/extensions/ical.adoc[iCal] | [.camel-element-artifact]##camel-quarkus-ical## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Marshal and unmarshal iCal (.ics) documents to/from model objects provided by the iCal4j library.
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/hl7.adoc b/docs/modules/ROOT/pages/reference/extensions/hl7.adoc
new file mode 100644
index 0000000..bae242c
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/hl7.adoc
@@ -0,0 +1,30 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+
+[[hl7]]
+= HL7
+:page-aliases: extensions/hl7.adoc
+
+[.badges]
+[.badge-key]##Since Camel Quarkus##[.badge-version]##1.1.0## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+
+Marshal and unmarshal HL7 (Health Care) model objects using the HL7 MLLP codec.
+
+== What's inside
+
+* https://camel.apache.org/components/latest/dataformats/hl7-dataformat.html[HL7 data format]
+* https://camel.apache.org/components/latest/languages/hl7terser-language.html[HL7 Terser language]
+
+Please refer to the above links for usage and configuration details.
+
+== Maven coordinates
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.camel.quarkus</groupId>
+    <artifactId>camel-quarkus-hl7</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
diff --git a/docs/modules/ROOT/pages/reference/index.adoc b/docs/modules/ROOT/pages/reference/index.adoc
index ebeea55..ec42d78 100644
--- a/docs/modules/ROOT/pages/reference/index.adoc
+++ b/docs/modules/ROOT/pages/reference/index.adoc
@@ -389,6 +389,9 @@ Preview | 1.1.0 | Read and write from/to an HDFS filesystem using Hadoop 2.x.
 |  xref:reference/extensions/hipchat.adoc[Hipchat]  | camel-quarkus-hipchat | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Send and receive messages to/from Hipchat service.
 
+|  xref:reference/extensions/hl7.adoc[HL7]  | camel-quarkus-hl7 | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshal and unmarshal HL7 (Health Care) model objects using the HL7 MLLP codec.
+
 |  xref:reference/extensions/http.adoc[HTTP]  | camel-quarkus-http | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Send requests to external HTTP servers using Apache HTTP Client 4.x.
 
diff --git a/docs/modules/ROOT/pages/reference/languages.adoc b/docs/modules/ROOT/pages/reference/languages.adoc
index 2e92978..f14228b 100644
--- a/docs/modules/ROOT/pages/reference/languages.adoc
+++ b/docs/modules/ROOT/pages/reference/languages.adoc
@@ -28,6 +28,9 @@ Preview | 1.0.0 | Evaluate a Groovy script.
 | xref:reference/extensions/core.adoc[Header] | [.camel-element-artifact]##camel-quarkus-core## | [.camel-element-Native]##Native## +
 Stable | 0.2.0 | Get the value of the named Camel Message header.
 
+| xref:reference/extensions/hl7.adoc[HL7 Terser] | [.camel-element-artifact]##camel-quarkus-hl7## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Get the value of an HL7 message field specified by terse location specification syntax.
+
 | xref:reference/extensions/jsonpath.adoc[JsonPath] | [.camel-element-artifact]##camel-quarkus-jsonpath## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Evaluate a JsonPath expression against a JSON message body.
 
diff --git a/extensions-jvm/hl7/deployment/pom.xml b/extensions-jvm/hl7/deployment/pom.xml
new file mode 100644
index 0000000..4312c00
--- /dev/null
+++ b/extensions-jvm/hl7/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-hl7-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-hl7-deployment</artifactId>
+    <name>Camel Quarkus :: HL7 :: 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-hl7</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/hl7/deployment/src/main/java/org/apache/camel/quarkus/component/hl7/deployment/Hl7Processor.java b/extensions-jvm/hl7/deployment/src/main/java/org/apache/camel/quarkus/component/hl7/deployment/Hl7Processor.java
new file mode 100644
index 0000000..d487bf8
--- /dev/null
+++ b/extensions-jvm/hl7/deployment/src/main/java/org/apache/camel/quarkus/component/hl7/deployment/Hl7Processor.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.hl7.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 Hl7Processor {
+
+    private static final Logger LOG = Logger.getLogger(Hl7Processor.class);
+    private static final String FEATURE = "camel-hl7";
+
+    @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/hl7/integration-test/pom.xml b/extensions-jvm/hl7/integration-test/pom.xml
new file mode 100644
index 0000000..85a2905
--- /dev/null
+++ b/extensions-jvm/hl7/integration-test/pom.xml
@@ -0,0 +1,100 @@
+<?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>1.1.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-hl7-integration-test</artifactId>
+    <name>Camel Quarkus :: HL7 :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus HL7 extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</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-hl7</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>
+
+        <!-- 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-hl7-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/hl7/integration-test/src/main/java/org/apache/camel/quarkus/component/hl7/it/Hl7Resource.java b/extensions-jvm/hl7/integration-test/src/main/java/org/apache/camel/quarkus/component/hl7/it/Hl7Resource.java
new file mode 100644
index 0000000..d0032fb
--- /dev/null
+++ b/extensions-jvm/hl7/integration-test/src/main/java/org/apache/camel/quarkus/component/hl7/it/Hl7Resource.java
@@ -0,0 +1,64 @@
+/*
+ * 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.hl7.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+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("/hl7")
+@ApplicationScoped
+public class Hl7Resource {
+
+    private static final Logger LOG = Logger.getLogger(Hl7Resource.class);
+
+    private static final String DATAFORMAT_HL7 = "hl7";
+    private static final String LANGUAGE_HL7TERSER = "hl7terser";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/dataformat/hl7")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadDataformatHl7() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveDataFormat(DATAFORMAT_HL7) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", DATAFORMAT_HL7);
+        return Response.status(500, DATAFORMAT_HL7 + " could not be loaded from the Camel context").build();
+    }
+
+    @Path("/load/language/hl7terser")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadLanguageHl7terser() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveLanguage(LANGUAGE_HL7TERSER) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", LANGUAGE_HL7TERSER);
+        return Response.status(500, LANGUAGE_HL7TERSER + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/hl7/integration-test/src/test/java/org/apache/camel/quarkus/component/hl7/it/Hl7Test.java b/extensions-jvm/hl7/integration-test/src/test/java/org/apache/camel/quarkus/component/hl7/it/Hl7Test.java
new file mode 100644
index 0000000..e0ade62
--- /dev/null
+++ b/extensions-jvm/hl7/integration-test/src/test/java/org/apache/camel/quarkus/component/hl7/it/Hl7Test.java
@@ -0,0 +1,42 @@
+/*
+ * 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.hl7.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class Hl7Test {
+
+    @Test
+    public void loadDataformatHl7() {
+        /* A simple autogenerated test */
+        RestAssured.get("/hl7/load/dataformat/hl7")
+                .then()
+                .statusCode(200);
+    }
+
+    @Test
+    public void loadLanguageHl7terser() {
+        /* A simple autogenerated test */
+        RestAssured.get("/hl7/load/language/hl7terser")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/hl7/pom.xml b/extensions-jvm/hl7/pom.xml
new file mode 100644
index 0000000..03aed9a
--- /dev/null
+++ b/extensions-jvm/hl7/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-hl7-parent</artifactId>
+    <name>Camel Quarkus :: HL7</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/hl7/runtime/pom.xml b/extensions-jvm/hl7/runtime/pom.xml
new file mode 100644
index 0000000..4b9c29a
--- /dev/null
+++ b/extensions-jvm/hl7/runtime/pom.xml
@@ -0,0 +1,94 @@
+<?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-hl7-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-hl7</artifactId>
+    <name>Camel Quarkus :: HL7 :: Runtime</name>
+    <description>Marshal and unmarshal HL7 (Health Care) model objects using the HL7 MLLP codec.</description>
+
+    <properties>
+        <firstVersion>1.1.0</firstVersion>
+    </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-hl7</artifactId>
+        </dependency>
+    </dependencies>
+
+    <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>
+            <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>
+</project>
diff --git a/extensions-jvm/hl7/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/hl7/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..990c660
--- /dev/null
+++ b/extensions-jvm/hl7/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 HL7"
+description: "Marshal and unmarshal HL7 (Health Care) model objects using the HL7 MLLP codec"
+metadata:
+  unlisted: true
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/hl7.html"
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 4d8077a..006ad94 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -79,6 +79,7 @@
         <module>hazelcast</module>
         <module>hdfs</module>
         <module>hipchat</module>
+        <module>hl7</module>
         <module>iec60870</module>
         <module>ignite</module>
         <module>iota</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 5003c00..eb165de 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -934,6 +934,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-hl7</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-http</artifactId>
                 <version>${camel.version}</version>
                 <exclusions>
@@ -3114,6 +3119,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-hl7</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-hl7-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-http</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 01/12: JGroups JVM support

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

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

commit e15c787b29a0c650b634ee3abe186cf8415ae7f7
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Sep 8 20:55:54 2020 +0200

    JGroups JVM support
---
 catalog/pom.xml                                    |  13 +++
 docs/modules/ROOT/nav.adoc                         |   1 +
 docs/modules/ROOT/pages/reference/components.adoc  |   3 +
 .../ROOT/pages/reference/extensions/jgroups.adoc   |  29 ++++++
 docs/modules/ROOT/pages/reference/index.adoc       |   3 +
 extensions-jvm/jgroups/deployment/pom.xml          |  63 +++++++++++++
 .../jgroups/deployment/JgroupsProcessor.java       |  46 ++++++++++
 extensions-jvm/jgroups/integration-test/pom.xml    | 100 +++++++++++++++++++++
 .../component/jgroups/it/JgroupsResource.java      |  51 +++++++++++
 .../quarkus/component/jgroups/it/JgroupsTest.java  |  34 +++++++
 extensions-jvm/jgroups/pom.xml                     |  40 +++++++++
 extensions-jvm/jgroups/runtime/pom.xml             |  94 +++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 +++++++
 extensions-jvm/pom.xml                             |   1 +
 poms/bom/pom.xml                                   |  15 ++++
 15 files changed, 525 insertions(+)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index 3b1711d..f0a4cb9 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -1882,6 +1882,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-jgroups</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-jing</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 3aba77d..231ef43 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -154,6 +154,7 @@
 *** xref:reference/extensions/jclouds.adoc[JClouds]
 *** xref:reference/extensions/jcr.adoc[JCR]
 *** xref:reference/extensions/jdbc.adoc[JDBC]
+*** xref:reference/extensions/jgroups.adoc[JGroups]
 *** xref:reference/extensions/jing.adoc[Jing]
 *** xref:reference/extensions/jira.adoc[Jira]
 *** xref:reference/extensions/jms.adoc[JMS]
diff --git a/docs/modules/ROOT/pages/reference/components.adoc b/docs/modules/ROOT/pages/reference/components.adoc
index 5c14f32..d131241 100644
--- a/docs/modules/ROOT/pages/reference/components.adoc
+++ b/docs/modules/ROOT/pages/reference/components.adoc
@@ -484,6 +484,9 @@ Preview | 1.1.0 | Read and write nodes to/from a JCR compliant content repositor
 | xref:reference/extensions/jdbc.adoc[JDBC] | [.camel-element-artifact]##camel-quarkus-jdbc## | [.camel-element-Native]##Native## +
 Stable | 0.2.0 | Access databases through SQL and JDBC.
 
+| xref:reference/extensions/jgroups.adoc[JGroups] | [.camel-element-artifact]##camel-quarkus-jgroups## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Exchange messages with JGroups clusters.
+
 | xref:reference/extensions/jing.adoc[Jing] | [.camel-element-artifact]##camel-quarkus-jing## | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Validate XML against a RelaxNG schema (XML Syntax or Compact Syntax) using Jing library.
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/jgroups.adoc b/docs/modules/ROOT/pages/reference/extensions/jgroups.adoc
new file mode 100644
index 0000000..d49bf4e
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/jgroups.adoc
@@ -0,0 +1,29 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+
+[[jgroups]]
+= JGroups
+:page-aliases: extensions/jgroups.adoc
+
+[.badges]
+[.badge-key]##Since Camel Quarkus##[.badge-version]##1.1.0## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+
+Exchange messages with JGroups clusters.
+
+== What's inside
+
+* https://camel.apache.org/components/latest/jgroups-component.html[JGroups component], URI syntax: `jgroups:clusterName`
+
+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-jgroups</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
diff --git a/docs/modules/ROOT/pages/reference/index.adoc b/docs/modules/ROOT/pages/reference/index.adoc
index 0f03c36..0e43466 100644
--- a/docs/modules/ROOT/pages/reference/index.adoc
+++ b/docs/modules/ROOT/pages/reference/index.adoc
@@ -440,6 +440,9 @@ Preview | 1.1.0 | Read and write nodes to/from a JCR compliant content repositor
 |  xref:reference/extensions/jdbc.adoc[JDBC]  | camel-quarkus-jdbc | [.camel-element-Native]##Native## +
 Stable | 0.2.0 | Access databases through SQL and JDBC.
 
+|  xref:reference/extensions/jgroups.adoc[JGroups]  | camel-quarkus-jgroups | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Exchange messages with JGroups clusters.
+
 |  xref:reference/extensions/jing.adoc[Jing]  | camel-quarkus-jing | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Validate XML against a RelaxNG schema (XML Syntax or Compact Syntax) using Jing library.
 
diff --git a/extensions-jvm/jgroups/deployment/pom.xml b/extensions-jvm/jgroups/deployment/pom.xml
new file mode 100644
index 0000000..e687e53
--- /dev/null
+++ b/extensions-jvm/jgroups/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-jgroups-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-jgroups-deployment</artifactId>
+    <name>Camel Quarkus :: JGroups :: 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-jgroups</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/jgroups/deployment/src/main/java/org/apache/camel/quarkus/component/jgroups/deployment/JgroupsProcessor.java b/extensions-jvm/jgroups/deployment/src/main/java/org/apache/camel/quarkus/component/jgroups/deployment/JgroupsProcessor.java
new file mode 100644
index 0000000..139dd94
--- /dev/null
+++ b/extensions-jvm/jgroups/deployment/src/main/java/org/apache/camel/quarkus/component/jgroups/deployment/JgroupsProcessor.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.jgroups.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 JgroupsProcessor {
+
+    private static final Logger LOG = Logger.getLogger(JgroupsProcessor.class);
+    private static final String FEATURE = "camel-jgroups";
+
+    @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/jgroups/integration-test/pom.xml b/extensions-jvm/jgroups/integration-test/pom.xml
new file mode 100644
index 0000000..eb93277
--- /dev/null
+++ b/extensions-jvm/jgroups/integration-test/pom.xml
@@ -0,0 +1,100 @@
+<?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>1.1.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-jgroups-integration-test</artifactId>
+    <name>Camel Quarkus :: JGroups :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus JGroups extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</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-jgroups</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>
+
+        <!-- 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-jgroups-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/jgroups/integration-test/src/main/java/org/apache/camel/quarkus/component/jgroups/it/JgroupsResource.java b/extensions-jvm/jgroups/integration-test/src/main/java/org/apache/camel/quarkus/component/jgroups/it/JgroupsResource.java
new file mode 100644
index 0000000..474c44a
--- /dev/null
+++ b/extensions-jvm/jgroups/integration-test/src/main/java/org/apache/camel/quarkus/component/jgroups/it/JgroupsResource.java
@@ -0,0 +1,51 @@
+/*
+ * 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.jgroups.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+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("/jgroups")
+@ApplicationScoped
+public class JgroupsResource {
+
+    private static final Logger LOG = Logger.getLogger(JgroupsResource.class);
+
+    private static final String COMPONENT_JGROUPS = "jgroups";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/component/jgroups")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadComponentJgroups() throws Exception {
+        /* This is an autogenerated test */
+        if (context.getComponent(COMPONENT_JGROUPS) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_JGROUPS);
+        return Response.status(500, COMPONENT_JGROUPS + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/jgroups/integration-test/src/test/java/org/apache/camel/quarkus/component/jgroups/it/JgroupsTest.java b/extensions-jvm/jgroups/integration-test/src/test/java/org/apache/camel/quarkus/component/jgroups/it/JgroupsTest.java
new file mode 100644
index 0000000..a6cff8a
--- /dev/null
+++ b/extensions-jvm/jgroups/integration-test/src/test/java/org/apache/camel/quarkus/component/jgroups/it/JgroupsTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.jgroups.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class JgroupsTest {
+
+    @Test
+    public void loadComponentJgroups() {
+        /* A simple autogenerated test */
+        RestAssured.get("/jgroups/load/component/jgroups")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/jgroups/pom.xml b/extensions-jvm/jgroups/pom.xml
new file mode 100644
index 0000000..65ab336
--- /dev/null
+++ b/extensions-jvm/jgroups/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-jgroups-parent</artifactId>
+    <name>Camel Quarkus :: JGroups</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/jgroups/runtime/pom.xml b/extensions-jvm/jgroups/runtime/pom.xml
new file mode 100644
index 0000000..10904df
--- /dev/null
+++ b/extensions-jvm/jgroups/runtime/pom.xml
@@ -0,0 +1,94 @@
+<?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-jgroups-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-jgroups</artifactId>
+    <name>Camel Quarkus :: JGroups :: Runtime</name>
+    <description>Exchange messages with JGroups clusters.</description>
+
+    <properties>
+        <firstVersion>1.1.0</firstVersion>
+    </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-jgroups</artifactId>
+        </dependency>
+    </dependencies>
+
+    <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>
+            <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>
+</project>
diff --git a/extensions-jvm/jgroups/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/jgroups/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..7e11e63
--- /dev/null
+++ b/extensions-jvm/jgroups/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 JGroups"
+description: "Exchange messages with JGroups clusters"
+metadata:
+  unlisted: true
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/jgroups.html"
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 8a1992f..592a1a0 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -87,6 +87,7 @@
         <module>jbpm</module>
         <module>jclouds</module>
         <module>jcr</module>
+        <module>jgroups</module>
         <module>jing</module>
         <module>jooq</module>
         <module>jsch</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index f22b820..f22fe23 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -1052,6 +1052,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-jgroups</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-jing</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -3284,6 +3289,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-jgroups</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-jgroups-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-jing</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 02/12: JGroups raft JVM support

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

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

commit 106344ec7d8a7f72b8cc52dadb5808b4bdb9439e
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Sep 8 20:57:59 2020 +0200

    JGroups raft JVM support
---
 catalog/pom.xml                                    |  13 +++
 docs/modules/ROOT/nav.adoc                         |   1 +
 docs/modules/ROOT/pages/reference/components.adoc  |   3 +
 .../pages/reference/extensions/jgroups-raft.adoc   |  29 ++++++
 docs/modules/ROOT/pages/reference/index.adoc       |   3 +
 extensions-jvm/jgroups-raft/deployment/pom.xml     |  63 +++++++++++++
 .../raft/deployment/JgroupsRaftProcessor.java      |  46 ++++++++++
 .../jgroups-raft/integration-test/pom.xml          | 100 +++++++++++++++++++++
 .../jgroups/raft/it/JgroupsRaftResource.java       |  51 +++++++++++
 .../component/jgroups/raft/it/JgroupsRaftTest.java |  34 +++++++
 extensions-jvm/jgroups-raft/pom.xml                |  40 +++++++++
 extensions-jvm/jgroups-raft/runtime/pom.xml        |  94 +++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 +++++++
 extensions-jvm/pom.xml                             |   1 +
 poms/bom/pom.xml                                   |  15 ++++
 15 files changed, 525 insertions(+)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index f0a4cb9..62139aa 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -1895,6 +1895,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-jgroups-raft</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-jing</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 231ef43..7d7026b 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -155,6 +155,7 @@
 *** xref:reference/extensions/jcr.adoc[JCR]
 *** xref:reference/extensions/jdbc.adoc[JDBC]
 *** xref:reference/extensions/jgroups.adoc[JGroups]
+*** xref:reference/extensions/jgroups-raft.adoc[JGroups raft]
 *** xref:reference/extensions/jing.adoc[Jing]
 *** xref:reference/extensions/jira.adoc[Jira]
 *** xref:reference/extensions/jms.adoc[JMS]
diff --git a/docs/modules/ROOT/pages/reference/components.adoc b/docs/modules/ROOT/pages/reference/components.adoc
index d131241..833f833 100644
--- a/docs/modules/ROOT/pages/reference/components.adoc
+++ b/docs/modules/ROOT/pages/reference/components.adoc
@@ -487,6 +487,9 @@ Stable | 0.2.0 | Access databases through SQL and JDBC.
 | xref:reference/extensions/jgroups.adoc[JGroups] | [.camel-element-artifact]##camel-quarkus-jgroups## | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Exchange messages with JGroups clusters.
 
+| xref:reference/extensions/jgroups-raft.adoc[JGroups raft] | [.camel-element-artifact]##camel-quarkus-jgroups-raft## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Exchange messages with JGroups-raft clusters.
+
 | xref:reference/extensions/jing.adoc[Jing] | [.camel-element-artifact]##camel-quarkus-jing## | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Validate XML against a RelaxNG schema (XML Syntax or Compact Syntax) using Jing library.
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/jgroups-raft.adoc b/docs/modules/ROOT/pages/reference/extensions/jgroups-raft.adoc
new file mode 100644
index 0000000..bde9929
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/jgroups-raft.adoc
@@ -0,0 +1,29 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+
+[[jgroups-raft]]
+= JGroups raft
+:page-aliases: extensions/jgroups-raft.adoc
+
+[.badges]
+[.badge-key]##Since Camel Quarkus##[.badge-version]##1.1.0## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+
+Exchange messages with JGroups-raft clusters.
+
+== What's inside
+
+* https://camel.apache.org/components/latest/jgroups-raft-component.html[JGroups raft component], URI syntax: `jgroups-raft:clusterName`
+
+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-jgroups-raft</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
diff --git a/docs/modules/ROOT/pages/reference/index.adoc b/docs/modules/ROOT/pages/reference/index.adoc
index 0e43466..ebeea55 100644
--- a/docs/modules/ROOT/pages/reference/index.adoc
+++ b/docs/modules/ROOT/pages/reference/index.adoc
@@ -443,6 +443,9 @@ Stable | 0.2.0 | Access databases through SQL and JDBC.
 |  xref:reference/extensions/jgroups.adoc[JGroups]  | camel-quarkus-jgroups | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Exchange messages with JGroups clusters.
 
+|  xref:reference/extensions/jgroups-raft.adoc[JGroups raft]  | camel-quarkus-jgroups-raft | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Exchange messages with JGroups-raft clusters.
+
 |  xref:reference/extensions/jing.adoc[Jing]  | camel-quarkus-jing | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Validate XML against a RelaxNG schema (XML Syntax or Compact Syntax) using Jing library.
 
diff --git a/extensions-jvm/jgroups-raft/deployment/pom.xml b/extensions-jvm/jgroups-raft/deployment/pom.xml
new file mode 100644
index 0000000..9e9dd79
--- /dev/null
+++ b/extensions-jvm/jgroups-raft/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-jgroups-raft-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-jgroups-raft-deployment</artifactId>
+    <name>Camel Quarkus :: JGroups raft :: 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-jgroups-raft</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/jgroups-raft/deployment/src/main/java/org/apache/camel/quarkus/component/jgroups/raft/deployment/JgroupsRaftProcessor.java b/extensions-jvm/jgroups-raft/deployment/src/main/java/org/apache/camel/quarkus/component/jgroups/raft/deployment/JgroupsRaftProcessor.java
new file mode 100644
index 0000000..44c37b5
--- /dev/null
+++ b/extensions-jvm/jgroups-raft/deployment/src/main/java/org/apache/camel/quarkus/component/jgroups/raft/deployment/JgroupsRaftProcessor.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.jgroups.raft.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 JgroupsRaftProcessor {
+
+    private static final Logger LOG = Logger.getLogger(JgroupsRaftProcessor.class);
+    private static final String FEATURE = "camel-jgroups-raft";
+
+    @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/jgroups-raft/integration-test/pom.xml b/extensions-jvm/jgroups-raft/integration-test/pom.xml
new file mode 100644
index 0000000..d28b20e
--- /dev/null
+++ b/extensions-jvm/jgroups-raft/integration-test/pom.xml
@@ -0,0 +1,100 @@
+<?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>1.1.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-jgroups-raft-integration-test</artifactId>
+    <name>Camel Quarkus :: JGroups raft :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus JGroups raft extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</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-jgroups-raft</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>
+
+        <!-- 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-jgroups-raft-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/jgroups-raft/integration-test/src/main/java/org/apache/camel/quarkus/component/jgroups/raft/it/JgroupsRaftResource.java b/extensions-jvm/jgroups-raft/integration-test/src/main/java/org/apache/camel/quarkus/component/jgroups/raft/it/JgroupsRaftResource.java
new file mode 100644
index 0000000..6cf09d3
--- /dev/null
+++ b/extensions-jvm/jgroups-raft/integration-test/src/main/java/org/apache/camel/quarkus/component/jgroups/raft/it/JgroupsRaftResource.java
@@ -0,0 +1,51 @@
+/*
+ * 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.jgroups.raft.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+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("/jgroups-raft")
+@ApplicationScoped
+public class JgroupsRaftResource {
+
+    private static final Logger LOG = Logger.getLogger(JgroupsRaftResource.class);
+
+    private static final String COMPONENT_JGROUPS_RAFT = "jgroups-raft";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/component/jgroups-raft")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadComponentJgroupsRaft() throws Exception {
+        /* This is an autogenerated test */
+        if (context.getComponent(COMPONENT_JGROUPS_RAFT) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_JGROUPS_RAFT);
+        return Response.status(500, COMPONENT_JGROUPS_RAFT + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/jgroups-raft/integration-test/src/test/java/org/apache/camel/quarkus/component/jgroups/raft/it/JgroupsRaftTest.java b/extensions-jvm/jgroups-raft/integration-test/src/test/java/org/apache/camel/quarkus/component/jgroups/raft/it/JgroupsRaftTest.java
new file mode 100644
index 0000000..4ada2c7
--- /dev/null
+++ b/extensions-jvm/jgroups-raft/integration-test/src/test/java/org/apache/camel/quarkus/component/jgroups/raft/it/JgroupsRaftTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.jgroups.raft.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class JgroupsRaftTest {
+
+    @Test
+    public void loadComponentJgroupsRaft() {
+        /* A simple autogenerated test */
+        RestAssured.get("/jgroups-raft/load/component/jgroups-raft")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/jgroups-raft/pom.xml b/extensions-jvm/jgroups-raft/pom.xml
new file mode 100644
index 0000000..7bbbcfe
--- /dev/null
+++ b/extensions-jvm/jgroups-raft/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-jgroups-raft-parent</artifactId>
+    <name>Camel Quarkus :: JGroups raft</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/jgroups-raft/runtime/pom.xml b/extensions-jvm/jgroups-raft/runtime/pom.xml
new file mode 100644
index 0000000..c778426
--- /dev/null
+++ b/extensions-jvm/jgroups-raft/runtime/pom.xml
@@ -0,0 +1,94 @@
+<?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-jgroups-raft-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-jgroups-raft</artifactId>
+    <name>Camel Quarkus :: JGroups raft :: Runtime</name>
+    <description>Exchange messages with JGroups-raft clusters.</description>
+
+    <properties>
+        <firstVersion>1.1.0</firstVersion>
+    </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-jgroups-raft</artifactId>
+        </dependency>
+    </dependencies>
+
+    <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>
+            <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>
+</project>
diff --git a/extensions-jvm/jgroups-raft/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/jgroups-raft/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..f2b338b
--- /dev/null
+++ b/extensions-jvm/jgroups-raft/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 JGroups raft"
+description: "Exchange messages with JGroups-raft clusters"
+metadata:
+  unlisted: true
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/jgroups-raft.html"
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 592a1a0..4d8077a 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -88,6 +88,7 @@
         <module>jclouds</module>
         <module>jcr</module>
         <module>jgroups</module>
+        <module>jgroups-raft</module>
         <module>jing</module>
         <module>jooq</module>
         <module>jsch</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index f22fe23..5003c00 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -1057,6 +1057,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-jgroups-raft</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-jing</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -3299,6 +3304,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-jgroups-raft</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-jgroups-raft-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-jing</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 05/12: JSonApi JVM support

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

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

commit d3aeb12ef2fec6996ccbc526f06867057ac5ff1f
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Sep 8 21:16:37 2020 +0200

    JSonApi JVM support
---
 catalog/pom.xml                                    |  13 +++
 docs/modules/ROOT/nav.adoc                         |   1 +
 docs/modules/ROOT/pages/reference/dataformats.adoc |   3 +
 .../ROOT/pages/reference/extensions/jsonapi.adoc   |  29 ++++++
 docs/modules/ROOT/pages/reference/index.adoc       |   3 +
 extensions-jvm/jsonapi/deployment/pom.xml          |  63 +++++++++++++
 .../jsonapi/deployment/JsonapiProcessor.java       |  46 ++++++++++
 extensions-jvm/jsonapi/integration-test/pom.xml    | 100 +++++++++++++++++++++
 .../component/jsonapi/it/JsonapiResource.java      |  51 +++++++++++
 .../quarkus/component/jsonapi/it/JsonapiTest.java  |  34 +++++++
 extensions-jvm/jsonapi/pom.xml                     |  40 +++++++++
 extensions-jvm/jsonapi/runtime/pom.xml             |  94 +++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 +++++++
 extensions-jvm/pom.xml                             |   1 +
 poms/bom/pom.xml                                   |  15 ++++
 15 files changed, 525 insertions(+)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index 33c85b1..37d6fe6 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -2051,6 +2051,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-jsonapi</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-jsonpath</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index cda327c..12cfb5d 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -168,6 +168,7 @@
 *** xref:reference/extensions/jackson.adoc[JSON Jackson]
 *** xref:reference/extensions/johnzon.adoc[JSON Johnzon]
 *** xref:reference/extensions/json-validator.adoc[JSON Schema Validator]
+*** xref:reference/extensions/jsonapi.adoc[JSonApi]
 *** xref:reference/extensions/jsonpath.adoc[JsonPath]
 *** xref:reference/extensions/jt400.adoc[JT400]
 *** xref:reference/extensions/jta.adoc[JTA]
diff --git a/docs/modules/ROOT/pages/reference/dataformats.adoc b/docs/modules/ROOT/pages/reference/dataformats.adoc
index a0c41ed..5fa45f1 100644
--- a/docs/modules/ROOT/pages/reference/dataformats.adoc
+++ b/docs/modules/ROOT/pages/reference/dataformats.adoc
@@ -70,6 +70,9 @@ Stable | 1.0.0 | Marshal POJOs to JSON and back.
 | xref:reference/extensions/xstream.adoc[JSON XStream] | [.camel-element-artifact]##camel-quarkus-xstream## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Marshal POJOs to JSON and back.
 
+| xref:reference/extensions/jsonapi.adoc[JSonApi] | [.camel-element-artifact]##camel-quarkus-jsonapi## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshal and unmarshal JSON:API resources using JSONAPI-Converter library.
+
 | xref:reference/extensions/lzf.adoc[LZF Deflate Compression] | [.camel-element-artifact]##camel-quarkus-lzf## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Compress and decompress streams using LZF deflate algorithm.
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/jsonapi.adoc b/docs/modules/ROOT/pages/reference/extensions/jsonapi.adoc
new file mode 100644
index 0000000..cc76f6e
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/jsonapi.adoc
@@ -0,0 +1,29 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+
+[[jsonapi]]
+= JSonApi
+:page-aliases: extensions/jsonapi.adoc
+
+[.badges]
+[.badge-key]##Since Camel Quarkus##[.badge-version]##1.1.0## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+
+Marshal and unmarshal JSON:API resources using JSONAPI-Converter library.
+
+== What's inside
+
+* https://camel.apache.org/components/latest/dataformats/jsonApi-dataformat.html[JSonApi data format]
+
+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-jsonapi</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
diff --git a/docs/modules/ROOT/pages/reference/index.adoc b/docs/modules/ROOT/pages/reference/index.adoc
index 5dbada7..3b660cd 100644
--- a/docs/modules/ROOT/pages/reference/index.adoc
+++ b/docs/modules/ROOT/pages/reference/index.adoc
@@ -482,6 +482,9 @@ Stable | 1.0.0 | Marshal POJOs to JSON and back.
 |  xref:reference/extensions/json-validator.adoc[JSON Schema Validator]  | camel-quarkus-json-validator | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Validate JSON payloads using NetworkNT JSON Schema.
 
+|  xref:reference/extensions/jsonapi.adoc[JSonApi]  | camel-quarkus-jsonapi | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshal and unmarshal JSON:API resources using JSONAPI-Converter library.
+
 |  xref:reference/extensions/jsonpath.adoc[JsonPath]  | camel-quarkus-jsonpath | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Evaluate a JsonPath expression against a JSON message body.
 
diff --git a/extensions-jvm/jsonapi/deployment/pom.xml b/extensions-jvm/jsonapi/deployment/pom.xml
new file mode 100644
index 0000000..1d0b342
--- /dev/null
+++ b/extensions-jvm/jsonapi/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-jsonapi-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-jsonapi-deployment</artifactId>
+    <name>Camel Quarkus :: JSonApi :: 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-jsonapi</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/jsonapi/deployment/src/main/java/org/apache/camel/quarkus/component/jsonapi/deployment/JsonapiProcessor.java b/extensions-jvm/jsonapi/deployment/src/main/java/org/apache/camel/quarkus/component/jsonapi/deployment/JsonapiProcessor.java
new file mode 100644
index 0000000..10f10b0
--- /dev/null
+++ b/extensions-jvm/jsonapi/deployment/src/main/java/org/apache/camel/quarkus/component/jsonapi/deployment/JsonapiProcessor.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.jsonapi.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 JsonapiProcessor {
+
+    private static final Logger LOG = Logger.getLogger(JsonapiProcessor.class);
+    private static final String FEATURE = "camel-jsonapi";
+
+    @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/jsonapi/integration-test/pom.xml b/extensions-jvm/jsonapi/integration-test/pom.xml
new file mode 100644
index 0000000..c91ff93
--- /dev/null
+++ b/extensions-jvm/jsonapi/integration-test/pom.xml
@@ -0,0 +1,100 @@
+<?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>1.1.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-jsonapi-integration-test</artifactId>
+    <name>Camel Quarkus :: JSonApi :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus JSonApi extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</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-jsonapi</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>
+
+        <!-- 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-jsonapi-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/jsonapi/integration-test/src/main/java/org/apache/camel/quarkus/component/jsonapi/it/JsonapiResource.java b/extensions-jvm/jsonapi/integration-test/src/main/java/org/apache/camel/quarkus/component/jsonapi/it/JsonapiResource.java
new file mode 100644
index 0000000..811ce06
--- /dev/null
+++ b/extensions-jvm/jsonapi/integration-test/src/main/java/org/apache/camel/quarkus/component/jsonapi/it/JsonapiResource.java
@@ -0,0 +1,51 @@
+/*
+ * 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.jsonapi.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+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("/jsonapi")
+@ApplicationScoped
+public class JsonapiResource {
+
+    private static final Logger LOG = Logger.getLogger(JsonapiResource.class);
+
+    private static final String DATAFORMAT_JSONAPI = "jsonApi";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/dataformat/jsonapi")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadDataformatJsonApi() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveDataFormat(DATAFORMAT_JSONAPI) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", DATAFORMAT_JSONAPI);
+        return Response.status(500, DATAFORMAT_JSONAPI + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/jsonapi/integration-test/src/test/java/org/apache/camel/quarkus/component/jsonapi/it/JsonapiTest.java b/extensions-jvm/jsonapi/integration-test/src/test/java/org/apache/camel/quarkus/component/jsonapi/it/JsonapiTest.java
new file mode 100644
index 0000000..06d5864
--- /dev/null
+++ b/extensions-jvm/jsonapi/integration-test/src/test/java/org/apache/camel/quarkus/component/jsonapi/it/JsonapiTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.jsonapi.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class JsonapiTest {
+
+    @Test
+    public void loadDataformatJsonApi() {
+        /* A simple autogenerated test */
+        RestAssured.get("/jsonapi/load/dataformat/jsonapi")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/jsonapi/pom.xml b/extensions-jvm/jsonapi/pom.xml
new file mode 100644
index 0000000..eb75b81
--- /dev/null
+++ b/extensions-jvm/jsonapi/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-jsonapi-parent</artifactId>
+    <name>Camel Quarkus :: JSonApi</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/jsonapi/runtime/pom.xml b/extensions-jvm/jsonapi/runtime/pom.xml
new file mode 100644
index 0000000..3ae0f5d
--- /dev/null
+++ b/extensions-jvm/jsonapi/runtime/pom.xml
@@ -0,0 +1,94 @@
+<?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-jsonapi-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-jsonapi</artifactId>
+    <name>Camel Quarkus :: JSonApi :: Runtime</name>
+    <description>Marshal and unmarshal JSON:API resources using JSONAPI-Converter library.</description>
+
+    <properties>
+        <firstVersion>1.1.0</firstVersion>
+    </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-jsonapi</artifactId>
+        </dependency>
+    </dependencies>
+
+    <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>
+            <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>
+</project>
diff --git a/extensions-jvm/jsonapi/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/jsonapi/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..497a109
--- /dev/null
+++ b/extensions-jvm/jsonapi/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 JSonApi"
+description: "Marshal and unmarshal JSON:API resources using JSONAPI-Converter library"
+metadata:
+  unlisted: true
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/jsonapi.html"
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 29a6287..08c49f8 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -94,6 +94,7 @@
         <module>jooq</module>
         <module>jsch</module>
         <module>jslt</module>
+        <module>jsonapi</module>
         <module>jt400</module>
         <module>language</module>
         <module>ldap</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 46db583..d59c041 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -1151,6 +1151,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-jsonapi</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-jsonpath</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -3429,6 +3434,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-jsonapi</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-jsonapi-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-jsonpath</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 12/12: Freemarker JVM support

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

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

commit 618475a21df445b74cb7e3ce9db45d5dbfca7a61
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Sep 8 21:38:03 2020 +0200

    Freemarker JVM support
---
 catalog/pom.xml                                    |  13 +++
 docs/modules/ROOT/nav.adoc                         |   1 +
 docs/modules/ROOT/pages/reference/components.adoc  |   3 +
 .../pages/reference/extensions/freemarker.adoc     |  29 ++++++
 docs/modules/ROOT/pages/reference/index.adoc       |   3 +
 extensions-jvm/freemarker/deployment/pom.xml       |  63 +++++++++++++
 .../freemarker/deployment/FreemarkerProcessor.java |  46 ++++++++++
 extensions-jvm/freemarker/integration-test/pom.xml | 100 +++++++++++++++++++++
 .../freemarker/it/FreemarkerResource.java          |  51 +++++++++++
 .../component/freemarker/it/FreemarkerTest.java    |  34 +++++++
 extensions-jvm/freemarker/pom.xml                  |  40 +++++++++
 extensions-jvm/freemarker/runtime/pom.xml          |  94 +++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 +++++++
 extensions-jvm/pom.xml                             |   1 +
 poms/bom/pom.xml                                   |  15 ++++
 15 files changed, 525 insertions(+)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index 97e380c..a7a2adb 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -1466,6 +1466,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-freemarker</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-ftp</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 3c9f89f..649b73f 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -122,6 +122,7 @@
 *** xref:reference/extensions/flatpack.adoc[Flatpack]
 *** xref:reference/extensions/flink.adoc[Flink]
 *** xref:reference/extensions/fop.adoc[FOP]
+*** xref:reference/extensions/freemarker.adoc[Freemarker]
 *** xref:reference/extensions/ftp.adoc[FTP]
 *** xref:reference/extensions/ganglia.adoc[Ganglia]
 *** xref:reference/extensions/geocoder.adoc[Geocoder]
diff --git a/docs/modules/ROOT/pages/reference/components.adoc b/docs/modules/ROOT/pages/reference/components.adoc
index 833f833..40ab747 100644
--- a/docs/modules/ROOT/pages/reference/components.adoc
+++ b/docs/modules/ROOT/pages/reference/components.adoc
@@ -328,6 +328,9 @@ Preview | 1.1.0 | Send DataSet jobs to an Apache Flink cluster.
 | xref:reference/extensions/fop.adoc[FOP] | [.camel-element-artifact]##camel-quarkus-fop## | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Render messages into PDF and other output formats supported by Apache FOP.
 
+| xref:reference/extensions/freemarker.adoc[Freemarker] | [.camel-element-artifact]##camel-quarkus-freemarker## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Transform messages using FreeMarker templates.
+
 | xref:reference/extensions/ftp.adoc[FTP] | [.camel-element-artifact]##camel-quarkus-ftp## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Upload and download files to/from FTP servers.
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc b/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc
new file mode 100644
index 0000000..21e7b49
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc
@@ -0,0 +1,29 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+
+[[freemarker]]
+= Freemarker
+:page-aliases: extensions/freemarker.adoc
+
+[.badges]
+[.badge-key]##Since Camel Quarkus##[.badge-version]##1.1.0## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+
+Transform messages using FreeMarker templates.
+
+== What's inside
+
+* https://camel.apache.org/components/latest/freemarker-component.html[Freemarker component], URI syntax: `freemarker: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-freemarker</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
diff --git a/docs/modules/ROOT/pages/reference/index.adoc b/docs/modules/ROOT/pages/reference/index.adoc
index 634c641..6012c3d 100644
--- a/docs/modules/ROOT/pages/reference/index.adoc
+++ b/docs/modules/ROOT/pages/reference/index.adoc
@@ -344,6 +344,9 @@ Preview | 1.1.0 | Send DataSet jobs to an Apache Flink cluster.
 |  xref:reference/extensions/fop.adoc[FOP]  | camel-quarkus-fop | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Render messages into PDF and other output formats supported by Apache FOP.
 
+|  xref:reference/extensions/freemarker.adoc[Freemarker]  | camel-quarkus-freemarker | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Transform messages using FreeMarker templates.
+
 |  xref:reference/extensions/ftp.adoc[FTP]  | camel-quarkus-ftp | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Upload and download files to/from FTP or SFTP servers.
 
diff --git a/extensions-jvm/freemarker/deployment/pom.xml b/extensions-jvm/freemarker/deployment/pom.xml
new file mode 100644
index 0000000..db3dc96
--- /dev/null
+++ b/extensions-jvm/freemarker/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-freemarker-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-freemarker-deployment</artifactId>
+    <name>Camel Quarkus :: Freemarker :: 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-freemarker</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/freemarker/deployment/src/main/java/org/apache/camel/quarkus/component/freemarker/deployment/FreemarkerProcessor.java b/extensions-jvm/freemarker/deployment/src/main/java/org/apache/camel/quarkus/component/freemarker/deployment/FreemarkerProcessor.java
new file mode 100644
index 0000000..1884a52
--- /dev/null
+++ b/extensions-jvm/freemarker/deployment/src/main/java/org/apache/camel/quarkus/component/freemarker/deployment/FreemarkerProcessor.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.freemarker.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 FreemarkerProcessor {
+
+    private static final Logger LOG = Logger.getLogger(FreemarkerProcessor.class);
+    private static final String FEATURE = "camel-freemarker";
+
+    @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/freemarker/integration-test/pom.xml b/extensions-jvm/freemarker/integration-test/pom.xml
new file mode 100644
index 0000000..9c3283c
--- /dev/null
+++ b/extensions-jvm/freemarker/integration-test/pom.xml
@@ -0,0 +1,100 @@
+<?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>1.1.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-freemarker-integration-test</artifactId>
+    <name>Camel Quarkus :: Freemarker :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus Freemarker extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</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-freemarker</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>
+
+        <!-- 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-freemarker-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/freemarker/integration-test/src/main/java/org/apache/camel/quarkus/component/freemarker/it/FreemarkerResource.java b/extensions-jvm/freemarker/integration-test/src/main/java/org/apache/camel/quarkus/component/freemarker/it/FreemarkerResource.java
new file mode 100644
index 0000000..845b95f
--- /dev/null
+++ b/extensions-jvm/freemarker/integration-test/src/main/java/org/apache/camel/quarkus/component/freemarker/it/FreemarkerResource.java
@@ -0,0 +1,51 @@
+/*
+ * 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.freemarker.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+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("/freemarker")
+@ApplicationScoped
+public class FreemarkerResource {
+
+    private static final Logger LOG = Logger.getLogger(FreemarkerResource.class);
+
+    private static final String COMPONENT_FREEMARKER = "freemarker";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/component/freemarker")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadComponentFreemarker() throws Exception {
+        /* This is an autogenerated test */
+        if (context.getComponent(COMPONENT_FREEMARKER) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_FREEMARKER);
+        return Response.status(500, COMPONENT_FREEMARKER + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/freemarker/integration-test/src/test/java/org/apache/camel/quarkus/component/freemarker/it/FreemarkerTest.java b/extensions-jvm/freemarker/integration-test/src/test/java/org/apache/camel/quarkus/component/freemarker/it/FreemarkerTest.java
new file mode 100644
index 0000000..58fbdc5
--- /dev/null
+++ b/extensions-jvm/freemarker/integration-test/src/test/java/org/apache/camel/quarkus/component/freemarker/it/FreemarkerTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.freemarker.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class FreemarkerTest {
+
+    @Test
+    public void loadComponentFreemarker() {
+        /* A simple autogenerated test */
+        RestAssured.get("/freemarker/load/component/freemarker")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/freemarker/pom.xml b/extensions-jvm/freemarker/pom.xml
new file mode 100644
index 0000000..f40602a
--- /dev/null
+++ b/extensions-jvm/freemarker/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-freemarker-parent</artifactId>
+    <name>Camel Quarkus :: Freemarker</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/freemarker/runtime/pom.xml b/extensions-jvm/freemarker/runtime/pom.xml
new file mode 100644
index 0000000..90ebdce
--- /dev/null
+++ b/extensions-jvm/freemarker/runtime/pom.xml
@@ -0,0 +1,94 @@
+<?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-freemarker-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-freemarker</artifactId>
+    <name>Camel Quarkus :: Freemarker :: Runtime</name>
+    <description>Transform messages using FreeMarker templates.</description>
+
+    <properties>
+        <firstVersion>1.1.0</firstVersion>
+    </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-freemarker</artifactId>
+        </dependency>
+    </dependencies>
+
+    <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>
+            <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>
+</project>
diff --git a/extensions-jvm/freemarker/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/freemarker/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..8f8698f
--- /dev/null
+++ b/extensions-jvm/freemarker/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 Freemarker"
+description: "Transform messages using FreeMarker templates"
+metadata:
+  unlisted: true
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/freemarker.html"
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 30042ab..67cbab9 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -74,6 +74,7 @@
         <module>fastjson</module>
         <module>flink</module>
         <module>fop</module>
+        <module>freemarker</module>
         <module>ganglia</module>
         <module>geocoder</module>
         <module>google-bigquery</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index f8fc6cf..efa2390 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -835,6 +835,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-freemarker</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-ftp</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -3009,6 +3014,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-freemarker</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-freemarker-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-ftp</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 04/12: Syslog JVM support

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

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

commit a92eb5a680a6a1ea4781c47984d10b1fb01b790d
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Sep 8 21:12:53 2020 +0200

    Syslog JVM support
---
 catalog/pom.xml                                    |  13 +++
 docs/modules/ROOT/nav.adoc                         |   1 +
 docs/modules/ROOT/pages/reference/dataformats.adoc |   3 +
 .../ROOT/pages/reference/extensions/syslog.adoc    |  29 ++++++
 docs/modules/ROOT/pages/reference/index.adoc       |   3 +
 extensions-jvm/pom.xml                             |   1 +
 extensions-jvm/syslog/deployment/pom.xml           |  63 +++++++++++++
 .../syslog/deployment/SyslogProcessor.java         |  46 ++++++++++
 extensions-jvm/syslog/integration-test/pom.xml     | 100 +++++++++++++++++++++
 .../component/syslog/it/SyslogResource.java        |  51 +++++++++++
 .../quarkus/component/syslog/it/SyslogTest.java    |  34 +++++++
 extensions-jvm/syslog/pom.xml                      |  40 +++++++++
 extensions-jvm/syslog/runtime/pom.xml              |  94 +++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  32 +++++++
 poms/bom/pom.xml                                   |  15 ++++
 15 files changed, 525 insertions(+)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index f621fe9..33c85b1 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -3494,6 +3494,19 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-syslog</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-tagsoup</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 89d66cc..cda327c 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -258,6 +258,7 @@
 *** xref:reference/extensions/stream.adoc[Stream]
 *** xref:reference/extensions/stringtemplate.adoc[String Template]
 *** xref:reference/extensions/stub.adoc[Stub]
+*** xref:reference/extensions/syslog.adoc[Syslog]
 *** xref:reference/extensions/tarfile.adoc[Tar File]
 *** xref:reference/extensions/telegram.adoc[Telegram]
 *** xref:reference/extensions/threadpoolfactory-vertx.adoc[ThreadPoolFactory Vert.x]
diff --git a/docs/modules/ROOT/pages/reference/dataformats.adoc b/docs/modules/ROOT/pages/reference/dataformats.adoc
index 222acce..a0c41ed 100644
--- a/docs/modules/ROOT/pages/reference/dataformats.adoc
+++ b/docs/modules/ROOT/pages/reference/dataformats.adoc
@@ -88,6 +88,9 @@ Preview | 1.1.0 | Transform from ROME SyndFeed Java Objects to XML and vice-vers
 | xref:reference/extensions/soap.adoc[SOAP] | [.camel-element-artifact]##camel-quarkus-soap## | [.camel-element-Native]##Native## +
 Stable | 1.0.0 | Marshal Java objects to SOAP messages and back.
 
+| xref:reference/extensions/syslog.adoc[Syslog] | [.camel-element-artifact]##camel-quarkus-syslog## | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshall SyslogMessages to RFC3164 and RFC5424 messages and back.
+
 | xref:reference/extensions/tarfile.adoc[Tar File] | [.camel-element-artifact]##camel-quarkus-tarfile## | [.camel-element-Native]##Native## +
 Stable | 0.3.0 | Archive files into tarballs or extract files from tarballs.
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/syslog.adoc b/docs/modules/ROOT/pages/reference/extensions/syslog.adoc
new file mode 100644
index 0000000..5cb6018
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/syslog.adoc
@@ -0,0 +1,29 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+
+[[syslog]]
+= Syslog
+:page-aliases: extensions/syslog.adoc
+
+[.badges]
+[.badge-key]##Since Camel Quarkus##[.badge-version]##1.1.0## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+
+Marshall SyslogMessages to RFC3164 and RFC5424 messages and back.
+
+== What's inside
+
+* https://camel.apache.org/components/latest/dataformats/syslog-dataformat.html[Syslog data format]
+
+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-syslog</artifactId>
+</dependency>
+----
+
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
diff --git a/docs/modules/ROOT/pages/reference/index.adoc b/docs/modules/ROOT/pages/reference/index.adoc
index ec42d78..5dbada7 100644
--- a/docs/modules/ROOT/pages/reference/index.adoc
+++ b/docs/modules/ROOT/pages/reference/index.adoc
@@ -752,6 +752,9 @@ Preview | 1.1.0 | Transform messages using StringTemplate engine.
 |  xref:reference/extensions/stub.adoc[Stub]  | camel-quarkus-stub | [.camel-element-JVM]##JVM## +
 Preview | 1.1.0 | Stub out any physical endpoints while in development or testing.
 
+|  xref:reference/extensions/syslog.adoc[Syslog]  | camel-quarkus-syslog | [.camel-element-JVM]##JVM## +
+Preview | 1.1.0 | Marshall SyslogMessages to RFC3164 and RFC5424 messages and back.
+
 |  xref:reference/extensions/tarfile.adoc[Tar File]  | camel-quarkus-tarfile | [.camel-element-Native]##Native## +
 Stable | 0.3.0 | Archive files into tarballs or extract files from tarballs.
 
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 006ad94..29a6287 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -136,6 +136,7 @@
         <module>stomp</module>
         <module>stringtemplate</module>
         <module>stub</module>
+        <module>syslog</module>
         <module>thrift</module>
         <module>twilio</module>
         <module>velocity</module>
diff --git a/extensions-jvm/syslog/deployment/pom.xml b/extensions-jvm/syslog/deployment/pom.xml
new file mode 100644
index 0000000..7f5b5ed
--- /dev/null
+++ b/extensions-jvm/syslog/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-syslog-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-syslog-deployment</artifactId>
+    <name>Camel Quarkus :: Syslog :: 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-syslog</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/syslog/deployment/src/main/java/org/apache/camel/quarkus/component/syslog/deployment/SyslogProcessor.java b/extensions-jvm/syslog/deployment/src/main/java/org/apache/camel/quarkus/component/syslog/deployment/SyslogProcessor.java
new file mode 100644
index 0000000..877c3a2
--- /dev/null
+++ b/extensions-jvm/syslog/deployment/src/main/java/org/apache/camel/quarkus/component/syslog/deployment/SyslogProcessor.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.syslog.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 SyslogProcessor {
+
+    private static final Logger LOG = Logger.getLogger(SyslogProcessor.class);
+    private static final String FEATURE = "camel-syslog";
+
+    @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/syslog/integration-test/pom.xml b/extensions-jvm/syslog/integration-test/pom.xml
new file mode 100644
index 0000000..c4d703d
--- /dev/null
+++ b/extensions-jvm/syslog/integration-test/pom.xml
@@ -0,0 +1,100 @@
+<?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>1.1.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-syslog-integration-test</artifactId>
+    <name>Camel Quarkus :: Syslog :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus Syslog extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</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-syslog</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>
+
+        <!-- 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-syslog-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/syslog/integration-test/src/main/java/org/apache/camel/quarkus/component/syslog/it/SyslogResource.java b/extensions-jvm/syslog/integration-test/src/main/java/org/apache/camel/quarkus/component/syslog/it/SyslogResource.java
new file mode 100644
index 0000000..f4ff6bb
--- /dev/null
+++ b/extensions-jvm/syslog/integration-test/src/main/java/org/apache/camel/quarkus/component/syslog/it/SyslogResource.java
@@ -0,0 +1,51 @@
+/*
+ * 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.syslog.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+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("/syslog")
+@ApplicationScoped
+public class SyslogResource {
+
+    private static final Logger LOG = Logger.getLogger(SyslogResource.class);
+
+    private static final String DATAFORMAT_SYSLOG = "syslog";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/dataformat/syslog")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadDataformatSyslog() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveDataFormat(DATAFORMAT_SYSLOG) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", DATAFORMAT_SYSLOG);
+        return Response.status(500, DATAFORMAT_SYSLOG + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/syslog/integration-test/src/test/java/org/apache/camel/quarkus/component/syslog/it/SyslogTest.java b/extensions-jvm/syslog/integration-test/src/test/java/org/apache/camel/quarkus/component/syslog/it/SyslogTest.java
new file mode 100644
index 0000000..f30ee7b
--- /dev/null
+++ b/extensions-jvm/syslog/integration-test/src/test/java/org/apache/camel/quarkus/component/syslog/it/SyslogTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.syslog.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class SyslogTest {
+
+    @Test
+    public void loadDataformatSyslog() {
+        /* A simple autogenerated test */
+        RestAssured.get("/syslog/load/dataformat/syslog")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/syslog/pom.xml b/extensions-jvm/syslog/pom.xml
new file mode 100644
index 0000000..a627c02
--- /dev/null
+++ b/extensions-jvm/syslog/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-syslog-parent</artifactId>
+    <name>Camel Quarkus :: Syslog</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/syslog/runtime/pom.xml b/extensions-jvm/syslog/runtime/pom.xml
new file mode 100644
index 0000000..5a3b73e
--- /dev/null
+++ b/extensions-jvm/syslog/runtime/pom.xml
@@ -0,0 +1,94 @@
+<?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-syslog-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-syslog</artifactId>
+    <name>Camel Quarkus :: Syslog :: Runtime</name>
+    <description>Marshall SyslogMessages to RFC3164 and RFC5424 messages and back.</description>
+
+    <properties>
+        <firstVersion>1.1.0</firstVersion>
+    </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-syslog</artifactId>
+        </dependency>
+    </dependencies>
+
+    <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>
+            <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>
+</project>
diff --git a/extensions-jvm/syslog/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/syslog/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..39655e3
--- /dev/null
+++ b/extensions-jvm/syslog/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 Syslog"
+description: "Marshall SyslogMessages to RFC3164 and RFC5424 messages and back"
+metadata:
+  unlisted: true
+  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/syslog.html"
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index eb165de..46db583 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -1687,6 +1687,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-syslog</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-tagsoup</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -4539,6 +4544,16 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-syslog</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-syslog-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-tagsoup</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>