You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zb...@apache.org on 2023/03/28 07:43:26 UTC
[camel-quarkus] branch main updated (d727e424f8 -> c0c95ca486)
This is an automated email from the ASF dual-hosted git repository.
zbendhiba pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
from d727e424f8 Updated CHANGELOG.md
new f724916d7b Introduce mapstruct JVM extension
new 40968c3583 Introduce Elasticsearch JVM extension
new 88743158e2 Drop Dozer extension
new 387b525ba7 Drop Elasticsearch-rest extension
new c0c95ca486 Update alternative extensions for Dozer and Elacticsearch-rest
The 5 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:
.../ROOT/examples/components/elasticsearch.yml | 13 +
.../modules/ROOT/examples/components/mapstruct.yml | 13 +
docs/modules/ROOT/nav.adoc | 2 +
docs/modules/ROOT/pages/migration-guide/3.0.0.adoc | 4 +-
.../{asterisk.adoc => elasticsearch.adoc} | 22 +-
.../extensions/{asterisk.adoc => mapstruct.adoc} | 22 +-
.../elasticsearch/deployment/pom.xml | 14 +-
.../deployment/ElasticsearchProcessor.java} | 9 +-
.../elasticsearch/pom.xml | 8 +-
.../{chatscript => elasticsearch}/runtime/pom.xml | 17 +-
.../main/resources/META-INF/quarkus-extension.yaml | 6 +-
.../mapstruct/deployment/pom.xml | 14 +-
.../mapstruct/deployment/MapstructProcessor.java} | 8 +-
.../mapstruct/pom.xml | 8 +-
.../{chatscript => mapstruct}/runtime/pom.xml | 17 +-
.../main/resources/META-INF/quarkus-extension.yaml | 6 +-
extensions-jvm/pom.xml | 2 +
extensions/dozer/deployment/pom.xml | 65 ----
.../component/dozer/deployment/DozerProcessor.java | 175 ----------
extensions/dozer/pom.xml | 37 --
extensions/dozer/runtime/pom.xml | 118 -------
.../dozer/runtime/src/main/doc/configuration.adoc | 23 --
.../quarkus/component/dozer/CamelDozerConfig.java | 41 ---
.../component/dozer/CamelDozerRecorder.java | 40 ---
.../dozer/graal/DozerOSGiSubstitutions.java | 113 -------
.../main/resources/META-INF/quarkus-extension.yaml | 32 --
extensions/elasticsearch-rest/deployment/pom.xml | 69 ----
.../deployment/ElasticsearchRestProcessor.java | 29 --
extensions/elasticsearch-rest/pom.xml | 37 --
extensions/elasticsearch-rest/runtime/pom.xml | 105 ------
.../runtime/src/main/doc/usage.adoc | 24 --
.../main/resources/META-INF/quarkus-extension.yaml | 32 --
extensions/pom.xml | 2 -
.../elasticsearch/pom.xml | 43 +--
.../mapstruct/pom.xml | 43 +--
integration-tests-jvm/pom.xml | 2 +
integration-tests/dozer/pom.xml | 132 --------
.../quarkus/component/dozer/it/DozerResource.java | 79 -----
.../quarkus/component/dozer/it/DozerRoutes.java | 37 --
.../component/dozer/it/model/CustomerA.java | 115 -------
.../component/dozer/it/model/CustomerB.java | 166 ---------
.../src/main/resources/application.properties | 24 --
.../src/main/resources/expression-mapping.xml | 35 --
.../dozer/src/main/resources/simple-mapping.xml | 40 ---
.../dozer/src/main/resources/variable-mapping.xml | 42 ---
.../camel/quarkus/component/dozer/it/DozerIT.java | 24 --
.../quarkus/component/dozer/it/DozerTest.java | 74 ----
integration-tests/elasticsearch-rest/pom.xml | 159 ---------
.../rest/it/ElasticsearchRestResource.java | 320 ------------------
.../rest/it/ElasticsearchRestRoutes.java | 73 ----
.../rest/it/ElasticSearchTestResource.java | 87 -----
.../elasticsearch/rest/it/ElasticsearchRestIT.java | 23 --
.../rest/it/ElasticsearchRestTest.java | 376 ---------------------
integration-tests/pom.xml | 2 -
poms/bom/pom.xml | 40 +++
poms/bom/src/main/generated/flattened-full-pom.xml | 40 +++
.../src/main/generated/flattened-reduced-pom.xml | 40 +++
.../generated/flattened-reduced-verbose-pom.xml | 40 +++
58 files changed, 282 insertions(+), 2901 deletions(-)
create mode 100644 docs/modules/ROOT/examples/components/elasticsearch.yml
create mode 100644 docs/modules/ROOT/examples/components/mapstruct.yml
copy docs/modules/ROOT/pages/reference/extensions/{asterisk.adoc => elasticsearch.adoc} (55%)
copy docs/modules/ROOT/pages/reference/extensions/{asterisk.adoc => mapstruct.adoc} (59%)
copy tooling/create-extension-templates/deployment-pom.xml => extensions-jvm/elasticsearch/deployment/pom.xml (83%)
copy extensions-jvm/{couchbase/deployment/src/main/java/org/apache/camel/quarkus/component/couchbase/deployment/CouchbaseProcessor.java => elasticsearch/deployment/src/main/java/org/apache/camel/quarkus/component/elasticsearch/deployment/ElasticsearchProcessor.java} (86%)
copy tooling/create-extension-templates/parent-pom.xml => extensions-jvm/elasticsearch/pom.xml (86%)
copy extensions-jvm/{chatscript => elasticsearch}/runtime/pom.xml (83%)
copy extensions-jvm/{bonita => elasticsearch}/runtime/src/main/resources/META-INF/quarkus-extension.yaml (90%)
copy tooling/create-extension-templates/deployment-pom.xml => extensions-jvm/mapstruct/deployment/pom.xml (83%)
copy extensions-jvm/{wordpress/deployment/src/main/java/org/apache/camel/quarkus/component/wordpress/deployment/WordpressProcessor.java => mapstruct/deployment/src/main/java/org/apache/camel/quarkus/component/mapstruct/deployment/MapstructProcessor.java} (88%)
copy tooling/create-extension-templates/parent-pom.xml => extensions-jvm/mapstruct/pom.xml (86%)
copy extensions-jvm/{chatscript => mapstruct}/runtime/pom.xml (84%)
copy extensions-jvm/{asterisk => mapstruct}/runtime/src/main/resources/META-INF/quarkus-extension.yaml (92%)
delete mode 100644 extensions/dozer/deployment/pom.xml
delete mode 100644 extensions/dozer/deployment/src/main/java/org/apache/camel/quarkus/component/dozer/deployment/DozerProcessor.java
delete mode 100644 extensions/dozer/pom.xml
delete mode 100644 extensions/dozer/runtime/pom.xml
delete mode 100644 extensions/dozer/runtime/src/main/doc/configuration.adoc
delete mode 100644 extensions/dozer/runtime/src/main/java/org/apache/camel/quarkus/component/dozer/CamelDozerConfig.java
delete mode 100644 extensions/dozer/runtime/src/main/java/org/apache/camel/quarkus/component/dozer/CamelDozerRecorder.java
delete mode 100644 extensions/dozer/runtime/src/main/java/org/apache/camel/quarkus/component/dozer/graal/DozerOSGiSubstitutions.java
delete mode 100644 extensions/dozer/runtime/src/main/resources/META-INF/quarkus-extension.yaml
delete mode 100644 extensions/elasticsearch-rest/deployment/pom.xml
delete mode 100644 extensions/elasticsearch-rest/deployment/src/main/java/org/apache/camel/quarkus/component/elasticsearch/rest/deployment/ElasticsearchRestProcessor.java
delete mode 100644 extensions/elasticsearch-rest/pom.xml
delete mode 100644 extensions/elasticsearch-rest/runtime/pom.xml
delete mode 100644 extensions/elasticsearch-rest/runtime/src/main/doc/usage.adoc
delete mode 100644 extensions/elasticsearch-rest/runtime/src/main/resources/META-INF/quarkus-extension.yaml
copy tooling/create-extension-templates/integration-test-pom.xml => integration-tests-jvm/elasticsearch/pom.xml (59%)
copy tooling/create-extension-templates/integration-test-pom.xml => integration-tests-jvm/mapstruct/pom.xml (59%)
delete mode 100644 integration-tests/dozer/pom.xml
delete mode 100644 integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/DozerResource.java
delete mode 100644 integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/DozerRoutes.java
delete mode 100644 integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/model/CustomerA.java
delete mode 100644 integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/model/CustomerB.java
delete mode 100644 integration-tests/dozer/src/main/resources/application.properties
delete mode 100644 integration-tests/dozer/src/main/resources/expression-mapping.xml
delete mode 100644 integration-tests/dozer/src/main/resources/simple-mapping.xml
delete mode 100644 integration-tests/dozer/src/main/resources/variable-mapping.xml
delete mode 100644 integration-tests/dozer/src/test/java/org/apache/camel/quarkus/component/dozer/it/DozerIT.java
delete mode 100644 integration-tests/dozer/src/test/java/org/apache/camel/quarkus/component/dozer/it/DozerTest.java
delete mode 100644 integration-tests/elasticsearch-rest/pom.xml
delete mode 100644 integration-tests/elasticsearch-rest/src/main/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestResource.java
delete mode 100644 integration-tests/elasticsearch-rest/src/main/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestRoutes.java
delete mode 100644 integration-tests/elasticsearch-rest/src/test/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticSearchTestResource.java
delete mode 100644 integration-tests/elasticsearch-rest/src/test/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestIT.java
delete mode 100644 integration-tests/elasticsearch-rest/src/test/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestTest.java
[camel-quarkus] 04/05: Drop Elasticsearch-rest extension
Posted by zb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zbendhiba pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 387b525ba73f2522ac6be6bd91893f7985197ee6
Author: Zineb Bendhiba <be...@gmail.com>
AuthorDate: Fri Mar 24 11:38:19 2023 +0100
Drop Elasticsearch-rest extension
---
extensions/elasticsearch-rest/deployment/pom.xml | 69 ----
.../deployment/ElasticsearchRestProcessor.java | 29 --
extensions/elasticsearch-rest/pom.xml | 37 --
extensions/elasticsearch-rest/runtime/pom.xml | 105 ------
.../runtime/src/main/doc/usage.adoc | 24 --
.../main/resources/META-INF/quarkus-extension.yaml | 32 --
extensions/pom.xml | 1 -
integration-tests/elasticsearch-rest/pom.xml | 159 ---------
.../rest/it/ElasticsearchRestResource.java | 320 ------------------
.../rest/it/ElasticsearchRestRoutes.java | 73 ----
.../rest/it/ElasticSearchTestResource.java | 87 -----
.../elasticsearch/rest/it/ElasticsearchRestIT.java | 23 --
.../rest/it/ElasticsearchRestTest.java | 376 ---------------------
integration-tests/pom.xml | 1 -
14 files changed, 1336 deletions(-)
diff --git a/extensions/elasticsearch-rest/deployment/pom.xml b/extensions/elasticsearch-rest/deployment/pom.xml
deleted file mode 100644
index 3779be1e70..0000000000
--- a/extensions/elasticsearch-rest/deployment/pom.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?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-elasticsearch-rest-parent</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>camel-quarkus-elasticsearch-rest-deployment</artifactId>
- <name>Camel Quarkus :: Elasticsearch Rest :: Deployment</name>
-
- <dependencies>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-elasticsearch-rest-client-deployment</artifactId>
- </dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-elasticsearch-rest-high-level-client-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-elasticsearch-rest</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/elasticsearch-rest/deployment/src/main/java/org/apache/camel/quarkus/component/elasticsearch/rest/deployment/ElasticsearchRestProcessor.java b/extensions/elasticsearch-rest/deployment/src/main/java/org/apache/camel/quarkus/component/elasticsearch/rest/deployment/ElasticsearchRestProcessor.java
deleted file mode 100644
index 0684e1f97d..0000000000
--- a/extensions/elasticsearch-rest/deployment/src/main/java/org/apache/camel/quarkus/component/elasticsearch/rest/deployment/ElasticsearchRestProcessor.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.elasticsearch.rest.deployment;
-
-import io.quarkus.deployment.annotations.BuildStep;
-import io.quarkus.deployment.builditem.FeatureBuildItem;
-
-class ElasticsearchRestProcessor {
- private static final String FEATURE = "camel-elasticsearch-rest";
-
- @BuildStep
- FeatureBuildItem feature() {
- return new FeatureBuildItem(FEATURE);
- }
-}
diff --git a/extensions/elasticsearch-rest/pom.xml b/extensions/elasticsearch-rest/pom.xml
deleted file mode 100644
index 566fea8858..0000000000
--- a/extensions/elasticsearch-rest/pom.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-extensions</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>camel-quarkus-elasticsearch-rest-parent</artifactId>
- <name>Camel Quarkus :: Elasticsearch Rest</name>
- <packaging>pom</packaging>
-
- <modules>
- <module>deployment</module>
- <module>runtime</module>
- </modules>
-</project>
diff --git a/extensions/elasticsearch-rest/runtime/pom.xml b/extensions/elasticsearch-rest/runtime/pom.xml
deleted file mode 100644
index d3168cc9f6..0000000000
--- a/extensions/elasticsearch-rest/runtime/pom.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-<?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-elasticsearch-rest-parent</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>camel-quarkus-elasticsearch-rest</artifactId>
- <name>Camel Quarkus :: Elasticsearch Rest :: Runtime</name>
-
- <properties>
- <camel.quarkus.jvmSince>1.0.0</camel.quarkus.jvmSince>
- <camel.quarkus.nativeSince>1.0.0</camel.quarkus.nativeSince>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-elasticsearch-rest-client</artifactId>
- </dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-elasticsearch-rest-high-level-client</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-elasticsearch-rest</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-extension-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <annotationProcessorPaths>
- <path>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-extension-processor</artifactId>
- <version>${quarkus.version}</version>
- </path>
- </annotationProcessorPaths>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>full</id>
- <activation>
- <property>
- <name>!quickly</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>update-extension-doc-page</id>
- <goals>
- <goal>update-extension-doc-page</goal>
- </goals>
- <phase>process-classes</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/extensions/elasticsearch-rest/runtime/src/main/doc/usage.adoc b/extensions/elasticsearch-rest/runtime/src/main/doc/usage.adoc
deleted file mode 100644
index 6259f3c9c6..0000000000
--- a/extensions/elasticsearch-rest/runtime/src/main/doc/usage.adoc
+++ /dev/null
@@ -1,24 +0,0 @@
-This extension leverages the https://quarkus.io/guides/elasticsearch[Quarkus ElasticSearch REST Client].
-
-You can choose to configure ElasticSearch via the Quarkus https://quarkus.io/guides/elasticsearch#quarkus-elasticsearch-restclient-lowlevel_configuration[configuration properties] and the `RestClient` will be autowired into the Camel ElasticSearch component.
-
-Or you can configure ElasticSearch via the Camel ElasticSearch component / endpoint options. When doing this, you must disable autowiring in one of the ways outlined below.
-
-Disabling autowiring at the component level.
-[source,properties]
-----
-camel.component.elasticsearch-rest.autowired-enabled = false
-----
-
-Disabling autowiring at the endpoint level.
-[source,java]
-----
-from("direct:search")
- .to("elasticsearch-rest://elasticsearch?hostAddresses=localhost:9200&operation=Search&indexName=index&autowiredEnabled=false")
-----
-
-Globally disabling autowiring. Note that this disables autowiring for all components.
-[source,properties]
-----
-camel.main.autowired-enabled = false
-----
diff --git a/extensions/elasticsearch-rest/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/elasticsearch-rest/runtime/src/main/resources/META-INF/quarkus-extension.yaml
deleted file mode 100644
index f0b2b273a7..0000000000
--- a/extensions/elasticsearch-rest/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# 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 Elasticsearch Rest"
-description: "Send requests to ElasticSearch via REST API"
-metadata:
- guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/elasticsearch-rest.html"
- categories:
- - "integration"
- status:
- - "stable"
- - "deprecated"
\ No newline at end of file
diff --git a/extensions/pom.xml b/extensions/pom.xml
index c062d82b6a..28335767c6 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -95,7 +95,6 @@
<module>direct</module>
<module>disruptor</module>
<module>dropbox</module>
- <!--<module>elasticsearch-rest</module> https://github.com/apache/camel-quarkus/issues/4477 -->
<module>exec</module>
<module>fhir</module>
<module>file</module>
diff --git a/integration-tests/elasticsearch-rest/pom.xml b/integration-tests/elasticsearch-rest/pom.xml
deleted file mode 100644
index 96aabe0122..0000000000
--- a/integration-tests/elasticsearch-rest/pom.xml
+++ /dev/null
@@ -1,159 +0,0 @@
-<?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>3.0.0-SNAPSHOT</version>
- <relativePath>../../poms/build-parent-it/pom.xml</relativePath>
- </parent>
-
- <artifactId>camel-quarkus-integration-test-elasticsearch-rest</artifactId>
- <name>Camel Quarkus :: Integration Tests :: Elasticsearch Rest</name>
- <description>Integration tests for Camel Quarkus Elasticsearch Rest extension</description>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-direct</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-elasticsearch-rest</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>
- <dependency>
- <groupId>org.testcontainers</groupId>
- <artifactId>testcontainers</artifactId>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-junit4-mock</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.awaitility</groupId>
- <artifactId>awaitility</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-
- <profiles>
- <profile>
- <id>native</id>
- <activation>
- <property>
- <name>native</name>
- </property>
- </activation>
- <properties>
- <quarkus.package.type>native</quarkus.package.type>
- </properties>
- <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>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>virtualDependencies</id>
- <activation>
- <property>
- <name>!noVirtualDependencies</name>
- </property>
- </activation>
- <dependencies>
- <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-direct-deployment</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-elasticsearch-rest-deployment</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>*</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>skip-testcontainers-tests</id>
- <activation>
- <property>
- <name>skip-testcontainers-tests</name>
- </property>
- </activation>
- <properties>
- <skipTests>true</skipTests>
- </properties>
- </profile>
- </profiles>
-</project>
diff --git a/integration-tests/elasticsearch-rest/src/main/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestResource.java b/integration-tests/elasticsearch-rest/src/main/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestResource.java
deleted file mode 100644
index ed0199a519..0000000000
--- a/integration-tests/elasticsearch-rest/src/main/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestResource.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.elasticsearch.rest.it;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.inject.Inject;
-import jakarta.ws.rs.DELETE;
-import jakarta.ws.rs.GET;
-import jakarta.ws.rs.PATCH;
-import jakarta.ws.rs.POST;
-import jakarta.ws.rs.Path;
-import jakarta.ws.rs.Produces;
-import jakarta.ws.rs.QueryParam;
-import jakarta.ws.rs.core.MediaType;
-import jakarta.ws.rs.core.Response;
-
-import org.apache.camel.FluentProducerTemplate;
-import org.apache.camel.component.elasticsearch.ElasticsearchConstants;
-import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
-import org.elasticsearch.action.bulk.BulkItemResponse;
-import org.elasticsearch.action.bulk.BulkRequest;
-import org.elasticsearch.action.get.GetResponse;
-import org.elasticsearch.action.index.IndexRequest;
-import org.elasticsearch.action.search.MultiSearchRequest;
-import org.elasticsearch.action.search.MultiSearchResponse.Item;
-import org.elasticsearch.action.search.SearchRequest;
-import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.search.SearchHits;
-import org.elasticsearch.search.builder.SearchSourceBuilder;
-
-@Path("/elasticsearch-rest")
-@ApplicationScoped
-public class ElasticsearchRestResource {
-
- private static final String HEADER_COMPONENT = "component";
-
- @Inject
- FluentProducerTemplate fluentProducerTemplate;
-
- @Path("/get")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response getData(
- @QueryParam("component") String component,
- @QueryParam("indexName") String indexName,
- @QueryParam("indexId") String indexId,
- @QueryParam("indexKey") String indexKey) {
-
- GetResponse response = fluentProducerTemplate.to("direct:get")
- .withBody(indexId)
- .withHeader(ElasticsearchConstants.PARAM_INDEX_NAME, indexName)
- .withHeader(HEADER_COMPONENT, component)
- .request(GetResponse.class);
-
- if (response.getSource() == null) {
- return Response.status(404).build();
- }
-
- return Response.ok().entity(response.getSource().get(indexKey)).build();
- }
-
- @Path("/index")
- @POST
- @Produces(MediaType.TEXT_PLAIN)
- public Response indexData(
- @QueryParam("component") String component,
- @QueryParam("indexName") String indexName,
- @QueryParam("indexKey") String indexKey,
- String indexValue) throws Exception {
-
- String indexId = fluentProducerTemplate.to("direct:index")
- .withBody(createIndexedData(indexKey, indexValue))
- .withHeader(ElasticsearchConstants.PARAM_INDEX_NAME, indexName)
- .withHeader(HEADER_COMPONENT, component)
- .request(String.class);
-
- return Response
- .created(new URI("https://camel.apache.org/"))
- .entity(indexId)
- .build();
- }
-
- @Path("/update")
- @PATCH
- @Produces(MediaType.TEXT_PLAIN)
- public Response updateData(
- @QueryParam("component") String component,
- @QueryParam("indexName") String indexName,
- @QueryParam("indexId") String indexId,
- @QueryParam("indexKey") String indexKey,
- String indexValue) {
-
- fluentProducerTemplate.to("direct:update")
- .withBody(createIndexedData(indexKey, indexValue))
- .withHeader(ElasticsearchConstants.PARAM_INDEX_NAME, indexName)
- .withHeader(ElasticsearchConstants.PARAM_INDEX_ID, indexId)
- .withHeader(HEADER_COMPONENT, component)
- .request();
-
- return Response.ok().build();
- }
-
- @Path("/delete")
- @DELETE
- @Produces(MediaType.TEXT_PLAIN)
- public Response deleteData(
- @QueryParam("component") String component,
- @QueryParam("indexName") String indexName,
- @QueryParam("indexId") String indexId) {
-
- fluentProducerTemplate.to("direct:delete")
- .withBody(indexId)
- .withHeader(ElasticsearchConstants.PARAM_INDEX_NAME, indexName)
- .withHeader(HEADER_COMPONENT, component)
- .request();
-
- return Response.noContent().build();
- }
-
- @Path("/delete/index")
- @DELETE
- @Produces(MediaType.TEXT_PLAIN)
- public Response deleteIndexData(
- @QueryParam("component") String component,
- @QueryParam("indexName") String indexName) {
-
- DeleteIndexRequest request = new DeleteIndexRequest(indexName);
-
- Boolean result = fluentProducerTemplate.to("direct:deleteIndex")
- .withBody(request)
- .withHeader(HEADER_COMPONENT, component)
- .request(Boolean.class);
-
- return Response.ok(result).build();
- }
-
- @Path("/ping")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response ping(@QueryParam("component") String component) {
- Boolean result = fluentProducerTemplate.to("direct:ping")
- .withHeader(HEADER_COMPONENT, component)
- .request(Boolean.class);
-
- return Response.ok(result).build();
- }
-
- @Path("/exists")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response exists(
- @QueryParam("component") String component,
- @QueryParam("indexName") String indexName) {
-
- Boolean result = fluentProducerTemplate.to("direct:exists")
- .withHeader(ElasticsearchConstants.PARAM_INDEX_NAME, indexName)
- .withHeader(HEADER_COMPONENT, component)
- .request(Boolean.class);
-
- return Response.ok(result).build();
- }
-
- @Path("/bulk")
- @POST
- @Produces(MediaType.TEXT_PLAIN)
- public Response bulk(
- @QueryParam("component") String component,
- @QueryParam("indexName") String indexName) {
-
- BulkRequest request = new BulkRequest();
- request.add(new IndexRequest(indexName).source("camel", "quarkus"));
-
- BulkItemResponse[] result = fluentProducerTemplate.to("direct:bulk")
- .withBody(request)
- .withHeader(HEADER_COMPONENT, component)
- .request(BulkItemResponse[].class);
-
- return Response.ok(result[0].getResponse().getId()).build();
- }
-
- @Path("/bulk/index")
- @POST
- @Produces(MediaType.TEXT_PLAIN)
- public Response bulkIndex(
- @QueryParam("component") String component,
- @QueryParam("indexName") String indexName) {
-
- List<Map<String, String>> documents = new ArrayList<>();
- documents.add(createIndexedData("foo", "bar"));
- documents.add(createIndexedData("cheese", "wine"));
-
- List<BulkItemResponse> result = fluentProducerTemplate.to("direct:bulkIndex")
- .withBody(documents)
- .withHeader(ElasticsearchConstants.PARAM_INDEX_NAME, indexName)
- .withHeader(HEADER_COMPONENT, component)
- .request(List.class);
-
- String ids = result.stream().map(bulkItem -> bulkItem.getResponse().getId()).collect(Collectors.joining(","));
-
- return Response.ok(ids).build();
- }
-
- @Path("/search")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response searchByMap(
- @QueryParam("component") String component,
- @QueryParam("indexKey") String indexKey,
- String searchString) {
-
- Map<String, Object> actualQuery = new HashMap<>();
- actualQuery.put(indexKey, searchString);
-
- Map<String, Object> match = new HashMap<>();
- match.put("match", actualQuery);
-
- Map<String, Object> query = new HashMap<>();
- query.put("query", match);
-
- SearchHits result = fluentProducerTemplate.to("direct:search")
- .withBody(query)
- .withHeader(HEADER_COMPONENT, component)
- .request(SearchHits.class);
-
- if (result.getHits().length > 0) {
- Map<String, Object> source = result.getAt(0).getSourceAsMap();
- return Response.ok(source.get(indexKey)).build();
- }
- return Response.ok().build();
- }
-
- @Path("/search/json")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response searchByJSON(
- @QueryParam("component") String component,
- @QueryParam("indexKey") String indexKey,
- String searchString) {
-
- String query = "{\"query\":{\"match\":{\"%s\":\"%s\"}}}";
-
- SearchHits result = fluentProducerTemplate.to("direct:search")
- .withBody(String.format(query, indexKey, searchString))
- .withHeader(HEADER_COMPONENT, component)
- .request(SearchHits.class);
-
- if (result.getHits().length > 0) {
- Map<String, Object> source = result.getAt(0).getSourceAsMap();
- return Response.ok(source.get(indexKey)).build();
- }
- return Response.ok().build();
- }
-
- @Path("/search/multi")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response searchMulti(
- @QueryParam("component") String component,
- @QueryParam("indexName") String indexName,
- @QueryParam("indexKey") String indexKey,
- String searchStrings) {
-
- String[] searchTerms = searchStrings.split(",");
-
- MultiSearchRequest request = new MultiSearchRequest();
- SearchRequest searchA = new SearchRequest(indexName);
- SearchSourceBuilder builderA = new SearchSourceBuilder();
- builderA.query(QueryBuilders.matchPhraseQuery(indexKey, searchTerms[0]));
- searchA.source(builderA);
- request.add(searchA);
-
- SearchRequest searchB = new SearchRequest(indexName);
- SearchSourceBuilder builderB = new SearchSourceBuilder();
- builderB.query(QueryBuilders.matchPhraseQuery(indexKey, searchTerms[1]));
- searchB.source(builderB);
- request.add(searchB);
-
- Item[] result = fluentProducerTemplate.to("direct:multiSearch")
- .withBody(request)
- .withHeader(HEADER_COMPONENT, component)
- .request(Item[].class);
-
- if (result.length > 0) {
- int totalHits = 0;
- for (Item item : result) {
- totalHits += item.getResponse().getHits().getHits().length;
- }
- return Response.ok(totalHits).build();
- }
- return Response.ok().build();
- }
-
- private Map<String, String> createIndexedData(String indexKey, String indexValue) {
- Map<String, String> map = new HashMap<>();
- map.put(indexKey, indexValue);
- return map;
- }
-
-}
diff --git a/integration-tests/elasticsearch-rest/src/main/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestRoutes.java b/integration-tests/elasticsearch-rest/src/main/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestRoutes.java
deleted file mode 100644
index 0aa538e3d0..0000000000
--- a/integration-tests/elasticsearch-rest/src/main/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestRoutes.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.elasticsearch.rest.it;
-
-import jakarta.inject.Named;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.elasticsearch.ElasticsearchComponent;
-import org.elasticsearch.client.RestClient;
-
-public class ElasticsearchRestRoutes extends RouteBuilder {
-
- @Override
- public void configure() {
- from("direct:bulk")
- .toD("${header.component}://elasticsearch?operation=Bulk");
-
- from("direct:bulkIndex")
- .toD("${header.component}://elasticsearch?operation=BulkIndex");
-
- from("direct:delete")
- .toD("${header.component}://elasticsearch?operation=Delete");
-
- from("direct:deleteIndex")
- .toD("${header.component}://elasticsearch?operation=DeleteIndex");
-
- from("direct:exists")
- .toD("${header.component}://elasticsearch?operation=Exists");
-
- from("direct:get")
- .toD("${header.component}://elasticsearch?operation=GetById");
-
- from("direct:index")
- .toD("${header.component}://elasticsearch?operation=Index");
-
- from("direct:multiGet")
- .toD("${header.component}://elasticsearch?operation=MultiGet");
-
- from("direct:multiSearch")
- .toD("${header.component}://elasticsearch?operation=MultiSearch");
-
- from("direct:ping")
- .toD("${header.component}://elasticsearch?operation=Ping");
-
- from("direct:search")
- .toD("${header.component}://elasticsearch?operation=Search");
-
- from("direct:update")
- .toD("${header.component}://elasticsearch?operation=Update");
- }
-
- @Named("elasticsearch-rest-quarkus")
- public ElasticsearchComponent elasticsearchQuarkus(RestClient client) {
- // Use the RestClient bean created by the Quarkus ElasticSearch extension
- ElasticsearchComponent component = new ElasticsearchComponent();
- component.setClient(client);
- return component;
- }
-}
diff --git a/integration-tests/elasticsearch-rest/src/test/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticSearchTestResource.java b/integration-tests/elasticsearch-rest/src/test/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticSearchTestResource.java
deleted file mode 100644
index f878e48d07..0000000000
--- a/integration-tests/elasticsearch-rest/src/test/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticSearchTestResource.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.elasticsearch.rest.it;
-
-import java.util.Map;
-
-import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
-import org.apache.camel.util.CollectionHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testcontainers.containers.GenericContainer;
-import org.testcontainers.containers.output.Slf4jLogConsumer;
-import org.testcontainers.containers.wait.strategy.Wait;
-import org.testcontainers.utility.TestcontainersConfiguration;
-
-public class ElasticSearchTestResource implements QuarkusTestResourceLifecycleManager {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(ElasticSearchTestResource.class);
- private static final String ELASTICSEARCH_IMAGE = "elasticsearch:7.10.1";
- private static final String ELASTICSEARCH_USERNAME = "elastic";
- private static final String ELASTICSEARCH_PASSWORD = "changeme";
- private static final int ELASTICSEARCH_PORT = 9200;
-
- private GenericContainer<?> container;
-
- @Override
- public Map<String, String> start() {
- LOGGER.info(TestcontainersConfiguration.getInstance().toString());
-
- try {
- container = new GenericContainer<>(ELASTICSEARCH_IMAGE)
- .withExposedPorts(ELASTICSEARCH_PORT)
- .withLogConsumer(new Slf4jLogConsumer(LOGGER))
- .withEnv("discovery.type", "single-node")
- .withEnv("xpack.security.enabled", "true")
- .withEnv("ELASTIC_USERNAME", ELASTICSEARCH_USERNAME)
- .withEnv("ELASTIC_PASSWORD", ELASTICSEARCH_PASSWORD)
- .waitingFor(Wait.forListeningPort());
-
- container.start();
-
- String hostAddresses = String.format("localhost:%s", container.getMappedPort(ELASTICSEARCH_PORT));
-
- // Create 2 sets of configuration to test scenarios:
- // - Quarkus ElasticSearch REST client bean being autowired into the Camel ElasticSearch REST component
- // - Component configuration where the ElasticSearch REST client is managed by Camel (E.g autowiring disabled)
- return CollectionHelper.mapOf(
- // quarkus
- "quarkus.elasticsearch.hosts", hostAddresses,
- "quarkus.elasticsearch.username", ELASTICSEARCH_USERNAME,
- "quarkus.elasticsearch.password", ELASTICSEARCH_PASSWORD,
- // camel
- "camel.component.elasticsearch-rest.autowired-enabled", "false",
- "camel.component.elasticsearch-rest.host-addresses", hostAddresses,
- "camel.component.elasticsearch-rest.user", ELASTICSEARCH_USERNAME,
- "camel.component.elasticsearch-rest.password", ELASTICSEARCH_PASSWORD);
-
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- @Override
- public void stop() {
- try {
- if (container != null) {
- container.stop();
- }
- } catch (Exception e) {
- // Ignored
- }
- }
-}
diff --git a/integration-tests/elasticsearch-rest/src/test/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestIT.java b/integration-tests/elasticsearch-rest/src/test/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestIT.java
deleted file mode 100644
index 7a3c12a682..0000000000
--- a/integration-tests/elasticsearch-rest/src/test/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestIT.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.elasticsearch.rest.it;
-
-import io.quarkus.test.junit.QuarkusIntegrationTest;
-
-@QuarkusIntegrationTest
-class ElasticsearchRestIT extends ElasticsearchRestTest {
-}
diff --git a/integration-tests/elasticsearch-rest/src/test/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestTest.java b/integration-tests/elasticsearch-rest/src/test/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestTest.java
deleted file mode 100644
index a1d2e4dca8..0000000000
--- a/integration-tests/elasticsearch-rest/src/test/java/org/apache/camel/quarkus/component/elasticsearch/rest/it/ElasticsearchRestTest.java
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.elasticsearch.rest.it;
-
-import java.util.UUID;
-import java.util.concurrent.TimeUnit;
-
-import io.quarkus.test.common.QuarkusTestResource;
-import io.quarkus.test.junit.QuarkusTest;
-import io.restassured.RestAssured;
-import io.restassured.http.ContentType;
-import org.awaitility.Awaitility;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.MethodSource;
-
-import static org.hamcrest.Matchers.is;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-@QuarkusTest
-@QuarkusTestResource(ElasticSearchTestResource.class)
-class ElasticsearchRestTest {
-
- @AfterEach
- public void afterEach() {
- // Clean up all indexed data
- RestAssured.given()
- .queryParam("component", "elasticsearch-rest")
- .queryParam("indexName", "_all")
- .delete("/elasticsearch-rest/delete/index")
- .then()
- .statusCode(200)
- .body(is("true"));
- }
-
- @ParameterizedTest
- @MethodSource("componentNames")
- public void testElasticsearchBasicOperations(String component) {
- String indexName = UUID.randomUUID().toString();
- String indexKey = "test-key";
- String indexValue = "Hello Camel Quarkus ElasticSearch REST";
-
- // Verify the ElasticSearch server is available
- RestAssured.given()
- .queryParam("component", component)
- .get("/elasticsearch-rest/ping")
- .then()
- .statusCode(200)
- .body(is("true"));
-
- // Index data
- String indexId = RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .queryParam("indexKey", indexKey)
- .contentType(ContentType.TEXT)
- .body(indexValue)
- .post("/elasticsearch-rest/index")
- .then()
- .statusCode(201)
- .extract()
- .body()
- .asString();
-
- // Verify index exists
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .get("/elasticsearch-rest/exists")
- .then()
- .statusCode(200)
- .body(is("true"));
-
- // Retrieve indexed data
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .queryParam("indexId", indexId)
- .queryParam("indexKey", indexKey)
- .get("/elasticsearch-rest/get")
- .then()
- .statusCode(200)
- .body(is(indexValue));
-
- // Update indexed data
- String updatedIndexValue = indexValue + " Updated";
- RestAssured.given()
- .contentType(ContentType.TEXT)
- .queryParam("component", component)
- .queryParam("indexId", indexId)
- .queryParam("indexName", indexName)
- .queryParam("indexKey", indexKey)
- .body(updatedIndexValue)
- .patch("/elasticsearch-rest/update")
- .then()
- .statusCode(200);
-
- // Verify updated data
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .queryParam("indexId", indexId)
- .queryParam("indexKey", indexKey)
- .get("/elasticsearch-rest/get")
- .then()
- .statusCode(200)
- .body(is(updatedIndexValue));
-
- // Delete indexed data
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .queryParam("indexId", indexId)
- .delete("/elasticsearch-rest/delete")
- .then()
- .statusCode(204);
-
- // Verify data deleted
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .queryParam("indexId", indexId)
- .queryParam("indexKey", indexKey)
- .get("/elasticsearch-rest/get")
- .then()
- .statusCode(404);
- }
-
- @ParameterizedTest
- @MethodSource("componentNames")
- public void testElasticsearchBulk(String component) {
- String indexName = UUID.randomUUID().toString();
-
- String indexId = RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .post("/elasticsearch-rest/bulk")
- .then()
- .statusCode(200)
- .extract()
- .body()
- .asString();
-
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .get("/elasticsearch-rest/exists")
- .then()
- .statusCode(200)
- .body(is("true"));
-
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .queryParam("indexId", indexId)
- .queryParam("indexKey", "camel")
- .get("/elasticsearch-rest/get")
- .then()
- .statusCode(200)
- .body(is("quarkus"));
- }
-
- @ParameterizedTest
- @MethodSource("componentNames")
- public void testElasticsearchBulkIndex(String component) {
- String indexName = UUID.randomUUID().toString();
- String indexId = RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .post("/elasticsearch-rest/bulk/index")
- .then()
- .statusCode(200)
- .extract()
- .body()
- .asString();
- assertEquals(2, indexId.split(",").length);
- }
-
- @ParameterizedTest
- @MethodSource("componentNames")
- public void testElasticsearchDeleteIndex(String component) {
- String indexName = UUID.randomUUID().toString();
- String indexKey = "test-key";
- String indexValue = "Hello Camel Quarkus ElasticSearch REST";
-
- // Index data
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .queryParam("indexKey", indexKey)
- .contentType(ContentType.TEXT)
- .body(indexValue)
- .post("/elasticsearch-rest/index")
- .then()
- .statusCode(201)
- .extract()
- .body()
- .asString();
-
- // Verify index exists
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .get("/elasticsearch-rest/exists")
- .then()
- .statusCode(200)
- .body(is("true"));
-
- // Delete indexed data
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .delete("/elasticsearch-rest/delete/index")
- .then()
- .statusCode(200)
- .body(is("true"));
- }
-
- @ParameterizedTest
- @MethodSource("componentNames")
- public void testElasticsearchSearch(String component) {
- String indexName = UUID.randomUUID().toString();
- String indexKey = "camel-quarkus";
- String indexValue = "Sub Atomic, Super Fast Camel Quarkus";
-
- // Index data
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .queryParam("indexKey", indexKey)
- .contentType(ContentType.TEXT)
- .body(indexValue)
- .post("/elasticsearch-rest/index")
- .then()
- .statusCode(201)
- .extract()
- .body()
- .asString();
-
- // Verify index exists
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .get("/elasticsearch-rest/exists")
- .then()
- .statusCode(200)
- .body(is("true"));
-
- // Search data
- Awaitility.await().pollInterval(50, TimeUnit.MILLISECONDS).atMost(10, TimeUnit.SECONDS).until(() -> {
- String searchResult = RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexKey", indexKey)
- .body("Super Fast")
- .get("/elasticsearch-rest/search")
- .then()
- .statusCode(200)
- .extract()
- .body()
- .asString();
- return searchResult.equals(indexValue);
- });
- }
-
- @ParameterizedTest
- @MethodSource("componentNames")
- public void testElasticsearchSearchJSON(String component) {
- String indexName = UUID.randomUUID().toString();
- String indexKey = "camel-quarkus";
- String indexValue = "Sub Atomic, Super Fast Camel Quarkus";
-
- // Index data
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .queryParam("indexKey", indexKey)
- .contentType(ContentType.TEXT)
- .body(indexValue)
- .post("/elasticsearch-rest/index")
- .then()
- .statusCode(201)
- .extract()
- .body()
- .asString();
-
- // Verify index exists
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .get("/elasticsearch-rest/exists")
- .then()
- .statusCode(200)
- .body(is("true"));
-
- // Search data
- Awaitility.await().pollInterval(50, TimeUnit.MILLISECONDS).atMost(10, TimeUnit.SECONDS).until(() -> {
- String searchResult = RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexKey", indexKey)
- .body("Super Fast")
- .get("/elasticsearch-rest/search/json")
- .then()
- .statusCode(200)
- .extract()
- .body()
- .asString();
- return searchResult.equals(indexValue);
- });
- }
-
- @ParameterizedTest
- @MethodSource("componentNames")
- public void testElasticsearchMultiSearch(String component) {
- String indexName = UUID.randomUUID().toString();
- String indexKey = "camel-quarkus";
- String indexValue = "Sub Atomic, Super Fast Camel Quarkus";
-
- // Index data
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .queryParam("indexKey", indexKey)
- .contentType(ContentType.TEXT)
- .body(indexValue)
- .post("/elasticsearch-rest/index")
- .then()
- .statusCode(201)
- .extract()
- .body()
- .asString();
-
- // Verify index exists
- RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .get("/elasticsearch-rest/exists")
- .then()
- .statusCode(200)
- .body(is("true"));
-
- // Search data
- Awaitility.await().pollInterval(50, TimeUnit.MILLISECONDS).atMost(10, TimeUnit.SECONDS).until(() -> {
- String hits = RestAssured.given()
- .queryParam("component", component)
- .queryParam("indexName", indexName)
- .queryParam("indexKey", indexKey)
- .body("Sub Atomic,Super Fast")
- .get("/elasticsearch-rest/search/multi")
- .then()
- .statusCode(200)
- .extract()
- .body()
- .asString();
- return hits.equals("2");
- });
- }
-
- @SuppressWarnings("unused")
- private static String[] componentNames() {
- return new String[] { "elasticsearch-rest", "elasticsearch-rest-quarkus" };
- }
-}
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index e0533275ca..d2c50fdddf 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -87,7 +87,6 @@
<module>digitalocean</module>
<module>disruptor</module>
<module>dropbox</module>
- <!--<module>elasticsearch-rest</module>-->
<module>exec</module>
<module>fhir</module>
<module>file</module>
[camel-quarkus] 02/05: Introduce Elasticsearch JVM extension
Posted by zb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zbendhiba pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 40968c3583b9cb9b0e2618d5c23f5aca7cfd36bc
Author: Zineb Bendhiba <be...@gmail.com>
AuthorDate: Thu Mar 23 18:00:18 2023 +0100
Introduce Elasticsearch JVM extension
---
.../ROOT/examples/components/elasticsearch.yml | 13 +++
docs/modules/ROOT/nav.adoc | 1 +
.../pages/reference/extensions/elasticsearch.adoc | 41 +++++++++
extensions-jvm/elasticsearch/deployment/pom.xml | 63 +++++++++++++
.../deployment/ElasticsearchProcessor.java | 46 ++++++++++
extensions-jvm/elasticsearch/pom.xml | 39 ++++++++
extensions-jvm/elasticsearch/runtime/pom.xml | 100 +++++++++++++++++++++
.../main/resources/META-INF/quarkus-extension.yaml | 33 +++++++
extensions-jvm/pom.xml | 1 +
integration-tests-jvm/elasticsearch/pom.xml | 57 ++++++++++++
integration-tests-jvm/pom.xml | 1 +
poms/bom/pom.xml | 25 ++++++
poms/bom/src/main/generated/flattened-full-pom.xml | 25 ++++++
.../src/main/generated/flattened-reduced-pom.xml | 25 ++++++
.../generated/flattened-reduced-verbose-pom.xml | 25 ++++++
15 files changed, 495 insertions(+)
diff --git a/docs/modules/ROOT/examples/components/elasticsearch.yml b/docs/modules/ROOT/examples/components/elasticsearch.yml
new file mode 100644
index 0000000000..1d1ac8cc44
--- /dev/null
+++ b/docs/modules/ROOT/examples/components/elasticsearch.yml
@@ -0,0 +1,13 @@
+# Do not edit directly!
+# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+cqArtifactId: camel-quarkus-elasticsearch
+cqArtifactIdBase: elasticsearch
+cqNativeSupported: false
+cqStatus: Preview
+cqDeprecated: false
+cqJvmSince: 3.0.0
+cqNativeSince: n/a
+cqCamelPartName: elasticsearch
+cqCamelPartTitle: Elasticsearch
+cqCamelPartDescription: Send requests to ElasticSearch via Java Client API.
+cqExtensionPageTitle: Elasticsearch
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index fb514cc6fa..b543008ca8 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -112,6 +112,7 @@
*** xref:reference/extensions/drill.adoc[Drill]
*** xref:reference/extensions/dropbox.adoc[Dropbox]
*** xref:reference/extensions/ehcache.adoc[Ehcache]
+*** xref:reference/extensions/elasticsearch.adoc[Elasticsearch]
*** xref:reference/extensions/etcd3.adoc[Etcd3]
*** xref:reference/extensions/exec.adoc[Exec]
*** xref:reference/extensions/fhir.adoc[FHIR]
diff --git a/docs/modules/ROOT/pages/reference/extensions/elasticsearch.adoc b/docs/modules/ROOT/pages/reference/extensions/elasticsearch.adoc
new file mode 100644
index 0000000000..cb34a745f3
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/elasticsearch.adoc
@@ -0,0 +1,41 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+[id="extensions-elasticsearch"]
+= Elasticsearch
+:linkattrs:
+:cq-artifact-id: camel-quarkus-elasticsearch
+:cq-native-supported: false
+:cq-status: Preview
+:cq-status-deprecation: Preview
+:cq-description: Send requests to ElasticSearch via Java Client API.
+:cq-deprecated: false
+:cq-jvm-since: 3.0.0
+:cq-native-since: n/a
+
+ifeval::[{doc-show-badges} == true]
+[.badges]
+[.badge-key]##JVM since##[.badge-supported]##3.0.0## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+endif::[]
+
+Send requests to ElasticSearch via Java Client API.
+
+[id="extensions-elasticsearch-whats-inside"]
+== What's inside
+
+* xref:{cq-camel-components}::elasticsearch-component.adoc[Elasticsearch component], URI syntax: `elasticsearch:clusterName`
+
+Please refer to the above link for usage and configuration details.
+
+[id="extensions-elasticsearch-maven-coordinates"]
+== Maven coordinates
+
+[source,xml]
+----
+<dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-elasticsearch</artifactId>
+</dependency>
+----
+ifeval::[{doc-show-user-guide-link} == true]
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
+endif::[]
diff --git a/extensions-jvm/elasticsearch/deployment/pom.xml b/extensions-jvm/elasticsearch/deployment/pom.xml
new file mode 100644
index 0000000000..2727c3dd85
--- /dev/null
+++ b/extensions-jvm/elasticsearch/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-elasticsearch-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-elasticsearch-deployment</artifactId>
+ <name>Camel Quarkus :: Elasticsearch :: 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-elasticsearch</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/elasticsearch/deployment/src/main/java/org/apache/camel/quarkus/component/elasticsearch/deployment/ElasticsearchProcessor.java b/extensions-jvm/elasticsearch/deployment/src/main/java/org/apache/camel/quarkus/component/elasticsearch/deployment/ElasticsearchProcessor.java
new file mode 100644
index 0000000000..56a568387e
--- /dev/null
+++ b/extensions-jvm/elasticsearch/deployment/src/main/java/org/apache/camel/quarkus/component/elasticsearch/deployment/ElasticsearchProcessor.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.elasticsearch.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 ElasticsearchProcessor {
+
+ private static final Logger LOG = Logger.getLogger(ElasticsearchProcessor.class);
+ private static final String FEATURE = "camel-elasticsearch";
+
+ @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/elasticsearch/pom.xml b/extensions-jvm/elasticsearch/pom.xml
new file mode 100644
index 0000000000..f89d4801f1
--- /dev/null
+++ b/extensions-jvm/elasticsearch/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-extensions-jvm</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-elasticsearch-parent</artifactId>
+ <name>Camel Quarkus :: Elasticsearch</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>deployment</module>
+ <module>runtime</module>
+ </modules>
+</project>
diff --git a/extensions-jvm/elasticsearch/runtime/pom.xml b/extensions-jvm/elasticsearch/runtime/pom.xml
new file mode 100644
index 0000000000..5d2405d4ad
--- /dev/null
+++ b/extensions-jvm/elasticsearch/runtime/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-elasticsearch-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-elasticsearch</artifactId>
+ <name>Camel Quarkus :: Elasticsearch :: Runtime</name>
+ <description>Send requests to ElasticSearch via Java Client API.</description>
+
+ <properties>
+ <camel.quarkus.jvmSince>3.0.0</camel.quarkus.jvmSince>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-elasticsearch</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-processor</artifactId>
+ <version>${quarkus.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
+ <profiles>
+ <profile>
+ <id>full</id>
+ <activation>
+ <property>
+ <name>!quickly</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>update-extension-doc-page</id>
+ <goals>
+ <goal>update-extension-doc-page</goal>
+ </goals>
+ <phase>process-classes</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/extensions-jvm/elasticsearch/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/elasticsearch/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000000..1223c3c656
--- /dev/null
+++ b/extensions-jvm/elasticsearch/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,33 @@
+#
+# 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 Elasticsearch"
+description: "Send requests to ElasticSearch via Java Client API"
+icon-url: "https://camel.apache.org/_/img/logo-d-f21b25ba38.svg"
+metadata:
+ unlisted: true
+ guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/elasticsearch.html"
+ categories:
+ - "integration"
+ status:
+ - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 96d70f65a1..d0ace3b3b3 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -59,6 +59,7 @@
<module>drill</module>
<module>dsl-modeline</module>
<module>ehcache</module>
+ <module>elasticsearch</module>
<module>etcd3</module>
<module>facebook</module>
<module>fastjson</module>
diff --git a/integration-tests-jvm/elasticsearch/pom.xml b/integration-tests-jvm/elasticsearch/pom.xml
new file mode 100644
index 0000000000..7cc1765242
--- /dev/null
+++ b/integration-tests-jvm/elasticsearch/pom.xml
@@ -0,0 +1,57 @@
+<?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>3.0.0-SNAPSHOT</version>
+ <relativePath>../../poms/build-parent-it/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-elasticsearch</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: Elasticsearch</name>
+ <description>Integration tests for Camel Quarkus Elasticsearch extension</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-elasticsearch</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>
+</project>
diff --git a/integration-tests-jvm/pom.xml b/integration-tests-jvm/pom.xml
index f7ceea358f..5a525f7110 100644
--- a/integration-tests-jvm/pom.xml
+++ b/integration-tests-jvm/pom.xml
@@ -58,6 +58,7 @@
<module>drill</module>
<module>dsl-modeline</module>
<module>ehcache</module>
+ <module>elasticsearch</module>
<module>etcd3</module>
<module>facebook</module>
<module>fastjson</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 8841adc258..aa5abd189b 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -899,6 +899,21 @@
<artifactId>camel-ehcache</artifactId>
<version>${camel.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-elasticsearch</artifactId>
+ <version>${camel.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-endpointdsl</artifactId>
@@ -3448,6 +3463,16 @@
<artifactId>camel-quarkus-ehcache-deployment</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-elasticsearch</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-elasticsearch-deployment</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-etcd3</artifactId>
diff --git a/poms/bom/src/main/generated/flattened-full-pom.xml b/poms/bom/src/main/generated/flattened-full-pom.xml
index 4b0356751e..1385c3209b 100644
--- a/poms/bom/src/main/generated/flattened-full-pom.xml
+++ b/poms/bom/src/main/generated/flattened-full-pom.xml
@@ -837,6 +837,21 @@
<artifactId>camel-ehcache</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>4.0.0-M2</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-elasticsearch</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>4.0.0-M2</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.code.findbugs</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>jsr305</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>commons-logging</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-endpointdsl</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
@@ -3359,6 +3374,16 @@
<artifactId>camel-quarkus-ehcache-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>3.0.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-elasticsearch</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.0.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-elasticsearch-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.0.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-quarkus-etcd3</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
diff --git a/poms/bom/src/main/generated/flattened-reduced-pom.xml b/poms/bom/src/main/generated/flattened-reduced-pom.xml
index 79f56b7822..2dd8a67ea5 100644
--- a/poms/bom/src/main/generated/flattened-reduced-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-pom.xml
@@ -837,6 +837,21 @@
<artifactId>camel-ehcache</artifactId>
<version>4.0.0-M2</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-elasticsearch</artifactId>
+ <version>4.0.0-M2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-endpointdsl</artifactId>
@@ -3359,6 +3374,16 @@
<artifactId>camel-quarkus-ehcache-deployment</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-elasticsearch</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-elasticsearch-deployment</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-etcd3</artifactId>
diff --git a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
index ad78c7c3e7..c286f7d51d 100644
--- a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
@@ -837,6 +837,21 @@
<artifactId>camel-ehcache</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>4.0.0-M2</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-elasticsearch</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>4.0.0-M2</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.code.findbugs</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>jsr305</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>commons-logging</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-endpointdsl</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
@@ -3359,6 +3374,16 @@
<artifactId>camel-quarkus-ehcache-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>3.0.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-elasticsearch</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.0.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-elasticsearch-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.0.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-quarkus-etcd3</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
[camel-quarkus] 05/05: Update alternative extensions for Dozer and Elacticsearch-rest
Posted by zb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zbendhiba pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit c0c95ca486df606765b7ec28bc7749d1e348ccde
Author: Zineb Bendhiba <be...@gmail.com>
AuthorDate: Fri Mar 24 12:01:56 2023 +0100
Update alternative extensions for Dozer and Elacticsearch-rest
---
docs/modules/ROOT/pages/migration-guide/3.0.0.adoc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/modules/ROOT/pages/migration-guide/3.0.0.adoc b/docs/modules/ROOT/pages/migration-guide/3.0.0.adoc
index 0d44937fcb..b1050bd89f 100644
--- a/docs/modules/ROOT/pages/migration-guide/3.0.0.adoc
+++ b/docs/modules/ROOT/pages/migration-guide/3.0.0.adoc
@@ -21,8 +21,8 @@ The following extensions have been removed.
| camel-quarkus-atmos | none
| camel-quarkus-avro-rpc | none
| camel-quarkus-caffeine-lrucache | camel-quarkus-ignite, camel-quarkus-infinispan
-| camel-quarkus-dozer | none
-| camel-quarkus-elasticsearch-rest | Coming camel-quarkus-elasticsearch
+| camel-quarkus-dozer | camel-quarkus-mapstruct
+| camel-quarkus-elasticsearch-rest | camel-quarkus-elasticsearch
| camel-quarkus-hbase | none
| camel-quarkus-iota | none
| camel-quarkus-jbpm | none
[camel-quarkus] 03/05: Drop Dozer extension
Posted by zb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zbendhiba pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 88743158e2a6bb240ad51618978b5604a04c32c1
Author: Zineb Bendhiba <be...@gmail.com>
AuthorDate: Fri Mar 24 11:00:16 2023 +0100
Drop Dozer extension
---
extensions/dozer/deployment/pom.xml | 65 --------
.../component/dozer/deployment/DozerProcessor.java | 175 ---------------------
extensions/dozer/pom.xml | 37 -----
extensions/dozer/runtime/pom.xml | 118 --------------
.../dozer/runtime/src/main/doc/configuration.adoc | 23 ---
.../quarkus/component/dozer/CamelDozerConfig.java | 41 -----
.../component/dozer/CamelDozerRecorder.java | 40 -----
.../dozer/graal/DozerOSGiSubstitutions.java | 113 -------------
.../main/resources/META-INF/quarkus-extension.yaml | 32 ----
extensions/pom.xml | 1 -
integration-tests/dozer/pom.xml | 132 ----------------
.../quarkus/component/dozer/it/DozerResource.java | 79 ----------
.../quarkus/component/dozer/it/DozerRoutes.java | 37 -----
.../component/dozer/it/model/CustomerA.java | 115 --------------
.../component/dozer/it/model/CustomerB.java | 166 -------------------
.../src/main/resources/application.properties | 24 ---
.../src/main/resources/expression-mapping.xml | 35 -----
.../dozer/src/main/resources/simple-mapping.xml | 40 -----
.../dozer/src/main/resources/variable-mapping.xml | 42 -----
.../camel/quarkus/component/dozer/it/DozerIT.java | 24 ---
.../quarkus/component/dozer/it/DozerTest.java | 74 ---------
integration-tests/pom.xml | 1 -
22 files changed, 1414 deletions(-)
diff --git a/extensions/dozer/deployment/pom.xml b/extensions/dozer/deployment/pom.xml
deleted file mode 100644
index 45a3de248d..0000000000
--- a/extensions/dozer/deployment/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?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-dozer-parent</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>camel-quarkus-dozer-deployment</artifactId>
- <name>Camel Quarkus :: Dozer :: Deployment</name>
-
- <dependencies>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-jaxb-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-dozer</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/dozer/deployment/src/main/java/org/apache/camel/quarkus/component/dozer/deployment/DozerProcessor.java b/extensions/dozer/deployment/src/main/java/org/apache/camel/quarkus/component/dozer/deployment/DozerProcessor.java
deleted file mode 100644
index f0b529fadc..0000000000
--- a/extensions/dozer/deployment/src/main/java/org/apache/camel/quarkus/component/dozer/deployment/DozerProcessor.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.dozer.deployment;
-
-import java.io.File;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.sql.Time;
-import java.sql.Timestamp;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Date;
-
-import com.github.dozermapper.core.DozerBeanMapperBuilder;
-import com.github.dozermapper.core.Mapper;
-import com.sun.el.ExpressionFactoryImpl;
-import io.quarkus.deployment.annotations.BuildProducer;
-import io.quarkus.deployment.annotations.BuildStep;
-import io.quarkus.deployment.annotations.ExecutionTime;
-import io.quarkus.deployment.annotations.Record;
-import io.quarkus.deployment.builditem.AdditionalApplicationArchiveMarkerBuildItem;
-import io.quarkus.deployment.builditem.FeatureBuildItem;
-import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
-import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import io.quarkus.jaxb.deployment.JaxbFileRootBuildItem;
-import org.apache.camel.converter.dozer.DozerBeanMapperConfiguration;
-import org.apache.camel.converter.dozer.DozerThreadContextClassLoader;
-import org.apache.camel.quarkus.component.dozer.CamelDozerConfig;
-import org.apache.camel.quarkus.component.dozer.CamelDozerRecorder;
-import org.apache.camel.quarkus.core.deployment.spi.CamelBeanBuildItem;
-import org.apache.camel.quarkus.core.deployment.spi.CamelContextBuildItem;
-
-class DozerProcessor {
-
- private static final String FEATURE = "camel-dozer";
-
- @BuildStep
- FeatureBuildItem feature() {
- return new FeatureBuildItem(FEATURE);
- }
-
- @BuildStep
- JaxbFileRootBuildItem dozerJaxbFileRoot() {
- return new JaxbFileRootBuildItem("com/github/dozermapper/core/builder/model/jaxb");
- }
-
- @BuildStep
- AdditionalApplicationArchiveMarkerBuildItem dozerArchiveMarker() {
- return new AdditionalApplicationArchiveMarkerBuildItem("com/github/dozermapper/core");
- }
-
- @BuildStep
- void configureCamelDozer(BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
- BuildProducer<NativeImageResourceBuildItem> nativeImage,
- CamelDozerConfig camelDozerConfig) {
-
- // Add user Dozer mapping files to the image
- camelDozerConfig.mappingFiles.orElse(Collections.emptyList())
- .stream()
- .map(this::mappingPathToURI)
- // No scheme means classpath URI
- .filter(uri -> uri.getScheme() == null)
- .map(uri -> new NativeImageResourceBuildItem(uri.getPath()))
- .forEach(nativeImage::produce);
-
- // Add Dozer DTD & XSD resources to the image
- nativeImage.produce(new NativeImageResourceBuildItem(
- "dtd/bean-mapping.dtd",
- "dtd/bean-mapping-6.0.0.dtd",
- "dtd/bean-mapping-6.2.0.dtd",
- "schema/bean-mapping.xsd",
- "schema/bean-mapping-6.0.0.xsd",
- "schema/bean-mapping-6.2.0.xsd"));
-
- reflectiveClass.produce(new ReflectiveClassBuildItem(false, false,
- BigDecimal[].class,
- BigInteger[].class,
- Boolean[].class,
- Byte[].class,
- Calendar[].class,
- Character[].class,
- Class[].class,
- Date[].class,
- java.sql.Date[].class,
- Double[].class,
- File[].class,
- Float[].class,
- Integer[].class,
- Long[].class,
- Object[].class,
- Short[].class,
- String[].class,
- Time[].class,
- Timestamp[].class,
- URL[].class,
- Date.class,
- File.class,
- URL.class,
- DozerThreadContextClassLoader.class,
- ExpressionFactoryImpl.class));
-
- reflectiveClass.produce(new ReflectiveClassBuildItem(
- true,
- false,
- DozerBeanMapperConfiguration.class));
-
- if (camelDozerConfig.mappingFiles.isPresent()) {
- // Register for reflection any classes participating in Dozer mapping
- Mapper mapper = DozerBeanMapperBuilder.create()
- .withClassLoader(Thread.currentThread().getContextClassLoader())
- .withMappingFiles(camelDozerConfig.mappingFiles.get())
- .build();
-
- mapper.getMappingMetadata()
- .getClassMappings()
- .stream()
- .map(metadata -> new ReflectiveClassBuildItem(true, false, metadata.getSourceClassName(),
- metadata.getDestinationClassName()))
- .forEach(reflectiveClass::produce);
- }
- }
-
- @Record(ExecutionTime.STATIC_INIT)
- @BuildStep
- CamelBeanBuildItem configureCamelDozerBeanMappings(CamelDozerConfig camelDozerConfig,
- CamelDozerRecorder camelDozerRecorder) {
-
- CamelBeanBuildItem camelBeanBuildItem = null;
-
- if (camelDozerConfig.mappingFiles.isPresent()) {
- // Bind DozerBeanMapperConfiguration to the Camel registry for the user provided Dozer mapping files
- camelBeanBuildItem = new CamelBeanBuildItem(
- "dozerBeanMappingConfiguration",
- DozerBeanMapperConfiguration.class.getName(),
- camelDozerRecorder.createDozerBeanMapperConfiguration(camelDozerConfig.mappingFiles.get()));
- }
-
- return camelBeanBuildItem;
- }
-
- @Record(ExecutionTime.STATIC_INIT)
- @BuildStep
- void configureDozerTypeConverterRegistry(CamelContextBuildItem camelContextBuildItem, CamelDozerConfig camelDozerConfig,
- CamelDozerRecorder camelDozerRecorder) {
-
- if (camelDozerConfig.typeConverterEnabled) {
- camelDozerRecorder.initializeDozerTypeConverter(camelContextBuildItem.getCamelContext());
- }
- }
-
- private URI mappingPathToURI(String mappingPath) {
- try {
- return new URI(mappingPath);
- } catch (URISyntaxException e) {
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/extensions/dozer/pom.xml b/extensions/dozer/pom.xml
deleted file mode 100644
index d6e99c2a96..0000000000
--- a/extensions/dozer/pom.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-extensions</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>camel-quarkus-dozer-parent</artifactId>
- <name>Camel Quarkus :: Dozer</name>
- <packaging>pom</packaging>
-
- <modules>
- <module>deployment</module>
- <module>runtime</module>
- </modules>
-</project>
diff --git a/extensions/dozer/runtime/pom.xml b/extensions/dozer/runtime/pom.xml
deleted file mode 100644
index 21f9c946dc..0000000000
--- a/extensions/dozer/runtime/pom.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?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-dozer-parent</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>camel-quarkus-dozer</artifactId>
- <name>Camel Quarkus :: Dozer :: Runtime</name>
-
- <properties>
- <camel.quarkus.jvmSince>1.0.0</camel.quarkus.jvmSince>
- <camel.quarkus.nativeSince>1.0.0</camel.quarkus.nativeSince>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-dozer</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>commons-logging-jboss-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-jaxb</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.angus</groupId>
- <artifactId>angus-activation</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>jakarta.el</artifactId>
- </dependency>
- <dependency>
- <groupId>org.graalvm.nativeimage</groupId>
- <artifactId>svm</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-extension-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <annotationProcessorPaths>
- <path>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-extension-processor</artifactId>
- <version>${quarkus.version}</version>
- </path>
- </annotationProcessorPaths>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>full</id>
- <activation>
- <property>
- <name>!quickly</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>update-extension-doc-page</id>
- <goals>
- <goal>update-extension-doc-page</goal>
- </goals>
- <phase>process-classes</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/extensions/dozer/runtime/src/main/doc/configuration.adoc b/extensions/dozer/runtime/src/main/doc/configuration.adoc
deleted file mode 100644
index 95a69806e2..0000000000
--- a/extensions/dozer/runtime/src/main/doc/configuration.adoc
+++ /dev/null
@@ -1,23 +0,0 @@
-The Dozer extension can automatically register a `DozerBeanMapperConfiguration` bean with the Camel registry which references your mapping files.
-
-Use the following configuration property to specify the location(s) of your Dozer mapping configuration files.
-
-[source,properties]
-----
-quarkus.camel.dozer.mapping-files = dozerMappings.xml,file:foo/bar/custom-mappings.xml,http://foo/bar/mapping.xml
-----
-
-The Dozer extension provides a type converter which can leverage your mapping configuration(s) to convert and map a message body
-from one type to another. For example.
-
-[source,java]
-----
-from("direct:oldCustomerTypeIn").convertBodyTo(NewCustomerType.class);
-----
-
-It is disabled by default but can be enabled with the following configuration property.
-
-[source,properties]
-----
-quarkus.camel.dozer.type-converter-enabled = true
-----
diff --git a/extensions/dozer/runtime/src/main/java/org/apache/camel/quarkus/component/dozer/CamelDozerConfig.java b/extensions/dozer/runtime/src/main/java/org/apache/camel/quarkus/component/dozer/CamelDozerConfig.java
deleted file mode 100644
index 174a29d9b4..0000000000
--- a/extensions/dozer/runtime/src/main/java/org/apache/camel/quarkus/component/dozer/CamelDozerConfig.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.dozer;
-
-import java.util.List;
-import java.util.Optional;
-
-import io.quarkus.runtime.annotations.ConfigItem;
-import io.quarkus.runtime.annotations.ConfigPhase;
-import io.quarkus.runtime.annotations.ConfigRoot;
-
-@ConfigRoot(name = "camel.dozer", phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
-public class CamelDozerConfig {
-
- /**
- * A comma separated list of Dozer XML mapping configuration file URIs.
- */
- @ConfigItem
- public Optional<List<String>> mappingFiles;
-
- /**
- * Sets whether to configure the DozerTypeConverter for the CamelContext
- */
- @ConfigItem(defaultValue = "false")
- @Deprecated(forRemoval = true, since = "2.11.0")
- public boolean typeConverterEnabled;
-}
diff --git a/extensions/dozer/runtime/src/main/java/org/apache/camel/quarkus/component/dozer/CamelDozerRecorder.java b/extensions/dozer/runtime/src/main/java/org/apache/camel/quarkus/component/dozer/CamelDozerRecorder.java
deleted file mode 100644
index e7e0fa4252..0000000000
--- a/extensions/dozer/runtime/src/main/java/org/apache/camel/quarkus/component/dozer/CamelDozerRecorder.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.dozer;
-
-import java.util.List;
-
-import io.quarkus.runtime.RuntimeValue;
-import io.quarkus.runtime.annotations.Recorder;
-import org.apache.camel.CamelContext;
-import org.apache.camel.converter.dozer.DozerBeanMapperConfiguration;
-import org.apache.camel.converter.dozer.DozerTypeConverterLoader;
-
-@Recorder
-public class CamelDozerRecorder {
-
- public RuntimeValue<DozerBeanMapperConfiguration> createDozerBeanMapperConfiguration(List<String> mappingFiles) {
- DozerBeanMapperConfiguration dozerBeanMapperConfiguration = new DozerBeanMapperConfiguration();
- dozerBeanMapperConfiguration.setMappingFiles(mappingFiles);
- return new RuntimeValue<>(dozerBeanMapperConfiguration);
- }
-
- public void initializeDozerTypeConverter(RuntimeValue<CamelContext> camelContextRuntimeValue) {
- DozerTypeConverterLoader loader = new DozerTypeConverterLoader();
- loader.setCamelContext(camelContextRuntimeValue.getValue());
- }
-}
diff --git a/extensions/dozer/runtime/src/main/java/org/apache/camel/quarkus/component/dozer/graal/DozerOSGiSubstitutions.java b/extensions/dozer/runtime/src/main/java/org/apache/camel/quarkus/component/dozer/graal/DozerOSGiSubstitutions.java
deleted file mode 100644
index 4e88f3b20f..0000000000
--- a/extensions/dozer/runtime/src/main/java/org/apache/camel/quarkus/component/dozer/graal/DozerOSGiSubstitutions.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.dozer.graal;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import com.github.dozermapper.core.DozerBeanMapperBuilder;
-import com.github.dozermapper.core.builder.xml.SchemaLSResourceResolver;
-import com.github.dozermapper.core.config.BeanContainer;
-import com.github.dozermapper.core.util.DefaultClassLoader;
-import com.github.dozermapper.core.util.DozerClassLoader;
-import com.github.dozermapper.core.util.RuntimeUtils;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.Substitute;
-import com.oracle.svm.core.annotate.TargetClass;
-
-final class DozerOSGiSubstitutions {
-
-}
-
-@TargetClass(RuntimeUtils.class)
-final class SubstituteRuntimeUtils {
-
- @Substitute
- public static boolean isOSGi() {
- return false;
- }
-}
-
-@TargetClass(DozerBeanMapperBuilder.class)
-final class SubstituteDozerBeanMapperBuilder {
-
- @Alias
- private DozerClassLoader fluentDefinedClassLoader;
-
- @Substitute
- private DozerClassLoader getClassLoader() {
- // Substituted method impl without unwanted references to OSGiClassLoader
- if (fluentDefinedClassLoader == null) {
- return new DefaultClassLoader(DozerBeanMapperBuilder.class.getClassLoader());
- } else {
- return fluentDefinedClassLoader;
- }
- }
-}
-
-@TargetClass(SchemaLSResourceResolver.class)
-final class SubstituteSchemaLSResourceResolver {
-
- @Alias
- private BeanContainer beanContainer;
-
- @Substitute
- private InputStream resolveFromClassPath(String systemId) throws IOException, URISyntaxException {
- // Substituted method impl without unwanted references to OSGi Bundle & Activator
-
- InputStream source;
-
- String xsdPath;
- URI uri = new URI(systemId);
- if (uri.getScheme().equalsIgnoreCase("file")) {
- xsdPath = uri.toString();
- } else {
- xsdPath = uri.getPath();
- if (xsdPath.charAt(0) == '/') {
- xsdPath = xsdPath.substring(1);
- }
- }
-
- ClassLoader localClassLoader = getClass().getClassLoader();
-
- //Attempt to find within this JAR
- URL url = localClassLoader.getResource(xsdPath);
- if (url == null) {
- //Attempt to find via user defined class loader
- DozerClassLoader dozerClassLoader = beanContainer.getClassLoader();
-
- url = dozerClassLoader.loadResource(xsdPath);
- }
-
- if (url == null) {
- throw new IOException(
- "Could not resolve bean-mapping XML Schema [" + systemId + "]: not found in classpath; " + xsdPath);
- }
-
- try {
- source = url.openStream();
- } catch (IOException ex) {
- throw new IOException(
- "Could not resolve bean-mapping XML Schema [" + systemId + "]: not found in classpath; " + xsdPath, ex);
- }
-
- return source;
- }
-}
diff --git a/extensions/dozer/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/dozer/runtime/src/main/resources/META-INF/quarkus-extension.yaml
deleted file mode 100644
index e88faf4f04..0000000000
--- a/extensions/dozer/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# 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 Dozer"
-description: "Map between Java beans using the Dozer mapping library"
-metadata:
- guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/dozer.html"
- categories:
- - "integration"
- status:
- - "stable"
- - "deprecated"
\ No newline at end of file
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 1e963e7a37..c062d82b6a 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -94,7 +94,6 @@
<module>digitalocean</module>
<module>direct</module>
<module>disruptor</module>
- <!--<module>dozer</module> https://github.com/apache/camel-quarkus/issues/4477 -->
<module>dropbox</module>
<!--<module>elasticsearch-rest</module> https://github.com/apache/camel-quarkus/issues/4477 -->
<module>exec</module>
diff --git a/integration-tests/dozer/pom.xml b/integration-tests/dozer/pom.xml
deleted file mode 100644
index fc28634a1d..0000000000
--- a/integration-tests/dozer/pom.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?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>3.0.0-SNAPSHOT</version>
- <relativePath>../../poms/build-parent-it/pom.xml</relativePath>
- </parent>
-
- <artifactId>camel-quarkus-integration-test-dozer</artifactId>
- <name>Camel Quarkus :: Integration Tests :: Dozer</name>
- <description>Integration tests for Camel Quarkus Dozer extension</description>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-dozer</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-direct</artifactId>
- </dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-resteasy</artifactId>
- </dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-resteasy-jsonb</artifactId>
- </dependency>
-
- <!-- test dependencies -->
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>io.rest-assured</groupId>
- <artifactId>rest-assured</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-
- <profiles>
- <profile>
- <id>native</id>
- <activation>
- <property>
- <name>native</name>
- </property>
- </activation>
- <properties>
- <quarkus.package.type>native</quarkus.package.type>
- </properties>
- <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>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>virtualDependencies</id>
- <activation>
- <property>
- <name>!noVirtualDependencies</name>
- </property>
- </activation>
- <dependencies>
- <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-direct-deployment</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-dozer-deployment</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>*</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
-</project>
diff --git a/integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/DozerResource.java b/integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/DozerResource.java
deleted file mode 100644
index 4d08729512..0000000000
--- a/integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/DozerResource.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.dozer.it;
-
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.HashMap;
-import java.util.Map;
-
-import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.inject.Inject;
-import jakarta.ws.rs.GET;
-import jakarta.ws.rs.Path;
-import jakarta.ws.rs.Produces;
-import jakarta.ws.rs.core.MediaType;
-
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.quarkus.component.dozer.it.model.CustomerA;
-import org.apache.camel.quarkus.component.dozer.it.model.CustomerB;
-
-@Path("/dozer")
-@ApplicationScoped
-public class DozerResource {
-
- @Inject
- ProducerTemplate producerTemplate;
-
- @Path("/map")
- @GET
- @Produces(MediaType.APPLICATION_JSON)
- public CustomerB dozerMap() {
- CustomerB cb = producerTemplate.requestBody("direct:mapWithEndpoint", createCustomerA(), CustomerB.class);
- cb.setInternalsAsString();
- return cb;
- }
-
- @Path("/map/using/converter")
- @GET
- @Produces(MediaType.APPLICATION_JSON)
- public CustomerB dozerMapWithConverter() {
- return producerTemplate.requestBody("direct:mapWithConverter", createCustomerA(), CustomerB.class);
- }
-
- @Path("/map/using/variable")
- @GET
- @Produces(MediaType.APPLICATION_JSON)
- public CustomerB dozerMapWithVariable() {
- return producerTemplate.requestBody("direct:mapWithVariable", createCustomerA(), CustomerB.class);
- }
-
- @Path("/map/using/expression")
- @GET
- @Produces(MediaType.APPLICATION_JSON)
- public CustomerB dozerMapWithExpression() {
- Map<String, Object> headers = new HashMap<>();
- headers.put("firstName", "Camel");
- headers.put("lastName", "Quarkus");
- return producerTemplate.requestBodyAndHeaders("direct:mapWithExpression", createCustomerA(), headers, CustomerB.class);
- }
-
- private CustomerA createCustomerA() {
- return new CustomerA("Peter", "Post", "Camel Street", "12345",
- new GregorianCalendar(1990, Calendar.DECEMBER, 15).getTime());
- }
-}
diff --git a/integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/DozerRoutes.java b/integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/DozerRoutes.java
deleted file mode 100644
index 28bd1ac583..0000000000
--- a/integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/DozerRoutes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.dozer.it;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.quarkus.component.dozer.it.model.CustomerB;
-
-public class DozerRoutes extends RouteBuilder {
-
- @Override
- public void configure() throws Exception {
- from("direct:mapWithConverter").convertBodyTo(CustomerB.class);
-
- from("direct:mapWithEndpoint")
- .to("dozer:simpleMapping?mappingFile=simple-mapping.xml&targetModel=org.apache.camel.quarkus.component.dozer.it.model.CustomerB");
-
- from("direct:mapWithVariable")
- .to("dozer:variableMapping?mappingFile=variable-mapping.xml&targetModel=org.apache.camel.quarkus.component.dozer.it.model.CustomerB");
-
- from("direct:mapWithExpression")
- .to("dozer:expressionMapping?mappingFile=expression-mapping.xml&targetModel=org.apache.camel.quarkus.component.dozer.it.model.CustomerB");
- }
-}
diff --git a/integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/model/CustomerA.java b/integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/model/CustomerA.java
deleted file mode 100644
index 664e3d16c4..0000000000
--- a/integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/model/CustomerA.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.dozer.it.model;
-
-import java.util.Date;
-
-public class CustomerA {
-
- private String firstName;
- private String lastName;
- private String street;
- private String zip;
- private Date joined;
- private String internalUrl = "http://customer";
- private String internalFile = "/test";
- private String internalClass = "java.lang.String";
- private String internal = "internal";
-
- public CustomerA() {
- }
-
- public CustomerA(String firstName, String lastName, String street, String zip, Date joined) {
- this.firstName = firstName;
- this.lastName = lastName;
- this.street = street;
- this.zip = zip;
- this.joined = joined;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- public String getStreet() {
- return street;
- }
-
- public void setStreet(String street) {
- this.street = street;
- }
-
- public String getZip() {
- return zip;
- }
-
- public void setZip(String zip) {
- this.zip = zip;
- }
-
- public Date getJoined() {
- return joined;
- }
-
- public void setJoined(Date joined) {
- this.joined = joined;
- }
-
- public String getInternalUrl() {
- return internalUrl;
- }
-
- public void setInternalUrl(String internalUrl) {
- this.internalUrl = internalUrl;
- }
-
- public String getInternalFile() {
- return internalFile;
- }
-
- public void setInternalFile(String internalFile) {
- this.internalFile = internalFile;
- }
-
- public String getInternalClass() {
- return internalClass;
- }
-
- public void setInternalClass(String internalClass) {
- this.internalClass = internalClass;
- }
-
- public String getInternal() {
- return internal;
- }
-
- public void setInternal(String internal) {
- this.internal = internal;
- }
-}
diff --git a/integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/model/CustomerB.java b/integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/model/CustomerB.java
deleted file mode 100644
index 89dd1bb7e4..0000000000
--- a/integration-tests/dozer/src/main/java/org/apache/camel/quarkus/component/dozer/it/model/CustomerB.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.dozer.it.model;
-
-import java.io.File;
-import java.net.URL;
-import java.util.Date;
-
-public class CustomerB {
-
- private String firstName;
- private String lastName;
- private Address address;
- private Date created;
- private URL internalUrl;
- private File internalFile;
- private String internalFileAsString;
- private Class internalClass;
- private String internalClassAsString;
- private Custom internal;
-
- public CustomerB() {
- }
-
- public CustomerB(String firstName, String lastName, Address address) {
- this.firstName = firstName;
- this.lastName = lastName;
- this.address = address;
- }
-
- public void setInternalsAsString() {
- if (internalClass != null) {
- internalClassAsString = internalClass.getCanonicalName();
- }
- if (internalFile != null) {
- internalFileAsString = internalFile.toString();
- }
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- public Address getAddress() {
- return address;
- }
-
- public void setAddress(Address address) {
- this.address = address;
- }
-
- public Date getCreated() {
- return created;
- }
-
- public void setCreated(Date created) {
- this.created = created;
- }
-
- public URL getInternalUrl() {
- return internalUrl;
- }
-
- public void setInternalUrl(URL internalUrl) {
- this.internalUrl = internalUrl;
- }
-
- public void setInternalFile(File internalFile) {
- this.internalFile = internalFile;
- }
-
- public void setInternalClass(Class internalClass) {
- this.internalClass = internalClass;
- }
-
- public String getInternalFileAsString() {
- return internalFileAsString;
- }
-
- public String getInternalClassAsString() {
- return internalClassAsString;
- }
-
- public Custom getInternal() {
- return internal;
- }
-
- public void setInternal(Custom internal) {
- this.internal = internal;
- }
-
- public static class Address {
-
- private String street;
- private String zip;
-
- public Address() {
- }
-
- public Address(String street, String zip) {
- this.street = street;
- this.zip = zip;
- }
-
- public String getStreet() {
- return street;
- }
-
- public void setStreet(String street) {
- this.street = street;
- }
-
- public String getZip() {
- return zip;
- }
-
- public void setZip(String zip) {
- this.zip = zip;
- }
- }
-
- public static class Custom {
-
- private String text;
-
- public Custom(String text) {
- this.text = "hello " + text;
- }
-
- public String getText() {
- return text;
- }
-
- public void setText(String text) {
- this.text = text;
- }
-
- }
-
-}
diff --git a/integration-tests/dozer/src/main/resources/application.properties b/integration-tests/dozer/src/main/resources/application.properties
deleted file mode 100644
index 9540e06b4b..0000000000
--- a/integration-tests/dozer/src/main/resources/application.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-#quarkus.log.category."org.apache.camel.quarkus.core.FastFactoryFinderResolver".level = TRACE
-
-#
-# Quarkus - Camel Dozer
-#
-quarkus.camel.dozer.mapping-files=simple-mapping.xml,variable-mapping.xml,expression-mapping.xml
-quarkus.camel.dozer.type-converter-enabled=true
diff --git a/integration-tests/dozer/src/main/resources/expression-mapping.xml b/integration-tests/dozer/src/main/resources/expression-mapping.xml
deleted file mode 100644
index 3651e13126..0000000000
--- a/integration-tests/dozer/src/main/resources/expression-mapping.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
-
- <mapping>
- <class-a>org.apache.camel.component.dozer.ExpressionMapper</class-a>
- <class-b>org.apache.camel.quarkus.component.dozer.it.model.CustomerB</class-b>
- <field custom-converter-id="_expressionMapping" custom-converter-param="simple:\${header.firstName}">
- <a>expression</a>
- <b>firstName</b>
- </field>
- <field custom-converter-id="_expressionMapping" custom-converter-param="simple:\${header.lastName}">
- <a>expression</a>
- <b>lastName</b>
- </field>
- </mapping>
-
-</mappings>
diff --git a/integration-tests/dozer/src/main/resources/simple-mapping.xml b/integration-tests/dozer/src/main/resources/simple-mapping.xml
deleted file mode 100644
index d64ecf8898..0000000000
--- a/integration-tests/dozer/src/main/resources/simple-mapping.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
-
- <mapping>
- <class-a>org.apache.camel.quarkus.component.dozer.it.model.CustomerA</class-a>
- <class-b>org.apache.camel.quarkus.component.dozer.it.model.CustomerB</class-b>
- <field>
- <a>street</a>
- <b>address.street</b>
- </field>
- <field>
- <a>zip</a>
- <b>address.zip</b>
- </field>
- <field>
- <a>joined</a>
- <b>created</b>
- </field>
-
- </mapping>
-
-</mappings>
diff --git a/integration-tests/dozer/src/main/resources/variable-mapping.xml b/integration-tests/dozer/src/main/resources/variable-mapping.xml
deleted file mode 100644
index dd363a63a4..0000000000
--- a/integration-tests/dozer/src/main/resources/variable-mapping.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping http://dozermapper.github.io/schema/bean-mapping.xsd">
-
- <configuration>
- <variables>
- <variable name="FIRST_NAME">Camel</variable>
- <variable name="LAST_NAME">Quarkus</variable>
- </variables>
- </configuration>
-
- <mapping>
- <class-a>org.apache.camel.component.dozer.VariableMapper</class-a>
- <class-b>org.apache.camel.quarkus.component.dozer.it.model.CustomerB</class-b>
- <field custom-converter-id="_variableMapping" custom-converter-param="${FIRST_NAME}">
- <a>literal</a>
- <b>firstName</b>
- </field>
- <field custom-converter-id="_variableMapping" custom-converter-param="${LAST_NAME}">
- <a>literal</a>
- <b>lastName</b>
- </field>
- </mapping>
-
-</mappings>
diff --git a/integration-tests/dozer/src/test/java/org/apache/camel/quarkus/component/dozer/it/DozerIT.java b/integration-tests/dozer/src/test/java/org/apache/camel/quarkus/component/dozer/it/DozerIT.java
deleted file mode 100644
index b638f3851d..0000000000
--- a/integration-tests/dozer/src/test/java/org/apache/camel/quarkus/component/dozer/it/DozerIT.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.dozer.it;
-
-import io.quarkus.test.junit.QuarkusIntegrationTest;
-
-@QuarkusIntegrationTest
-class DozerIT extends DozerTest {
-
-}
diff --git a/integration-tests/dozer/src/test/java/org/apache/camel/quarkus/component/dozer/it/DozerTest.java b/integration-tests/dozer/src/test/java/org/apache/camel/quarkus/component/dozer/it/DozerTest.java
deleted file mode 100644
index 94512a4c11..0000000000
--- a/integration-tests/dozer/src/test/java/org/apache/camel/quarkus/component/dozer/it/DozerTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.dozer.it;
-
-import java.io.File;
-
-import io.quarkus.test.junit.QuarkusTest;
-import io.restassured.RestAssured;
-import org.junit.jupiter.api.Test;
-
-import static org.hamcrest.Matchers.containsString;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.notNullValue;
-
-@QuarkusTest
-class DozerTest {
-
- @Test
- public void testDozerTypeConverter() {
- RestAssured.get("/dozer/map/using/converter")
- .then()
- .statusCode(200)
- .body("address", notNullValue(),
- "address.zip", is("12345"),
- "address.street", is("Camel Street"));
- }
-
- @Test
- public void testDozerEndpoint() {
- RestAssured.get("/dozer/map")
- .then()
- .statusCode(200)
- .body("address", notNullValue(),
- "address.zip", is("12345"),
- "address.street", is("Camel Street"),
- "created", containsString("1990"),
- "internalFileAsString", is(File.separator + "test"),
- "internalClassAsString", is("java.lang.String"),
- "internalUrl", is("http://customer"),
- "internal.text", is("hello internal"));
- }
-
- @Test
- public void testDozerVariableMapper() {
- RestAssured.get("/dozer/map/using/variable")
- .then()
- .statusCode(200)
- .body("firstName", is("Camel"),
- "lastName", is("Quarkus"));
- }
-
- @Test
- public void testDozerExpressionMapper() {
- RestAssured.get("/dozer/map/using/expression")
- .then()
- .statusCode(200)
- .body("firstName", is("Camel"),
- "lastName", is("Quarkus"));
- }
-}
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 3c642e87ff..e0533275ca 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -86,7 +86,6 @@
<module>debezium</module>
<module>digitalocean</module>
<module>disruptor</module>
- <!--<module>dozer</module>-->
<module>dropbox</module>
<!--<module>elasticsearch-rest</module>-->
<module>exec</module>
[camel-quarkus] 01/05: Introduce mapstruct JVM extension
Posted by zb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zbendhiba pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit f724916d7b3d1f15ae7278aa8cef8cf2cc350421
Author: Zineb Bendhiba <be...@gmail.com>
AuthorDate: Thu Mar 23 17:29:29 2023 +0100
Introduce mapstruct JVM extension
---
.../modules/ROOT/examples/components/mapstruct.yml | 13 +++
docs/modules/ROOT/nav.adoc | 1 +
.../ROOT/pages/reference/extensions/mapstruct.adoc | 41 +++++++++
extensions-jvm/mapstruct/deployment/pom.xml | 63 +++++++++++++
.../mapstruct/deployment/MapstructProcessor.java | 46 ++++++++++
extensions-jvm/mapstruct/pom.xml | 39 ++++++++
extensions-jvm/mapstruct/runtime/pom.xml | 100 +++++++++++++++++++++
.../main/resources/META-INF/quarkus-extension.yaml | 33 +++++++
extensions-jvm/pom.xml | 1 +
integration-tests-jvm/mapstruct/pom.xml | 57 ++++++++++++
integration-tests-jvm/pom.xml | 1 +
poms/bom/pom.xml | 15 ++++
poms/bom/src/main/generated/flattened-full-pom.xml | 15 ++++
.../src/main/generated/flattened-reduced-pom.xml | 15 ++++
.../generated/flattened-reduced-verbose-pom.xml | 15 ++++
15 files changed, 455 insertions(+)
diff --git a/docs/modules/ROOT/examples/components/mapstruct.yml b/docs/modules/ROOT/examples/components/mapstruct.yml
new file mode 100644
index 0000000000..8efead0211
--- /dev/null
+++ b/docs/modules/ROOT/examples/components/mapstruct.yml
@@ -0,0 +1,13 @@
+# Do not edit directly!
+# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+cqArtifactId: camel-quarkus-mapstruct
+cqArtifactIdBase: mapstruct
+cqNativeSupported: false
+cqStatus: Preview
+cqDeprecated: false
+cqJvmSince: 3.0.0
+cqNativeSince: n/a
+cqCamelPartName: mapstruct
+cqCamelPartTitle: MapStruct
+cqCamelPartDescription: Type Conversion using Mapstruct
+cqExtensionPageTitle: MapStruct
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index bea9e0243d..fb514cc6fa 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -203,6 +203,7 @@
*** xref:reference/extensions/mvel.adoc[MVEL]
*** xref:reference/extensions/mail.adoc[Mail]
*** xref:reference/extensions/management.adoc[Management]
+*** xref:reference/extensions/mapstruct.adoc[MapStruct]
*** xref:reference/extensions/master.adoc[Master]
*** xref:reference/extensions/microprofile-health.adoc[MicroProfile Health]
*** xref:reference/extensions/micrometer.adoc[Micrometer]
diff --git a/docs/modules/ROOT/pages/reference/extensions/mapstruct.adoc b/docs/modules/ROOT/pages/reference/extensions/mapstruct.adoc
new file mode 100644
index 0000000000..1aa730b7c3
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/mapstruct.adoc
@@ -0,0 +1,41 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+[id="extensions-mapstruct"]
+= MapStruct
+:linkattrs:
+:cq-artifact-id: camel-quarkus-mapstruct
+:cq-native-supported: false
+:cq-status: Preview
+:cq-status-deprecation: Preview
+:cq-description: Type Conversion using Mapstruct
+:cq-deprecated: false
+:cq-jvm-since: 3.0.0
+:cq-native-since: n/a
+
+ifeval::[{doc-show-badges} == true]
+[.badges]
+[.badge-key]##JVM since##[.badge-supported]##3.0.0## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+endif::[]
+
+Type Conversion using Mapstruct
+
+[id="extensions-mapstruct-whats-inside"]
+== What's inside
+
+* xref:{cq-camel-components}::mapstruct-component.adoc[MapStruct component], URI syntax: `mapstruct:className`
+
+Please refer to the above link for usage and configuration details.
+
+[id="extensions-mapstruct-maven-coordinates"]
+== Maven coordinates
+
+[source,xml]
+----
+<dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-mapstruct</artifactId>
+</dependency>
+----
+ifeval::[{doc-show-user-guide-link} == true]
+Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
+endif::[]
diff --git a/extensions-jvm/mapstruct/deployment/pom.xml b/extensions-jvm/mapstruct/deployment/pom.xml
new file mode 100644
index 0000000000..eeff5de53b
--- /dev/null
+++ b/extensions-jvm/mapstruct/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-mapstruct-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-mapstruct-deployment</artifactId>
+ <name>Camel Quarkus :: MapStruct :: 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-mapstruct</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/mapstruct/deployment/src/main/java/org/apache/camel/quarkus/component/mapstruct/deployment/MapstructProcessor.java b/extensions-jvm/mapstruct/deployment/src/main/java/org/apache/camel/quarkus/component/mapstruct/deployment/MapstructProcessor.java
new file mode 100644
index 0000000000..3bfaa4cefd
--- /dev/null
+++ b/extensions-jvm/mapstruct/deployment/src/main/java/org/apache/camel/quarkus/component/mapstruct/deployment/MapstructProcessor.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.mapstruct.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 MapstructProcessor {
+
+ private static final Logger LOG = Logger.getLogger(MapstructProcessor.class);
+ private static final String FEATURE = "camel-mapstruct";
+
+ @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/mapstruct/pom.xml b/extensions-jvm/mapstruct/pom.xml
new file mode 100644
index 0000000000..023d4eca55
--- /dev/null
+++ b/extensions-jvm/mapstruct/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-extensions-jvm</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-mapstruct-parent</artifactId>
+ <name>Camel Quarkus :: MapStruct</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>deployment</module>
+ <module>runtime</module>
+ </modules>
+</project>
diff --git a/extensions-jvm/mapstruct/runtime/pom.xml b/extensions-jvm/mapstruct/runtime/pom.xml
new file mode 100644
index 0000000000..fd1b388885
--- /dev/null
+++ b/extensions-jvm/mapstruct/runtime/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-mapstruct-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-mapstruct</artifactId>
+ <name>Camel Quarkus :: MapStruct :: Runtime</name>
+ <description>Type Conversion using Mapstruct</description>
+
+ <properties>
+ <camel.quarkus.jvmSince>3.0.0</camel.quarkus.jvmSince>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-mapstruct</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-processor</artifactId>
+ <version>${quarkus.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
+ <profiles>
+ <profile>
+ <id>full</id>
+ <activation>
+ <property>
+ <name>!quickly</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>update-extension-doc-page</id>
+ <goals>
+ <goal>update-extension-doc-page</goal>
+ </goals>
+ <phase>process-classes</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/extensions-jvm/mapstruct/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/mapstruct/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000000..8cd01d7459
--- /dev/null
+++ b/extensions-jvm/mapstruct/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,33 @@
+#
+# 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 MapStruct"
+description: "Type Conversion using Mapstruct"
+icon-url: "https://camel.apache.org/_/img/logo-d-f21b25ba38.svg"
+metadata:
+ unlisted: true
+ guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/mapstruct.html"
+ categories:
+ - "integration"
+ status:
+ - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 383deda2b3..96d70f65a1 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -85,6 +85,7 @@
<module>ldif</module>
<module>lucene</module>
<module>management</module>
+ <module>mapstruct</module>
<module>mvel</module>
<module>printer</module>
<module>pulsar</module>
diff --git a/integration-tests-jvm/mapstruct/pom.xml b/integration-tests-jvm/mapstruct/pom.xml
new file mode 100644
index 0000000000..c50dfcc9d2
--- /dev/null
+++ b/integration-tests-jvm/mapstruct/pom.xml
@@ -0,0 +1,57 @@
+<?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>3.0.0-SNAPSHOT</version>
+ <relativePath>../../poms/build-parent-it/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-mapstruct</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: MapStruct</name>
+ <description>Integration tests for Camel Quarkus MapStruct extension</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-mapstruct</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>
+</project>
diff --git a/integration-tests-jvm/pom.xml b/integration-tests-jvm/pom.xml
index b011c16c03..f7ceea358f 100644
--- a/integration-tests-jvm/pom.xml
+++ b/integration-tests-jvm/pom.xml
@@ -84,6 +84,7 @@
<module>ldif</module>
<module>lucene</module>
<module>management</module>
+ <module>mapstruct</module>
<module>mvel</module>
<module>printer</module>
<module>pulsar</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index e0c4dcd2d4..8841adc258 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -1761,6 +1761,11 @@
<artifactId>camel-management-api</artifactId>
<version>${camel.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-mapstruct</artifactId>
+ <version>${camel.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-master</artifactId>
@@ -4423,6 +4428,16 @@
<artifactId>camel-quarkus-management-deployment</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-mapstruct</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-mapstruct-deployment</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-master</artifactId>
diff --git a/poms/bom/src/main/generated/flattened-full-pom.xml b/poms/bom/src/main/generated/flattened-full-pom.xml
index 8d2481d45b..4b0356751e 100644
--- a/poms/bom/src/main/generated/flattened-full-pom.xml
+++ b/poms/bom/src/main/generated/flattened-full-pom.xml
@@ -1699,6 +1699,11 @@
<artifactId>camel-management-api</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>4.0.0-M2</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-mapstruct</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>4.0.0-M2</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-master</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
@@ -4334,6 +4339,16 @@
<artifactId>camel-quarkus-management-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>3.0.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-mapstruct</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.0.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-mapstruct-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.0.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-quarkus-master</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
diff --git a/poms/bom/src/main/generated/flattened-reduced-pom.xml b/poms/bom/src/main/generated/flattened-reduced-pom.xml
index f2a4ffc70b..79f56b7822 100644
--- a/poms/bom/src/main/generated/flattened-reduced-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-pom.xml
@@ -1699,6 +1699,11 @@
<artifactId>camel-management-api</artifactId>
<version>4.0.0-M2</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-mapstruct</artifactId>
+ <version>4.0.0-M2</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-master</artifactId>
@@ -4334,6 +4339,16 @@
<artifactId>camel-quarkus-management-deployment</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-mapstruct</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-mapstruct-deployment</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-master</artifactId>
diff --git a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
index 467d971ce1..ad78c7c3e7 100644
--- a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
@@ -1699,6 +1699,11 @@
<artifactId>camel-management-api</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>4.0.0-M2</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-mapstruct</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>4.0.0-M2</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-master</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
@@ -4334,6 +4339,16 @@
<artifactId>camel-quarkus-management-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>3.0.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-mapstruct</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.0.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-mapstruct-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.0.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-quarkus-master</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->