Files
wehub-resource-sync a2578d7ff1
Documentation: build and deploy / deploy (push) Waiting to run
langchain4j-github-bot.yml lint / langchain4j-github-bot.yml validation (push) Waiting to run
Java CI / compile_and_unit_test (17) (push) Waiting to run
Java CI / compile_and_unit_test (21) (push) Waiting to run
Java CI / integration_test (21) (push) Blocked by required conditions
Java CI / compliance (push) Waiting to run
Java CI / spotless (push) Waiting to run
snapshot_release / snapshot_release (push) Waiting to run
Split Package Detection / check-split-packages (push) Waiting to run
Java CI / compile_and_unit_test (25) (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 13:38:45 +08:00

213 lines
7.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<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>dev.langchain4j</groupId>
<artifactId>langchain4j-parent</artifactId>
<version>1.18.0-beta28-SNAPSHOT</version>
<relativePath>../langchain4j-parent/pom.xml</relativePath>
</parent>
<artifactId>langchain4j-elasticsearch</artifactId>
<name>LangChain4j :: Integration :: Elasticsearch</name>
<properties>
<elastic.version>9.3.1</elastic.version>
<!-- For tests only -->
<!-- You can run the tests using
# Elasticsearch Cloud
mvn verify -DELASTICSEARCH_CLOUD_URL=https://URL.elastic-cloud.com -DELASTICSEARCH_CLOUD_API_KEY=THE_KEY
# Elasticsearch running already Locally
mvn verify -DELASTICSEARCH_LOCAL_URL=https://localhost:9200 -DELASTICSEARCH_LOCAL_PASSWORD=changeme
# Elasticsearch started by Testcontainers
mvn verify
# Elasticsearch started by Testcontainers with a specific password
mvn verify -DELASTICSEARCH_LOCAL_PASSWORD=changeme
-->
<ELASTICSEARCH_CLOUD_URL></ELASTICSEARCH_CLOUD_URL>
<ELASTICSEARCH_CLOUD_API_KEY></ELASTICSEARCH_CLOUD_API_KEY>
<ELASTICSEARCH_LOCAL_URL></ELASTICSEARCH_LOCAL_URL>
<ELASTICSEARCH_LOCAL_PASSWORD>changeme</ELASTICSEARCH_LOCAL_PASSWORD>
</properties>
<dependencies>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-core</artifactId>
<version>1.18.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>co.elastic.clients</groupId>
<artifactId>elasticsearch-java</artifactId>
<version>${elastic.version}</version>
<exclusions>
<exclusion>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Deprecated (see below) httpcore and commons-codec -->
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client</artifactId>
<version>${elastic.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-nio</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--
Forcing because of clashing deps with the new client.
Remove me when removing the elasticsearch-rest-client.
-->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.16</version>
</dependency>
<!--
Forcing because of clashing deps with the new client.
Remove me when removing the elasticsearch-rest-client.
-->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.14</version>
<exclusions>
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--
Forcing because of clashing deps with the new client.
Remove me when removing the elasticsearch-rest-client.
-->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.22.0</version>
</dependency>
<!--
Forcing because of clashing deps with the new client.
Remove me when removing the elasticsearch-rest-client.
-->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-nio</artifactId>
<version>4.4.16</version>
</dependency>
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-core</artifactId>
<version>1.18.0-SNAPSHOT</version>
<classifier>tests</classifier>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-embeddings-all-minilm-l6-v2-q</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>elasticsearch</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.17.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<filtering>true</filtering>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<environmentVariables>
<ELASTICSEARCH_CLOUD_URL>${ELASTICSEARCH_CLOUD_URL}</ELASTICSEARCH_CLOUD_URL>
<ELASTICSEARCH_CLOUD_API_KEY>${ELASTICSEARCH_CLOUD_API_KEY}</ELASTICSEARCH_CLOUD_API_KEY>
<ELASTICSEARCH_LOCAL_URL>${ELASTICSEARCH_LOCAL_URL}</ELASTICSEARCH_LOCAL_URL>
<ELASTICSEARCH_LOCAL_PASSWORD>${ELASTICSEARCH_LOCAL_PASSWORD}</ELASTICSEARCH_LOCAL_PASSWORD>
</environmentVariables>
</configuration>
</plugin>
</plugins>
</build>
</project>