Merge pull request #573 from apache/jackson
AWS support: Leverage Quarkus-jackson instead of using Jackson stuff …
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 c3be748..1967299 100644
--- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
+++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
@@ -6,12 +6,15 @@
== Camel Components
// components: START
-Number of Camel components: 52 in 44 JAR artifacts (0 deprecated)
+Number of Camel components: 53 in 45 JAR artifacts (0 deprecated)
[width="100%",cols="4,1,5",options="header"]
|===
| Component | Since | Description
+| link:https://camel.apache.org/components/latest/ahc-component.html[AHC] (camel-quarkus-ahc) +
+`ahc:httpUri` | 1.2.0 | To call external HTTP services using Async Http Client.
+
| link:https://camel.apache.org/components/latest/aws-ec2-component.html[AWS EC2] (camel-quarkus-aws-ec2) +
`aws-ec2:label` | 1.2.0 | The aws-ec2 is used for managing Amazon EC2 instances.
diff --git a/extensions/ahc/deployment/pom.xml b/extensions/ahc/deployment/pom.xml
new file mode 100644
index 0000000..b1ca2bc
--- /dev/null
+++ b/extensions/ahc/deployment/pom.xml
@@ -0,0 +1,79 @@
+<?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-ahc-parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-ahc-deployment</artifactId>
+ <name>Camel Quarkus :: AHC (Async Http Client) :: 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-support-ahc-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-ahc</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/ahc/deployment/src/main/java/org/apache/camel/quarkus/component/ahc/deployment/AhcProcessor.java b/extensions/ahc/deployment/src/main/java/org/apache/camel/quarkus/component/ahc/deployment/AhcProcessor.java
new file mode 100644
index 0000000..ee5c22f
--- /dev/null
+++ b/extensions/ahc/deployment/src/main/java/org/apache/camel/quarkus/component/ahc/deployment/AhcProcessor.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.ahc.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+
+class AhcProcessor {
+
+ private static final String FEATURE = "camel-ahc";
+
+ @BuildStep
+ FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
+
+}
diff --git a/extensions/ahc/pom.xml b/extensions/ahc/pom.xml
new file mode 100644
index 0000000..2d15496
--- /dev/null
+++ b/extensions/ahc/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-build-parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../../poms/build-parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-ahc-parent</artifactId>
+ <name>Camel Quarkus :: AHC (Async Http Client)</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>deployment</module>
+ <module>runtime</module>
+ </modules>
+</project>
diff --git a/extensions/ahc/runtime/pom.xml b/extensions/ahc/runtime/pom.xml
new file mode 100644
index 0000000..05cbeed
--- /dev/null
+++ b/extensions/ahc/runtime/pom.xml
@@ -0,0 +1,86 @@
+<?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-ahc-parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-ahc</artifactId>
+ <name>Camel Quarkus :: AHC (Async Http Client) :: Runtime</name>
+
+ <properties>
+ <firstVersion>1.2.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-support-ahc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-ahc</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/ahc/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/ahc/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..67e85f6
--- /dev/null
+++ b/extensions/ahc/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,28 @@
+#
+# 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.
+#
+
+---
+name: "Camel Quarkus Async HTTP Client (AHC)"
+description: "Camel Quarkus Async HTTP Client (AHC) support"
+metadata:
+ keywords:
+ - "camel"
+ - "http"
+ - "client"
+ guide: "https://quarkus.io/guides/camel"
+ categories:
+ - "integration"
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 0a2b253..22d2146 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -43,6 +43,7 @@
<module>reactive-executor</module>
<!-- extensions a..z; do not remove this comment, it is important when sorting via mvn process-resources -Pformat -->
+ <module>ahc</module>
<module>attachments</module>
<module>aws-ec2</module>
<module>aws-ecs</module>
diff --git a/extensions/readme.adoc b/extensions/readme.adoc
index e00e5b9..97553fe 100644
--- a/extensions/readme.adoc
+++ b/extensions/readme.adoc
@@ -5,12 +5,15 @@
== Camel Components
// components: START
-Number of Camel components: 52 in 44 JAR artifacts (0 deprecated)
+Number of Camel components: 53 in 45 JAR artifacts (0 deprecated)
[width="100%",cols="4,1,5",options="header"]
|===
| Component | Since | Description
+| link:https://camel.apache.org/components/latest/ahc-component.html[AHC] (camel-quarkus-ahc) +
+`ahc:httpUri` | 1.2.0 | To call external HTTP services using Async Http Client.
+
| link:https://camel.apache.org/components/latest/aws-ec2-component.html[AWS EC2] (camel-quarkus-aws-ec2) +
`aws-ec2:label` | 1.2.0 | The aws-ec2 is used for managing Amazon EC2 instances.
diff --git a/extensions/support/ahc/deployment/pom.xml b/extensions/support/ahc/deployment/pom.xml
new file mode 100644
index 0000000..0e3f60c
--- /dev/null
+++ b/extensions/support/ahc/deployment/pom.xml
@@ -0,0 +1,75 @@
+<?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-support-ahc-parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-support-ahc-deployment</artifactId>
+ <name>Camel Quarkus :: Support :: Async Http Client :: 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-support-ahc</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/support/ahc/deployment/src/main/java/org/apache/camel/quarkus/component/support/ahc/deployment/SupportAhcProcessor.java b/extensions/support/ahc/deployment/src/main/java/org/apache/camel/quarkus/component/support/ahc/deployment/SupportAhcProcessor.java
new file mode 100644
index 0000000..9ae0aa8
--- /dev/null
+++ b/extensions/support/ahc/deployment/src/main/java/org/apache/camel/quarkus/component/support/ahc/deployment/SupportAhcProcessor.java
@@ -0,0 +1,45 @@
+/*
+ * 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.support.ahc.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
+
+class SupportAhcProcessor {
+
+ private static final String FEATURE = "camel-support-ahc";
+
+ @BuildStep
+ FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
+
+ @BuildStep
+ NativeImageResourceBuildItem nativeImageResources() {
+ return new NativeImageResourceBuildItem(
+ "org/asynchttpclient/config/ahc-default.properties",
+ "org/asynchttpclient/config/ahc.properties");
+ }
+
+ @BuildStep
+ ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
+ return new ExtensionSslNativeSupportBuildItem(FEATURE);
+ }
+
+}
diff --git a/extensions/support/ahc/pom.xml b/extensions/support/ahc/pom.xml
new file mode 100644
index 0000000..1297702
--- /dev/null
+++ b/extensions/support/ahc/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-build-parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../../../poms/build-parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-support-ahc-parent</artifactId>
+ <name>Camel Quarkus :: Support :: Async Http Client</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>deployment</module>
+ <module>runtime</module>
+ </modules>
+</project>
diff --git a/extensions/support/ahc/runtime/pom.xml b/extensions/support/ahc/runtime/pom.xml
new file mode 100644
index 0000000..b14458e
--- /dev/null
+++ b/extensions/support/ahc/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-support-ahc-parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-support-ahc</artifactId>
+ <name>Camel Quarkus :: Support :: Async Http Client :: Runtime</name>
+
+ <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.asynchttpclient</groupId>
+ <artifactId>async-http-client</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/support/ahc/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/support/ahc/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..770ede0
--- /dev/null
+++ b/extensions/support/ahc/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,27 @@
+#
+# 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.
+#
+
+---
+name: "Camel Quarkus Support AHC"
+description: "Camel Quarkus Support AHC"
+metadata:
+ unlisted: true
+ keywords:
+ - "camel"
+ guide: "https://quarkus.io/guides/camel"
+ categories:
+ - "integration"
diff --git a/extensions/support/pom.xml b/extensions/support/pom.xml
index fa13efb..f928f37 100644
--- a/extensions/support/pom.xml
+++ b/extensions/support/pom.xml
@@ -32,6 +32,7 @@
<packaging>pom</packaging>
<modules>
+ <module>ahc</module>
<module>aws</module>
<module>common</module>
<module>commons-logging</module>
diff --git a/integration-tests/ahc/pom.xml b/integration-tests/ahc/pom.xml
new file mode 100644
index 0000000..e3acf22
--- /dev/null
+++ b/integration-tests/ahc/pom.xml
@@ -0,0 +1,128 @@
+<?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-integration-tests</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-ahc</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: AHC (Async Http Client)</name>
+ <description>Integration tests for Camel Quarkus AHC (Async Http Client) extension</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-ahc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <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</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>
+ <reportErrorsAtRuntime>false</reportErrorsAtRuntime>
+ <cleanupServer>true</cleanupServer>
+ <enableHttpsUrlHandler>true</enableHttpsUrlHandler>
+ <enableServer>false</enableServer>
+ <dumpProxies>false</dumpProxies>
+ <graalvmHome>${graalvmHome}</graalvmHome>
+ <enableJni>true</enableJni>
+ <enableAllSecurityServices>true</enableAllSecurityServices>
+ <disableReports>true</disableReports>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/integration-tests/ahc/src/main/java/org/apache/camel/quarkus/component/ahc/it/AhcResource.java b/integration-tests/ahc/src/main/java/org/apache/camel/quarkus/component/ahc/it/AhcResource.java
new file mode 100644
index 0000000..1e0a278
--- /dev/null
+++ b/integration-tests/ahc/src/main/java/org/apache/camel/quarkus/component/ahc/it/AhcResource.java
@@ -0,0 +1,99 @@
+/*
+ * 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.ahc.it;
+
+import java.net.URI;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.ProducerTemplate;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import org.jboss.logging.Logger;
+
+@Path("/ahc")
+@ApplicationScoped
+public class AhcResource {
+
+ private static final Logger LOG = Logger.getLogger(AhcResource.class);
+
+ @ConfigProperty(name = "quarkus.http.test-port", defaultValue = "8081")
+ int port;
+
+ @Inject
+ ProducerTemplate producerTemplate;
+
+ @Path("/hello") // the "server" called by the AHC client
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ public String getEcho(@QueryParam("name") String name) throws Exception {
+ return "Hello " + name;
+ }
+
+ @Path("/hello") // the "server" called by the AHC client
+ @POST
+ @Produces(MediaType.TEXT_PLAIN)
+ public Response postEcho(String name) throws Exception {
+ return Response
+ .created(new URI("https://camel.apache.org/"))
+ .entity("Hello " + name)
+ .build();
+ }
+
+ @Path("/get") // called from the test
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ public String get(@QueryParam("name") String name) throws Exception {
+ final String message = producerTemplate.requestBodyAndHeader(
+ "ahc:http://localhost:" + port + "/ahc/hello?name=" + name,
+ null,
+ Exchange.HTTP_METHOD,
+ "GET",
+ String.class);
+ LOG.infof("Received from ahc: %s", message);
+ return message;
+ }
+
+ @Path("/post") // called from the test
+ @POST
+ @Consumes(MediaType.TEXT_PLAIN)
+ @Produces(MediaType.TEXT_PLAIN)
+ public Response post(String name) throws Exception {
+ LOG.infof("Sending to ahc: %s", name);
+ final String message = producerTemplate.requestBodyAndHeader(
+ "ahc:http://localhost:" + port + "/ahc/hello",
+ name,
+ Exchange.HTTP_METHOD,
+ "POST",
+ String.class);
+ LOG.infof("Got response from ahc: %s", message);
+ return Response
+ .created(new URI("https://camel.apache.org/"))
+ .entity(message)
+ .build();
+ }
+
+}
diff --git a/integration-tests/ahc/src/test/java/org/apache/camel/quarkus/component/ahc/it/AhcIT.java b/integration-tests/ahc/src/test/java/org/apache/camel/quarkus/component/ahc/it/AhcIT.java
new file mode 100644
index 0000000..dc805a7
--- /dev/null
+++ b/integration-tests/ahc/src/test/java/org/apache/camel/quarkus/component/ahc/it/AhcIT.java
@@ -0,0 +1,24 @@
+/*
+ * 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.ahc.it;
+
+import io.quarkus.test.junit.NativeImageTest;
+
+@NativeImageTest
+class AhcIT extends AhcTest {
+
+}
diff --git a/integration-tests/ahc/src/test/java/org/apache/camel/quarkus/component/ahc/it/AhcTest.java b/integration-tests/ahc/src/test/java/org/apache/camel/quarkus/component/ahc/it/AhcTest.java
new file mode 100644
index 0000000..47b2ee5
--- /dev/null
+++ b/integration-tests/ahc/src/test/java/org/apache/camel/quarkus/component/ahc/it/AhcTest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.ahc.it;
+
+import java.util.UUID;
+
+import org.junit.jupiter.api.Test;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+
+@QuarkusTest
+class AhcTest {
+
+ @Test
+ public void get() {
+ final String name = UUID.randomUUID().toString().replace("-", "");
+ RestAssured.given()
+ .contentType(ContentType.TEXT)
+ .queryParam("name", name)
+ .get("/ahc/hello")
+ .then()
+ .statusCode(200)
+ .body(org.hamcrest.Matchers.equalTo("Hello " + name));
+ }
+
+ @Test
+ public void post() {
+ final String name = UUID.randomUUID().toString().replace("-", "");
+ RestAssured.given()
+ .contentType(ContentType.TEXT)
+ .body(name)
+ .post("/ahc/hello")
+ .then()
+ .statusCode(201)
+ .body(org.hamcrest.Matchers.equalTo("Hello " + name));
+ }
+
+}
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 0232da2..b370361 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -157,6 +157,7 @@
<module>core-impl</module>
<!-- extensions a..z; do not remove this comment, it is important when sorting via mvn process-resources -Pformat -->
+ <module>ahc</module>
<module>aws</module>
<module>base64</module>
<module>bean</module>
diff --git a/pom.xml b/pom.xml
index 3dc1222..fa36a55 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,9 +40,11 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <ahc.version>2.10.4</ahc.version>
<camel.version>3.0.0</camel.version>
<hapi.version>4.1.0</hapi.version>
<quarkus.version>1.1.0.Final</quarkus.version>
+ <httpmime.version>4.1.3</httpmime.version>
<jetty.version>9.4.18.v20190429</jetty.version>
<xstream.version>1.4.11</xstream.version>
<snakeyaml.version>1.25</snakeyaml.version>
@@ -62,7 +64,7 @@
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
<groovy-maven-plugin.version>2.1.1</groovy-maven-plugin.version>
<groovy.version>2.5.8</groovy.version>
- <jandex-maven-plugin.version>1.0.6</jandex-maven-plugin.version>
+ <jandex-maven-plugin.version>1.0.7</jandex-maven-plugin.version>
<jetty-maven-plugin.version>9.4.20.v20190813</jetty-maven-plugin.version>
<properties-maven-plugin.version>1.0.0</properties-maven-plugin.version>
<mycila-license.version>3.0</mycila-license.version>
@@ -275,6 +277,8 @@
<excludes>
<exclude>**/*.adoc</exclude>
<exclude>**/*.lock</exclude>
+ <exclude>**/*.mp3</exclude>
+ <exclude>**/*.mp4</exclude>
<exclude>**/*.mvel</exclude>
<exclude>**/*.p12</exclude>
<exclude>**/*.pem</exclude>
diff --git a/poms/bom-deployment/pom.xml b/poms/bom-deployment/pom.xml
index 7dd6acc..baa5c7c 100644
--- a/poms/bom-deployment/pom.xml
+++ b/poms/bom-deployment/pom.xml
@@ -34,10 +34,6 @@
<properties>
<camel-quarkus.version>1.1.0-SNAPSHOT</camel-quarkus.version><!-- kept in sync with project.version by the release plugin -->
-
- <jandex-maven-plugin.version>1.0.6</jandex-maven-plugin.version>
- <maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
- <docker-maven-plugin.version>0.3.0</docker-maven-plugin.version>
</properties>
<dependencyManagement>
@@ -65,6 +61,11 @@
<!--$ org.apache.camel.quarkus $-->
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-ahc-deployment</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-attachments-deployment</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
@@ -335,6 +336,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-support-ahc-deployment</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-support-aws-deployment</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
@@ -375,6 +381,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-telegram-deployment</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-timer-deployment</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index b1f90de..7105c1e 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -58,6 +58,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-ahc</artifactId>
+ <version>${camel.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-attachments</artifactId>
<version>${camel.version}</version>
</dependency>
@@ -439,6 +444,11 @@
<!--$ org.apache.camel.quarkus $-->
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-ahc</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-attachments</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
@@ -714,6 +724,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-support-ahc</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-support-aws</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
@@ -800,6 +815,11 @@
<version>${xstream.version}</version>
</dependency>
<dependency>
+ <groupId>org.asynchttpclient</groupId>
+ <artifactId>async-http-client</artifactId>
+ <version>${ahc.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-client</artifactId>
<version>${jetty.version}</version>
diff --git a/poms/build-parent/pom.xml b/poms/build-parent/pom.xml
index 8954862..8ab8082 100644
--- a/poms/build-parent/pom.xml
+++ b/poms/build-parent/pom.xml
@@ -37,7 +37,6 @@
<!-- maven-surefire-plugin -->
<failIfNoTests>false</failIfNoTests>
- <jandex-maven-plugin.version>1.0.6</jandex-maven-plugin.version>
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
<docker-maven-plugin.version>0.3.0</docker-maven-plugin.version>
<directory-maven-plugin.version>0.3.1</directory-maven-plugin.version>
@@ -99,6 +98,11 @@
</dependency>
</dependencies>
</plugin>
+ <plugin>
+ <groupId>org.jboss.jandex</groupId>
+ <artifactId>jandex-maven-plugin</artifactId>
+ <version>${jandex-maven-plugin.version}</version>
+ </plugin>
</plugins>
</pluginManagement>