You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2019/10/24 20:59:35 UTC
[camel-quarkus] branch master updated: Add jackson and vm
extensions, fixes #306 and #318
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push:
new db4795b Add jackson and vm extensions, fixes #306 and #318
new c4663d7 Merge pull request #320 from gnodet/issue-306
db4795b is described below
commit db4795bf10e8f66be8d80dc25f538a13ff445779
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Tue Oct 22 18:03:08 2019 +0200
Add jackson and vm extensions, fixes #306 and #318
---
.../pages/list-of-camel-quarkus-extensions.adoc | 9 +-
extensions/jackson/deployment/pom.xml | 78 +++++++++++
.../component/jackson/JacksonProcessor.java | 15 +++
extensions/jackson/pom.xml | 39 ++++++
extensions/jackson/runtime/pom.xml | 105 +++++++++++++++
.../main/resources/META-INF/quarkus-extension.json | 11 ++
extensions/pom.xml | 2 +
extensions/readme.adoc | 9 +-
extensions/vm/deployment/pom.xml | 73 ++++++++++
.../component/vm/deployment/VmProcessor.java | 31 +++++
extensions/vm/pom.xml | 37 ++++++
extensions/vm/runtime/pom.xml | 82 ++++++++++++
.../main/resources/META-INF/quarkus-extension.json | 9 ++
integration-tests/jackson/pom.xml | 148 +++++++++++++++++++++
.../quarkus/component/jackson/CamelResource.java | 56 ++++++++
.../quarkus/component/jackson/CamelRoute.java | 58 ++++++++
.../src/main/resources/application.properties | 30 +++++
.../quarkus/component/jackson/JacksonITCase.java | 23 ++++
.../quarkus/component/jackson/JacksonTest.java | 41 ++++++
integration-tests/pom.xml | 1 +
poms/bom-deployment/pom.xml | 10 ++
poms/bom/pom.xml | 15 +++
22 files changed, 878 insertions(+), 4 deletions(-)
diff --git a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
index 6777c66..06f89d7 100644
--- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
+++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
@@ -6,7 +6,7 @@ As of Camel Quarkus {camel-quarkus-last-release} the following Camel artifacts a
== Camel Components
// components: START
-Number of Camel components: 24 in 20 JAR artifacts (0 deprecated)
+Number of Camel components: 25 in 21 JAR artifacts (0 deprecated)
[width="100%",cols="4,1,5",options="header"]
|===
@@ -84,13 +84,16 @@ Number of Camel components: 24 in 20 JAR artifacts (0 deprecated)
| link:https://camel.apache.org/components/latest/twitter-timeline-component.html[Twitter Timeline] (camel-quarkus-twitter) +
`twitter-timeline:timelineType` | 0.2 | The Twitter Timeline component consumes twitter timeline or update the status of specific user.
+| link:https://camel.apache.org/components/latest/vm-component.html[VM] (camel-quarkus-vm) +
+`vm:name` | 0.3 | The vm component provides asynchronous call to another endpoint from the same CamelContext.
+
|===
// components: END
== Camel Data Formats
// dataformats: START
-Number of Camel data formats: 6 in 5 JAR artifacts (0 deprecated)
+Number of Camel data formats: 7 in 6 JAR artifacts (0 deprecated)
[width="100%",cols="4,1,5",options="header"]
|===
@@ -102,6 +105,8 @@ Number of Camel data formats: 6 in 5 JAR artifacts (0 deprecated)
| xref:extensions/fhir.adoc[FHIR XML] (camel-quarkus-fhir) | 0.2 | The FHIR XML data format is used to marshall/unmarshall from/to FHIR objects to/from XML.
+| link:https://camel.apache.org/components/latest/json-jackson-dataformat.html[JSon Jackson] (camel-quarkus-jackson) | 0.3 | JSon data format is used for unmarshal a JSon payload to POJO or to marshal POJO back to JSon payload.
+
| link:https://camel.apache.org/components/latest/mime-multipart-dataformat.html[MIME Multipart] (camel-quarkus-mail) | 0.2 | The MIME Multipart data format is used for marshalling Camel messages with attachments into MIME-Multipart message, and vise-versa.
| link:https://camel.apache.org/components/latest/tarfile-dataformat.html[Tar File] (camel-quarkus-tarfile) | 0.3 | The Tar File data format is a message compression and de-compression format of tar files.
diff --git a/extensions/jackson/deployment/pom.xml b/extensions/jackson/deployment/pom.xml
new file mode 100644
index 0000000..14f77db
--- /dev/null
+++ b/extensions/jackson/deployment/pom.xml
@@ -0,0 +1,78 @@
+<?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">
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-jackson-parent</artifactId>
+ <version>0.2.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>camel-quarkus-jackson-deployment</artifactId>
+ <name>Camel Quarkus :: Jackson :: Deployment</name>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-bom-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jackson-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-core-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-core-xml-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-jackson</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <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/jackson/deployment/src/main/java/org/apache/camel/quarkus/component/jackson/JacksonProcessor.java b/extensions/jackson/deployment/src/main/java/org/apache/camel/quarkus/component/jackson/JacksonProcessor.java
new file mode 100644
index 0000000..6c3fc81
--- /dev/null
+++ b/extensions/jackson/deployment/src/main/java/org/apache/camel/quarkus/component/jackson/JacksonProcessor.java
@@ -0,0 +1,15 @@
+package org.apache.camel.quarkus.component.jackson;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+
+public class JacksonProcessor {
+
+ private static final String FEATURE = "camel-jackson";
+
+ @BuildStep
+ FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
+
+}
diff --git a/extensions/jackson/pom.xml b/extensions/jackson/pom.xml
new file mode 100644
index 0000000..50c79fe
--- /dev/null
+++ b/extensions/jackson/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-build-parent</artifactId>
+ <version>0.2.1-SNAPSHOT</version>
+ <relativePath>../../poms/build-parent/pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>camel-quarkus-jackson-parent</artifactId>
+ <name>Camel Quarkus :: Jackson</name>
+ <packaging>pom</packaging>
+ <modules>
+ <module>deployment</module>
+ <module>runtime</module>
+ </modules>
+
+</project>
diff --git a/extensions/jackson/runtime/pom.xml b/extensions/jackson/runtime/pom.xml
new file mode 100644
index 0000000..3c5cf65
--- /dev/null
+++ b/extensions/jackson/runtime/pom.xml
@@ -0,0 +1,105 @@
+<?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">
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-jackson-parent</artifactId>
+ <version>0.2.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>camel-quarkus-jackson</artifactId>
+ <name>Camel Quarkus :: Jackson :: Runtime</name>
+
+ <properties>
+ <firstVersion>0.3.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.quarkus</groupId>
+ <artifactId>camel-quarkus-core-xml</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jackson</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.module</groupId>
+ <artifactId>jackson-module-jaxb-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-jackson</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.fasterxml.jackson.module</groupId>
+ <artifactId>jackson-module-jaxb-annotations</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>com.oracle.substratevm</groupId>
+ <artifactId>svm</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-bootstrap-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <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/jackson/runtime/src/main/resources/META-INF/quarkus-extension.json b/extensions/jackson/runtime/src/main/resources/META-INF/quarkus-extension.json
new file mode 100644
index 0000000..9fed789
--- /dev/null
+++ b/extensions/jackson/runtime/src/main/resources/META-INF/quarkus-extension.json
@@ -0,0 +1,11 @@
+{
+ "name": "Camel Quarkus Jackson",
+ "labels": [
+ "integration",
+ "camel",
+ "jackson",
+ "dataformat"
+ ],
+ "guide": "https://quarkus.io/guides/camel"
+}
+
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 6242bf8..7bc0573 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -52,6 +52,7 @@
<module>direct</module>
<module>fhir</module>
<module>infinispan</module>
+ <module>jackson</module>
<module>jdbc</module>
<module>log</module>
<module>mail</module>
@@ -68,6 +69,7 @@
<module>tarfile</module>
<module>timer</module>
<module>twitter</module>
+ <module>vm</module>
<module>zipfile</module>
<module>attachments</module>
</modules>
diff --git a/extensions/readme.adoc b/extensions/readme.adoc
index 3d434a3..998d6e0 100644
--- a/extensions/readme.adoc
+++ b/extensions/readme.adoc
@@ -5,7 +5,7 @@ Apache Camel Quarkus supports the following Camel artifacts as Quarkus Extension
== Camel Components
// components: START
-Number of Camel components: 24 in 20 JAR artifacts (0 deprecated)
+Number of Camel components: 25 in 21 JAR artifacts (0 deprecated)
[width="100%",cols="4,1,5",options="header"]
|===
@@ -83,6 +83,9 @@ Number of Camel components: 24 in 20 JAR artifacts (0 deprecated)
| link:https://camel.apache.org/components/latest/twitter-timeline-component.html[Twitter Timeline] (camel-quarkus-twitter) +
`twitter-timeline:timelineType` | 0.2 | The Twitter Timeline component consumes twitter timeline or update the status of specific user.
+| link:https://camel.apache.org/components/latest/vm-component.html[VM] (camel-quarkus-vm) +
+`vm:name` | 0.3 | The vm component provides asynchronous call to another endpoint from the same CamelContext.
+
|===
// components: END
@@ -90,7 +93,7 @@ Number of Camel components: 24 in 20 JAR artifacts (0 deprecated)
== Camel Data Formats
// dataformats: START
-Number of Camel data formats: 6 in 5 JAR artifacts (0 deprecated)
+Number of Camel data formats: 7 in 6 JAR artifacts (0 deprecated)
[width="100%",cols="4,1,5",options="header"]
|===
@@ -102,6 +105,8 @@ Number of Camel data formats: 6 in 5 JAR artifacts (0 deprecated)
| xref:extensions/fhir.adoc[FHIR XML] (camel-quarkus-fhir) | 0.2 | The FHIR XML data format is used to marshall/unmarshall from/to FHIR objects to/from XML.
+| link:https://camel.apache.org/components/latest/json-jackson-dataformat.html[JSon Jackson] (camel-quarkus-jackson) | 0.3 | JSon data format is used for unmarshal a JSon payload to POJO or to marshal POJO back to JSon payload.
+
| link:https://camel.apache.org/components/latest/mime-multipart-dataformat.html[MIME Multipart] (camel-quarkus-mail) | 0.2 | The MIME Multipart data format is used for marshalling Camel messages with attachments into MIME-Multipart message, and vise-versa.
| link:https://camel.apache.org/components/latest/tarfile-dataformat.html[Tar File] (camel-quarkus-tarfile) | 0.3 | The Tar File data format is a message compression and de-compression format of tar files.
diff --git a/extensions/vm/deployment/pom.xml b/extensions/vm/deployment/pom.xml
new file mode 100644
index 0000000..9de21ac
--- /dev/null
+++ b/extensions/vm/deployment/pom.xml
@@ -0,0 +1,73 @@
+<?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-vm-parent</artifactId>
+ <version>0.2.1-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-vm-deployment</artifactId>
+ <name>Camel Quarkus :: VM :: Deployment</name>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-bom-deployment</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-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-vm</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/vm/deployment/src/main/java/org/apache/camel/quarkus/component/vm/deployment/VmProcessor.java b/extensions/vm/deployment/src/main/java/org/apache/camel/quarkus/component/vm/deployment/VmProcessor.java
new file mode 100644
index 0000000..0600d12
--- /dev/null
+++ b/extensions/vm/deployment/src/main/java/org/apache/camel/quarkus/component/vm/deployment/VmProcessor.java
@@ -0,0 +1,31 @@
+/*
+ * 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.vm.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+
+class VmProcessor {
+
+ private static final String FEATURE = "camel-vm";
+
+ @BuildStep
+ FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
+
+}
diff --git a/extensions/vm/pom.xml b/extensions/vm/pom.xml
new file mode 100644
index 0000000..22ab07a
--- /dev/null
+++ b/extensions/vm/pom.xml
@@ -0,0 +1,37 @@
+<?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>0.2.1-SNAPSHOT</version>
+ <relativePath>../../poms/build-parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-vm-parent</artifactId>
+ <name>Camel Quarkus :: VM</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>deployment</module>
+ <module>runtime</module>
+ </modules>
+</project>
diff --git a/extensions/vm/runtime/pom.xml b/extensions/vm/runtime/pom.xml
new file mode 100644
index 0000000..0182ef2
--- /dev/null
+++ b/extensions/vm/runtime/pom.xml
@@ -0,0 +1,82 @@
+<?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-vm-parent</artifactId>
+ <version>0.2.1-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-vm</artifactId>
+ <name>Camel Quarkus :: VM :: Runtime</name>
+
+ <properties>
+ <firstVersion>0.3.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>
+
+ <!-- camel -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-vm</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-bootstrap-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-processor</artifactId>
+ <version>${quarkus.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/extensions/vm/runtime/src/main/resources/META-INF/quarkus-extension.json b/extensions/vm/runtime/src/main/resources/META-INF/quarkus-extension.json
new file mode 100644
index 0000000..4a6ed1c
--- /dev/null
+++ b/extensions/vm/runtime/src/main/resources/META-INF/quarkus-extension.json
@@ -0,0 +1,9 @@
+{
+ "name": "Camel Quarkus VM",
+ "labels": [
+ "integration",
+ "camel"
+ ],
+ "guide": "https://quarkus.io/guides/camel"
+}
+
diff --git a/integration-tests/jackson/pom.xml b/integration-tests/jackson/pom.xml
new file mode 100644
index 0000000..becf591
--- /dev/null
+++ b/integration-tests/jackson/pom.xml
@@ -0,0 +1,148 @@
+<?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">
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-integration-tests</artifactId>
+ <version>0.2.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>camel-quarkus-integration-test-jackson</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: Jackson</name>
+ <description>Integration tests for Camel Jackson extension</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-jackson</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-direct</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-log</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-vm</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jaxb</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>native-image</id>
+ <activation>
+ <property>
+ <name>native</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ <configuration>
+ <systemProperties>
+ <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
+ </systemProperties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>native-image</id>
+ <goals>
+ <goal>native-image</goal>
+ </goals>
+ <configuration>
+ <cleanupServer>true</cleanupServer>
+ <enableHttpUrlHandler>true</enableHttpUrlHandler>
+ <enableServer>false</enableServer>
+ <dumpProxies>false</dumpProxies>
+ <enableJni>false</enableJni>
+ <disableReports>true</disableReports>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+
+</project>
diff --git a/integration-tests/jackson/src/main/java/org/apache/camel/quarkus/component/jackson/CamelResource.java b/integration-tests/jackson/src/main/java/org/apache/camel/quarkus/component/jackson/CamelResource.java
new file mode 100644
index 0000000..3233076
--- /dev/null
+++ b/integration-tests/jackson/src/main/java/org/apache/camel/quarkus/component/jackson/CamelResource.java
@@ -0,0 +1,56 @@
+/*
+ * 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.jackson;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ConsumerTemplate;
+import org.apache.camel.ProducerTemplate;
+
+@Path("/jackson")
+@ApplicationScoped
+public class CamelResource {
+ @Inject
+ ProducerTemplate template;
+ @Inject
+ ConsumerTemplate consumer;
+ @Inject
+ CamelContext context;
+
+ @Path("/in")
+ @POST
+ @Consumes(MediaType.TEXT_PLAIN)
+ @Produces(MediaType.TEXT_PLAIN)
+ public String processOrder(String statement) {
+ return template.requestBody("direct:in", statement, String.class);
+ }
+
+ @Path("/out")
+ @POST
+ @Produces(MediaType.TEXT_PLAIN)
+ public String testOrder() {
+ return consumer.receive("vm:out").getMessage().getBody().toString();
+ }
+
+}
diff --git a/integration-tests/jackson/src/main/java/org/apache/camel/quarkus/component/jackson/CamelRoute.java b/integration-tests/jackson/src/main/java/org/apache/camel/quarkus/component/jackson/CamelRoute.java
new file mode 100644
index 0000000..2e11fc2
--- /dev/null
+++ b/integration-tests/jackson/src/main/java/org/apache/camel/quarkus/component/jackson/CamelRoute.java
@@ -0,0 +1,58 @@
+/*
+ * 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.jackson;
+
+import io.quarkus.runtime.annotations.RegisterForReflection;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.jackson.JacksonDataFormat;
+
+public class CamelRoute extends RouteBuilder {
+
+ @Override
+ public void configure() {
+ JacksonDataFormat format = new JacksonDataFormat(DummyObject.class);
+ format.useList();
+ from("direct:in")
+ .wireTap("direct:tap")
+ .setBody(constant("ok"));
+ from("direct:tap")
+ .unmarshal(format)
+ .to("log:out")
+ .split(body())
+ .marshal(format)
+ .convertBodyTo(String.class)
+ .to("vm:out");
+ }
+
+ @RegisterForReflection
+ public static class DummyObject {
+
+ private String dummy;
+
+ public DummyObject() {
+ }
+
+ public String getDummy() {
+ return dummy;
+ }
+
+ public void setDummy(String dummy) {
+ this.dummy = dummy;
+ }
+ }
+
+}
diff --git a/integration-tests/jackson/src/main/resources/application.properties b/integration-tests/jackson/src/main/resources/application.properties
new file mode 100644
index 0000000..dba6223
--- /dev/null
+++ b/integration-tests/jackson/src/main/resources/application.properties
@@ -0,0 +1,30 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+#
+# Quarkus
+#
+quarkus.ssl.native=true
+quarkus.log.file.enable = false
+
+#
+# Quarkus :: Camel
+#
+quarkus.camel.dump-routes=true
+#
+# Camel
+#
+camel.context.name = quarkus-camel-example
\ No newline at end of file
diff --git a/integration-tests/jackson/src/test/java/org/apache/camel/quarkus/component/jackson/JacksonITCase.java b/integration-tests/jackson/src/test/java/org/apache/camel/quarkus/component/jackson/JacksonITCase.java
new file mode 100644
index 0000000..c9ca04b
--- /dev/null
+++ b/integration-tests/jackson/src/test/java/org/apache/camel/quarkus/component/jackson/JacksonITCase.java
@@ -0,0 +1,23 @@
+/*
+ * 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.jackson;
+
+import io.quarkus.test.junit.SubstrateTest;
+
+@SubstrateTest
+public class JacksonITCase extends JacksonTest {
+}
diff --git a/integration-tests/jackson/src/test/java/org/apache/camel/quarkus/component/jackson/JacksonTest.java b/integration-tests/jackson/src/test/java/org/apache/camel/quarkus/component/jackson/JacksonTest.java
new file mode 100644
index 0000000..e72f21d
--- /dev/null
+++ b/integration-tests/jackson/src/test/java/org/apache/camel/quarkus/component/jackson/JacksonTest.java
@@ -0,0 +1,41 @@
+/*
+ * 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.jackson;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.Matchers.equalTo;
+
+@QuarkusTest
+public class JacksonTest {
+ @Test
+ public void testRoutes() {
+ RestAssured.given().contentType(ContentType.TEXT)
+ .body("[{\"dummy\": \"value1\"}, {\"dummy\": \"value2\"}]")
+ .post("/jackson/in");
+ RestAssured.post("/jackson/out")
+ .then()
+ .body(equalTo("{\"dummy\":\"value1\"}"));
+ RestAssured.post("/jackson/out")
+ .then()
+ .body(equalTo("{\"dummy\":\"value2\"}"));
+ }
+
+}
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index f6799f3..6c43d2a 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -93,6 +93,7 @@
<module>csv</module>
<module>fhir</module>
<module>infinispan</module>
+ <module>jackson</module>
<module>jdbc</module>
<module>mail</module>
<module>microprofile-health</module>
diff --git a/poms/bom-deployment/pom.xml b/poms/bom-deployment/pom.xml
index 5f4a5ee..df5b461 100644
--- a/poms/bom-deployment/pom.xml
+++ b/poms/bom-deployment/pom.xml
@@ -142,6 +142,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-jackson-deployment</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jdbc-deployment</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
@@ -227,6 +232,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-vm-deployment</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-xstream-common-deployment</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index b1a5c80..6ca4a82 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -258,6 +258,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-vm</artifactId>
+ <version>${camel.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-zipfile</artifactId>
<version>${camel.version}</version>
</dependency>
@@ -359,6 +364,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-jackson</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jdbc</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
@@ -449,6 +459,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-vm</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-zipfile</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>