You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ji...@apache.org on 2025/06/06 07:03:16 UTC
(camel-quarkus) 02/07: Weaviate extension
This is an automated email from the ASF dual-hosted git repository.
jiriondrusek pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 7e21457e10b03e74f1d4a00cb580ed81d5755aa5
Author: Jiri Ondrusek <on...@gmail.com>
AuthorDate: Wed Jun 4 14:24:06 2025 +0200
Weaviate extension
---
catalog/pom.xml | 13 ++
docs/modules/ROOT/examples/components/weaviate.yml | 13 ++
docs/modules/ROOT/nav.adoc | 3 +-
.../ROOT/pages/reference/extensions/weaviate.adoc | 45 ++++
extensions/pom.xml | 1 +
extensions/weaviate/deployment/pom.xml | 71 +++++++
.../weaviate/deployment/WeaviateProcessor.java | 53 +++++
extensions/weaviate/pom.xml | 39 ++++
extensions/weaviate/runtime/pom.xml | 109 ++++++++++
.../main/resources/META-INF/quarkus-extension.yaml | 33 +++
integration-tests/pom.xml | 1 +
integration-tests/weaviate/README.adoc | 11 +
integration-tests/weaviate/pom.xml | 165 +++++++++++++++
.../component/weaviate/it/WeaviateResource.java | 99 +++++++++
.../component/weaviate/it/WeaviateRoutes.java | 54 +++++
.../quarkus/component/weaviate/it/WeaviateIT.java | 24 +++
.../component/weaviate/it/WeaviateTest.java | 233 +++++++++++++++++++++
.../weaviate/it/WeaviateTestResource.java | 74 +++++++
pom.xml | 1 +
poms/bom/pom.xml | 37 ++++
poms/bom/src/main/generated/flattened-full-pom.xml | 37 ++++
.../src/main/generated/flattened-reduced-pom.xml | 37 ++++
.../generated/flattened-reduced-verbose-pom.xml | 37 ++++
tooling/scripts/test-categories.yaml | 1 +
24 files changed, 1190 insertions(+), 1 deletion(-)
diff --git a/catalog/pom.xml b/catalog/pom.xml
index 081776ac6e..9b8642ba17 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -4374,6 +4374,19 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-weaviate</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-web3j</artifactId>
diff --git a/docs/modules/ROOT/examples/components/weaviate.yml b/docs/modules/ROOT/examples/components/weaviate.yml
new file mode 100644
index 0000000000..9c97e421be
--- /dev/null
+++ b/docs/modules/ROOT/examples/components/weaviate.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-weaviate
+cqArtifactIdBase: weaviate
+cqNativeSupported: true
+cqStatus: Stable
+cqDeprecated: false
+cqJvmSince: 3.24.0
+cqNativeSince: 3.24.0
+cqCamelPartName: weaviate
+cqCamelPartTitle: weaviate
+cqCamelPartDescription: Perform operations on the Weaviate Vector Database.
+cqExtensionPageTitle: weaviate
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index b93326e370..3233d506cb 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -344,7 +344,8 @@
*** xref:reference/extensions/joor.adoc[jOOR]
*** xref:reference/extensions/langchain4j.adoc[langChain4j]
*** xref:reference/extensions/langchain4j-chat.adoc[langChain4j Chat]
-*** xref:reference/extensions/univocity-parsers.adoc[uniVocity CSV]// extensions: END
+*** xref:reference/extensions/univocity-parsers.adoc[uniVocity CSV]
+*** xref:reference/extensions/weaviate.adoc[weaviate]// extensions: END
** xref:reference/components.adoc[Components]
** xref:reference/dataformats.adoc[Data formats]
** xref:reference/languages.adoc[Languages]
diff --git a/docs/modules/ROOT/pages/reference/extensions/weaviate.adoc b/docs/modules/ROOT/pages/reference/extensions/weaviate.adoc
new file mode 100644
index 0000000000..fef65d0fce
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/weaviate.adoc
@@ -0,0 +1,45 @@
+// Do not edit directly!
+// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
+[id="extensions-weaviate"]
+= weaviate
+:linkattrs:
+:cq-artifact-id: camel-quarkus-weaviate
+:cq-native-supported: true
+:cq-status: Stable
+:cq-status-deprecation: Stable
+:cq-description: Perform operations on the Weaviate Vector Database.
+:cq-deprecated: false
+:cq-jvm-since: 3.24.0
+:cq-native-since: 3.24.0
+
+ifeval::[{doc-show-badges} == true]
+[.badges]
+[.badge-key]##JVM since##[.badge-supported]##3.24.0## [.badge-key]##Native since##[.badge-supported]##3.24.0##
+endif::[]
+
+Perform operations on the Weaviate Vector Database.
+
+[id="extensions-weaviate-whats-inside"]
+== What's inside
+
+* xref:{cq-camel-components}::weaviate-component.adoc[weaviate component], URI syntax: `weaviate:collection`
+
+Please refer to the above link for usage and configuration details.
+
+[id="extensions-weaviate-maven-coordinates"]
+== Maven coordinates
+
+https://{link-quarkus-code-generator}/?extension-search=camel-quarkus-weaviate[Create a new project with this extension on {link-quarkus-code-generator}, window="_blank"]
+
+Or add the coordinates to your existing project:
+
+[source,xml]
+----
+<dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-weaviate</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/pom.xml b/extensions/pom.xml
index dfbfbdc50d..deeb8798d0 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -265,6 +265,7 @@
<module>vertx-websocket</module>
<module>wasm</module>
<module>weather</module>
+ <module>weaviate</module>
<module>xchange</module>
<module>xj</module>
<module>xmlsecurity</module>
diff --git a/extensions/weaviate/deployment/pom.xml b/extensions/weaviate/deployment/pom.xml
new file mode 100644
index 0000000000..5b13adb780
--- /dev/null
+++ b/extensions/weaviate/deployment/pom.xml
@@ -0,0 +1,71 @@
+<?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-weaviate-parent</artifactId>
+ <version>3.24.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-weaviate-deployment</artifactId>
+ <name>Camel Quarkus :: weaviate :: 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-support-httpclient5-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-netty-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-weaviate</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/weaviate/deployment/src/main/java/org/apache/camel/quarkus/component/weaviate/deployment/WeaviateProcessor.java b/extensions/weaviate/deployment/src/main/java/org/apache/camel/quarkus/component/weaviate/deployment/WeaviateProcessor.java
new file mode 100644
index 0000000000..fcbc8d12ba
--- /dev/null
+++ b/extensions/weaviate/deployment/src/main/java/org/apache/camel/quarkus/component/weaviate/deployment/WeaviateProcessor.java
@@ -0,0 +1,53 @@
+/*
+ * 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.weaviate.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.IndexDependencyBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import org.jboss.jandex.IndexView;
+
+class WeaviateProcessor {
+
+ private static final String FEATURE = "camel-weaviate";
+
+ @BuildStep
+ FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
+
+ @BuildStep
+ ReflectiveClassBuildItem registerForReflection(CombinedIndexBuildItem combinedIndex) {
+ IndexView index = combinedIndex.getIndex();
+
+ String[] dtos = index.getKnownClasses().stream()
+ .map(ci -> ci.name().toString())
+ .filter(n -> n.startsWith("io.weaviate.client.v1.")
+ && n.contains(".model"))
+ .sorted()
+ .toArray(String[]::new);
+
+ return ReflectiveClassBuildItem.builder(dtos).methods().fields().build();
+ }
+
+ @BuildStep
+ IndexDependencyBuildItem registerDependencyForIndex() {
+ return new IndexDependencyBuildItem("io.weaviate", "client");
+ }
+}
diff --git a/extensions/weaviate/pom.xml b/extensions/weaviate/pom.xml
new file mode 100644
index 0000000000..e22522ba47
--- /dev/null
+++ b/extensions/weaviate/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</artifactId>
+ <version>3.24.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-weaviate-parent</artifactId>
+ <name>Camel Quarkus :: weaviate</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>deployment</module>
+ <module>runtime</module>
+ </modules>
+</project>
diff --git a/extensions/weaviate/runtime/pom.xml b/extensions/weaviate/runtime/pom.xml
new file mode 100644
index 0000000000..308b889edc
--- /dev/null
+++ b/extensions/weaviate/runtime/pom.xml
@@ -0,0 +1,109 @@
+<?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-weaviate-parent</artifactId>
+ <version>3.24.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-weaviate</artifactId>
+ <name>Camel Quarkus :: weaviate :: Runtime</name>
+ <description>Perform operations on the Weaviate Vector Database.</description>
+
+ <properties>
+ <camel.quarkus.jvmSince>3.24.0</camel.quarkus.jvmSince>
+ <camel.quarkus.nativeSince>3.24.0</camel.quarkus.nativeSince>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-support-httpclient5</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-netty</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-weaviate</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/weaviate/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/weaviate/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000000..b539ceb399
--- /dev/null
+++ b/extensions/weaviate/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 weaviate"
+description: "Perform operations on the Weaviate Vector Database"
+metadata:
+ icon-url: "https://raw.githubusercontent.com/apache/camel-website/main/antora-ui-camel/src/img/logo-d.svg"
+ sponsor: "Apache Software Foundation"
+ guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/weaviate.html"
+ categories:
+ - "integration"
+ status:
+ - "stable"
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 753269ab49..a49644ce78 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -240,6 +240,7 @@
<module>vertx-websocket</module>
<module>wasm</module>
<module>weather</module>
+ <module>weaviate</module>
<module>xchange</module>
<module>xj</module>
<module>xml-grouped</module>
diff --git a/integration-tests/weaviate/README.adoc b/integration-tests/weaviate/README.adoc
new file mode 100644
index 0000000000..1d440f9c25
--- /dev/null
+++ b/integration-tests/weaviate/README.adoc
@@ -0,0 +1,11 @@
+The Weaviate integration tests use docker test container by default.
+
+To run the `camel-quarkus-weaviate` integration tests against the real API, you must first create a Weaviate account and cluster (https://weaviate.io/).
+
+Set the following environment variables:
+
+[source,shell]
+----
+export WEAVIATE_API_KEY=#your-weaviate-apikey
+export WEAVIATE_HOST=#your-weaviate-host
+----
diff --git a/integration-tests/weaviate/pom.xml b/integration-tests/weaviate/pom.xml
new file mode 100644
index 0000000000..06880401fc
--- /dev/null
+++ b/integration-tests/weaviate/pom.xml
@@ -0,0 +1,165 @@
+<?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.24.0-SNAPSHOT</version>
+ <relativePath>../../poms/build-parent-it/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-weaviate</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: weaviate</name>
+ <description>Integration tests for Camel Quarkus weaviate extension</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-weaviate</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-jackson</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>weaviate</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.apache.camel.quarkus</groupId>
+ <scope>test</scope>
+ <artifactId>camel-quarkus-integration-test-support</artifactId>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>native</id>
+ <activation>
+ <property>
+ <name>native</name>
+ </property>
+ </activation>
+ <properties>
+ <quarkus.native.enabled>true</quarkus.native.enabled>
+ </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-weaviate-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/weaviate/src/main/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateResource.java b/integration-tests/weaviate/src/main/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateResource.java
new file mode 100644
index 0000000000..b31e40ab1a
--- /dev/null
+++ b/integration-tests/weaviate/src/main/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateResource.java
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.weaviate.it;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import io.weaviate.client.base.Result;
+import io.weaviate.client.v1.data.model.WeaviateObject;
+import io.weaviate.client.v1.graphql.model.GraphQLResponse;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+import org.apache.camel.CamelContext;
+import org.apache.camel.Exchange;
+import org.jboss.logging.Logger;
+
+@Path("/weaviate")
+@ApplicationScoped
+public class WeaviateResource {
+
+ public static final String WEAVIATE_CONTAINER_ADDRESS = "cq.weaviate.container.address";
+ public static final String WEAVIATE_API_KEY_ENV = "WEAVIATE_API_KEY";
+ public static final String WEAVIATE_HOST_ENV = "WEAVIATE_HOST";
+
+ private static final Logger LOG = Logger.getLogger(WeaviateResource.class);
+
+ @Inject
+ CamelContext context;
+
+ @Path("/request")
+ @POST
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response request(Map<String, Object> testHeaders) {
+ Map<String, Object> headers = new HashMap<>(testHeaders);
+
+ Object body = headers.get("body");
+ headers.remove("body");
+
+ //convert Double to Float in body list (for create)
+ if (body instanceof List) {
+ body = ((List<?>) body).stream().map(o -> o instanceof Double ? ((Double) o).floatValue() : o)
+ .collect(Collectors.toList());
+ }
+
+ Exchange response = context.createFluentProducerTemplate()
+ .to("direct:weaviate")
+ .withBody(body)
+ .withHeaders(headers)
+ .request(Exchange.class);
+
+ Result<?> result = response.getIn().getBody(Result.class);
+ LOG.debugf("Response for collections with headers (%s) is: \"%s\".", headers, result);
+
+ if (result != null) {
+ HashMap<String, Object> map = new HashMap();
+ map.put("error", result.getError() == null ? "" : result.getError());
+
+ if (result.getResult() instanceof Boolean) {
+ map.put("result", result.getResult());
+ } else if (result.getResult() instanceof WeaviateObject) {
+ map.put("result", ((WeaviateObject) result.getResult()).getId());
+ map.put("resultProperties", ((WeaviateObject) result.getResult()).getProperties());
+ } else if (result.getResult() instanceof List) {
+ @SuppressWarnings("unchecked")
+ List<WeaviateObject> objects = (List<WeaviateObject>) result.getResult();
+ map.put("result",
+ objects.stream().collect(Collectors.toMap(WeaviateObject::getId, WeaviateObject::getProperties)));
+ } else if (result.getResult() instanceof GraphQLResponse) {
+ map.put("result", result.getResult());
+ }
+
+ return Response.ok(map).build();
+ }
+
+ return Response.status(500).entity("Empty result").build();
+ }
+
+}
diff --git a/integration-tests/weaviate/src/main/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateRoutes.java b/integration-tests/weaviate/src/main/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateRoutes.java
new file mode 100644
index 0000000000..a32a500461
--- /dev/null
+++ b/integration-tests/weaviate/src/main/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateRoutes.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.weaviate.it;
+
+import java.util.Optional;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import org.apache.camel.builder.RouteBuilder;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+@ApplicationScoped
+public class WeaviateRoutes extends RouteBuilder {
+
+ @ConfigProperty(name = WeaviateResource.WEAVIATE_CONTAINER_ADDRESS)
+ Optional<String> weaviateContainerAddress;
+
+ @ConfigProperty(name = WeaviateResource.WEAVIATE_HOST_ENV)
+ Optional<String> host;
+
+ @ConfigProperty(name = WeaviateResource.WEAVIATE_API_KEY_ENV)
+ Optional<String> apiKey;
+
+ @Override
+ public void configure() throws Exception {
+ from("direct:weaviate")
+ .to(getUrl());
+ }
+
+ private String getUrl() {
+ if (weaviateContainerAddress.isPresent()) {
+ return "weaviate:test-collection?scheme=http&host=" + weaviateContainerAddress.get();
+ }
+
+ if (host.isPresent() && apiKey.isPresent()) {
+ return "weaviate:test-collection?scheme=https&host=%s&apiKey=%s".formatted(host.get(), apiKey.get());
+ }
+
+ throw new IllegalStateException("Weaviate is not configured. Bot container or real account configuration is missing.");
+ }
+}
diff --git a/integration-tests/weaviate/src/test/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateIT.java b/integration-tests/weaviate/src/test/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateIT.java
new file mode 100644
index 0000000000..6c761ecf05
--- /dev/null
+++ b/integration-tests/weaviate/src/test/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateIT.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.weaviate.it;
+
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+
+@QuarkusIntegrationTest
+class WeaviateIT extends WeaviateTest {
+
+}
diff --git a/integration-tests/weaviate/src/test/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateTest.java b/integration-tests/weaviate/src/test/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateTest.java
new file mode 100644
index 0000000000..ca5dae04fb
--- /dev/null
+++ b/integration-tests/weaviate/src/test/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateTest.java
@@ -0,0 +1,233 @@
+/*
+ * 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.weaviate.it;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import io.restassured.response.ValidatableResponse;
+import org.apache.camel.component.weaviate.WeaviateVectorDb;
+import org.apache.camel.component.weaviate.WeaviateVectorDbAction;
+import org.hamcrest.Matchers;
+import org.hamcrest.text.IsEmptyString;
+import org.jboss.logging.Logger;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+@QuarkusTestResource(WeaviateTestResource.class)
+class WeaviateTest {
+ private static final Logger LOG = Logger.getLogger(WeaviateTest.class);
+
+ @Test
+ public void simpleCrud() {
+ String collectionName = "WeaviateCQCollectionCrud" + System.currentTimeMillis();
+ List<Float> values = Arrays.asList(1.0f, 2.0f, 3.0f);
+ Map<String, String> properties = Map.of("sky", "blue", "age", "34");
+ Map<String, String> updatedProperties = Map.of("dog", "dachshund");
+
+ boolean collectionCreated = false;
+ try {
+ createCollection(collectionName);
+ LOG.infof("Collection created: %s", collectionName);
+ collectionCreated = true;
+
+ String id = createEntry(collectionName, values, properties);
+
+ queryById(collectionName, id)
+ .body("result", Matchers.aMapWithSize(1))
+ .body("result." + id, Matchers.aMapWithSize(2))
+ .body("result." + id, Matchers.hasKey("sky"))
+ .body("result." + id, Matchers.hasKey("age"))
+ .body("result." + id, Matchers.not(Matchers.hasKey("dog")));
+
+ updateById(collectionName, id, values, updatedProperties);
+
+ queryById(collectionName, id)
+ .body("result", Matchers.aMapWithSize(1))
+ .body("result." + id, Matchers.aMapWithSize(3))
+ .body("result." + id, Matchers.hasKey("sky"))
+ .body("result." + id, Matchers.hasKey("age"))
+ .body("result." + id, Matchers.hasKey("dog"));
+
+ deleteById(collectionName, id);
+
+ queryById(collectionName, id)
+ .body("result", Matchers.nullValue());
+
+ } finally {
+ if (collectionCreated) {
+ deleteCollection(collectionName);
+ }
+ }
+ }
+
+ @Test
+ public void queryByVector() {
+ String collectionName = "WeaviateCQCollectionVector" + System.currentTimeMillis();
+
+ boolean collectionCreated = false;
+ try {
+ createCollection(collectionName);
+ LOG.infof("Collection created: %s", collectionName);
+ collectionCreated = true;
+
+ createEntry(collectionName, Arrays.asList(0.1f, 0.2f, 0.3f),
+ Map.of("title", "First Article", "content", "The content of the first article."));
+ createEntry(collectionName, Arrays.asList(0.2f, 0.3f, 0.4f),
+ Map.of("title", "Second Article", "content", "The content of the second article."));
+ createEntry(collectionName, Arrays.asList(0.3f, 0.4f, 0.5f),
+ Map.of("title", "Third Article", "content", "The content of the third article."));
+
+ queryByVector(collectionName, Arrays.asList(0.15f, 0.25f, 0.35f), Map.of("title", "", "content", ""))
+ .body("result.data.Get." + collectionName, Matchers.hasSize(2))
+ .body("result.data.Get." + collectionName + "[0]", Matchers.aMapWithSize(2))
+ .body("result.data.Get." + collectionName + "[0].title", Matchers.equalTo("Second Article"))
+ .body("result.data.Get." + collectionName + "[1].title", Matchers.equalTo("First Article"));
+
+ queryByVector(collectionName, Arrays.asList(0.3f, 0.4f, 0.5f), Map.of("title", "", "content", ""))
+ .body("result.data.Get." + collectionName, Matchers.hasSize(2))
+ .body("result.data.Get." + collectionName + "[0]", Matchers.aMapWithSize(2))
+ .body("result.data.Get." + collectionName + "[0].title", Matchers.equalTo("Third Article"))
+ .body("result.data.Get." + collectionName + "[1].title", Matchers.equalTo("Second Article"));
+
+ } finally {
+ if (collectionCreated) {
+ deleteCollection(collectionName);
+ }
+ }
+ }
+
+ private void createCollection(String name) {
+ RestAssured.given()
+ .contentType(ContentType.JSON)
+ .body(Map.of(WeaviateVectorDb.Headers.ACTION, WeaviateVectorDbAction.CREATE_COLLECTION,
+ WeaviateVectorDb.Headers.COLLECTION_NAME, name))
+ .post("/weaviate/request")
+ .then()
+ .statusCode(200)
+ .body("error", IsEmptyString.emptyOrNullString())
+ .body("result", Matchers.is(true));
+ }
+
+ private void deleteCollection(String name) {
+ RestAssured.given()
+ .contentType(ContentType.JSON)
+ .body(Map.of(WeaviateVectorDb.Headers.ACTION, WeaviateVectorDbAction.DELETE_COLLECTION,
+ WeaviateVectorDb.Headers.COLLECTION_NAME, name))
+ .post("/weaviate/request")
+ .then()
+ .statusCode(200)
+ .body("error", IsEmptyString.emptyOrNullString())
+ .body("result", Matchers.is(true));
+ }
+
+ private String createEntry(String collectionName, List<Float> values, Map<String, String> properties) {
+
+ Map<String, Object> payload = Map.of(
+ "body", values,
+ WeaviateVectorDb.Headers.ACTION, WeaviateVectorDbAction.CREATE,
+ WeaviateVectorDb.Headers.COLLECTION_NAME, collectionName,
+ WeaviateVectorDb.Headers.PROPERTIES, properties);
+
+ String createdId = RestAssured.given()
+ .contentType(ContentType.JSON)
+ .body(payload)
+ .post("/weaviate/request")
+ .then()
+ .statusCode(200)
+ .body("error", IsEmptyString.emptyOrNullString())
+ .extract().path("result");
+
+ Assertions.assertNotNull(createdId);
+
+ return createdId;
+ }
+
+ public ValidatableResponse queryById(String collectionName, String id) {
+ Map<String, Object> payload = Map.of(
+ WeaviateVectorDb.Headers.ACTION, WeaviateVectorDbAction.QUERY_BY_ID,
+ WeaviateVectorDb.Headers.COLLECTION_NAME, collectionName,
+ WeaviateVectorDb.Headers.INDEX_ID, id);
+
+ return RestAssured.given()
+ .contentType(ContentType.JSON)
+ .body(payload)
+ .post("/weaviate/request")
+ .then()
+ .statusCode(200)
+ .body("error", IsEmptyString.emptyOrNullString());
+ }
+
+ private void updateById(String collectionName, String id, List<Float> values,
+ Map<String, String> properties) {
+
+ Map<String, Object> payload = Map.of(
+ "body", values,
+ WeaviateVectorDb.Headers.ACTION, WeaviateVectorDbAction.UPDATE_BY_ID,
+ WeaviateVectorDb.Headers.COLLECTION_NAME, collectionName,
+ WeaviateVectorDb.Headers.INDEX_ID, id,
+ WeaviateVectorDb.Headers.PROPERTIES, properties);
+
+ RestAssured.given()
+ .contentType(ContentType.JSON)
+ .body(payload)
+ .post("/weaviate/request")
+ .then()
+ .statusCode(200)
+ .body("error", IsEmptyString.emptyOrNullString());
+ }
+
+ public void deleteById(String collectionName, String id) {
+
+ Map<String, Object> payload = Map.of(
+ WeaviateVectorDb.Headers.ACTION, WeaviateVectorDbAction.DELETE_BY_ID,
+ WeaviateVectorDb.Headers.COLLECTION_NAME, collectionName,
+ WeaviateVectorDb.Headers.INDEX_ID, id);
+
+ RestAssured.given()
+ .contentType(ContentType.JSON)
+ .body(payload)
+ .post("/weaviate/request")
+ .then().statusCode(200)
+ .body("error", IsEmptyString.emptyOrNullString())
+ .body("result", Matchers.is(true));
+ }
+
+ private ValidatableResponse queryByVector(String collectionName, List<Float> values, Map<String, String> fields) {
+
+ Map<String, Object> payload = Map.of(
+ "body", values,
+ WeaviateVectorDb.Headers.ACTION, WeaviateVectorDbAction.QUERY,
+ WeaviateVectorDb.Headers.COLLECTION_NAME, collectionName,
+ WeaviateVectorDb.Headers.QUERY_TOP_K, 2,
+ WeaviateVectorDb.Headers.FIELDS, fields);
+
+ return RestAssured.given()
+ .contentType(ContentType.JSON)
+ .body(payload)
+ .post("/weaviate/request")
+ .then()
+ .statusCode(200)
+ .body("error", IsEmptyString.emptyOrNullString());
+ }
+}
diff --git a/integration-tests/weaviate/src/test/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateTestResource.java b/integration-tests/weaviate/src/test/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateTestResource.java
new file mode 100644
index 0000000000..bb69d45e5d
--- /dev/null
+++ b/integration-tests/weaviate/src/test/java/org/apache/camel/quarkus/component/weaviate/it/WeaviateTestResource.java
@@ -0,0 +1,74 @@
+/*
+ * 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.weaviate.it;
+
+import java.time.Duration;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Optional;
+
+import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
+import org.apache.camel.quarkus.test.mock.backend.MockBackendUtils;
+import org.eclipse.microprofile.config.ConfigProvider;
+import org.testcontainers.utility.DockerImageName;
+import org.testcontainers.weaviate.WeaviateContainer;
+
+public class WeaviateTestResource implements QuarkusTestResourceLifecycleManager {
+
+ private static final DockerImageName WEAVIATE_IMAGE = DockerImageName
+ .parse(ConfigProvider.getConfig().getValue("weaviate.container.image", String.class))
+ .asCompatibleSubstituteFor("semitechnologies/weaviate");
+
+ private final WeaviateContainer container = new WeaviateContainer(WEAVIATE_IMAGE)
+ .withStartupTimeout(Duration.ofMinutes(3L));
+
+ @Override
+ public Map<String, String> start() {
+ //detect real/mock backend
+ Optional<String> apiKey = ConfigProvider.getConfig().getOptionalValue(WeaviateResource.WEAVIATE_API_KEY_ENV,
+ String.class);
+ Optional<String> hostKey = ConfigProvider.getConfig().getOptionalValue(WeaviateResource.WEAVIATE_HOST_ENV,
+ String.class);
+
+ final boolean startMockBackend = MockBackendUtils.startMockBackend(false);
+ final boolean realApiProvided = apiKey.isPresent() && hostKey.isPresent();
+ final boolean usingMockBackend = startMockBackend && !realApiProvided;
+
+ if (usingMockBackend) {
+ MockBackendUtils.logMockBackendUsed();
+ container.start();
+
+ return Map.of(
+ WeaviateResource.WEAVIATE_CONTAINER_ADDRESS, container.getHttpHostAddress());
+ } else if (!startMockBackend && !realApiProvided) {
+ throw new IllegalStateException(
+ "Set %s and %s env vars if you set CAMEL_QUARKUS_START_MOCK_BACKEND=false"
+ .formatted(WeaviateResource.WEAVIATE_API_KEY_ENV, WeaviateResource.WEAVIATE_HOST_ENV));
+ } else {
+ MockBackendUtils.logRealBackendUsed();
+ }
+
+ return Collections.emptyMap();
+ }
+
+ @Override
+ public void stop() {
+ if (container.isRunning()) {
+ container.stop();
+ }
+ }
+}
diff --git a/pom.xml b/pom.xml
index 42c6943166..d317bf6d87 100644
--- a/pom.xml
+++ b/pom.xml
@@ -270,6 +270,7 @@
<solr.container.image>mirror.gcr.io/solr:9.8.0-slim</solr.container.image>
<splunk.container.image>mirror.gcr.io/splunk/splunk:9.3.1</splunk.container.image>
<sql-server.container.image>mcr.microsoft.com/mssql/server:2022-latest</sql-server.container.image>
+ <weaviate.container.image>cr.weaviate.io/semitechnologies/weaviate:1.25.5</weaviate.container.image>
<!-- Plugin configuration through properties -->
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index b29f251202..dca05767ec 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -2934,6 +2934,33 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-weaviate</artifactId>
+ <version>${camel.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.github.stephenc.jcip</groupId>
+ <artifactId>jcip-annotations</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.google.android</groupId>
+ <artifactId>annotations</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>animal-sniffer-annotations</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>io.grpc</groupId>
+ <artifactId>grpc-netty-shaded</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-web3j</artifactId>
@@ -6422,6 +6449,16 @@
<artifactId>camel-quarkus-weather-deployment</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-weaviate</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-weaviate-deployment</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-web3j</artifactId>
diff --git a/poms/bom/src/main/generated/flattened-full-pom.xml b/poms/bom/src/main/generated/flattened-full-pom.xml
index e3d62b4baa..1b358de238 100644
--- a/poms/bom/src/main/generated/flattened-full-pom.xml
+++ b/poms/bom/src/main/generated/flattened-full-pom.xml
@@ -2855,6 +2855,33 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-weaviate</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>4.13.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <exclusions>
+ <exclusion>
+ <groupId>com.github.stephenc.jcip</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>jcip-annotations</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </exclusion>
+ <exclusion>
+ <groupId>com.google.android</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>annotations</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.mojo</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>animal-sniffer-annotations</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </exclusion>
+ <exclusion>
+ <groupId>io.grpc</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>grpc-netty-shaded</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </exclusion>
+ <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>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-web3j</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
@@ -6331,6 +6358,16 @@
<artifactId>camel-quarkus-weather-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>3.24.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-weaviate</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.24.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-weaviate-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.24.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-web3j</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 9b8a3de66f..5f858c1c0a 100644
--- a/poms/bom/src/main/generated/flattened-reduced-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-pom.xml
@@ -2845,6 +2845,33 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-weaviate</artifactId>
+ <version>4.13.0-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.github.stephenc.jcip</groupId>
+ <artifactId>jcip-annotations</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.google.android</groupId>
+ <artifactId>annotations</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>animal-sniffer-annotations</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>io.grpc</groupId>
+ <artifactId>grpc-netty-shaded</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-web3j</artifactId>
@@ -6321,6 +6348,16 @@
<artifactId>camel-quarkus-weather-deployment</artifactId>
<version>3.24.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-weaviate</artifactId>
+ <version>3.24.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-weaviate-deployment</artifactId>
+ <version>3.24.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-web3j</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 9c3bdbec86..e3b7d7d20f 100644
--- a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
@@ -2845,6 +2845,33 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-weaviate</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>4.13.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <exclusions>
+ <exclusion>
+ <groupId>com.github.stephenc.jcip</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>jcip-annotations</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </exclusion>
+ <exclusion>
+ <groupId>com.google.android</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>annotations</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.mojo</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>animal-sniffer-annotations</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </exclusion>
+ <exclusion>
+ <groupId>io.grpc</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>grpc-netty-shaded</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </exclusion>
+ <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>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-web3j</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
@@ -6321,6 +6348,16 @@
<artifactId>camel-quarkus-weather-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>3.24.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-weaviate</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.24.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-weaviate-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.24.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-web3j</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
diff --git a/tooling/scripts/test-categories.yaml b/tooling/scripts/test-categories.yaml
index a12a38a890..b1c392c93b 100644
--- a/tooling/scripts/test-categories.yaml
+++ b/tooling/scripts/test-categories.yaml
@@ -188,6 +188,7 @@ group-10:
- platform-http-proxy-ssl
- solr
- swift
+ - weaviate
group-11:
- compression-grouped
- disruptor