| <?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/maven-v4_0_0.xsd"> |
| |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-connectors</artifactId> |
| <version>1.3.2</version> |
| <relativePath>..</relativePath> |
| </parent> |
| |
| <artifactId>flink-connector-elasticsearch5_2.10</artifactId> |
| <name>flink-connector-elasticsearch5</name> |
| |
| <packaging>jar</packaging> |
| |
| <!-- Allow users to pass custom connector versions --> |
| <properties> |
| <elasticsearch.version>5.1.2</elasticsearch.version> |
| </properties> |
| |
| <dependencies> |
| |
| <!-- core dependencies --> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-streaming-java_2.10</artifactId> |
| <version>${project.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-connector-elasticsearch-base_2.10</artifactId> |
| <version>${project.version}</version> |
| <exclusions> |
| <!-- Elasticsearch Java Client has been moved to a different module in 5.x --> |
| <exclusion> |
| <groupId>org.elasticsearch</groupId> |
| <artifactId>elasticsearch</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| |
| <!-- Dependency for Elasticsearch 5.x Java Client --> |
| <dependency> |
| <groupId>org.elasticsearch.client</groupId> |
| <artifactId>transport</artifactId> |
| <version>${elasticsearch.version}</version> |
| </dependency> |
| |
| <!-- |
| Elasticsearch 5.x uses Log4j2 and no longer detects logging implementations, making |
| Log4j2 a strict dependency. The following is added so that the Log4j2 API in |
| Elasticsearch 5.x is routed to SLF4J. This way, user projects can remain flexible |
| in the logging implementation preferred. |
| --> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-to-slf4j</artifactId> |
| <version>2.7</version> |
| </dependency> |
| |
| <!-- test dependencies --> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-test-utils_2.10</artifactId> |
| <version>${project.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-streaming-java_2.10</artifactId> |
| <version>${project.version}</version> |
| <scope>test</scope> |
| <type>test-jar</type> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-connector-elasticsearch-base_2.10</artifactId> |
| <version>${project.version}</version> |
| <exclusions> |
| <exclusion> |
| <groupId>org.elasticsearch</groupId> |
| <artifactId>elasticsearch</artifactId> |
| </exclusion> |
| </exclusions> |
| <type>test-jar</type> |
| <scope>test</scope> |
| </dependency> |
| |
| <!-- |
| Including Log4j2 dependencies for tests is required for the |
| embedded Elasticsearch nodes used in tests to run correctly. |
| --> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-api</artifactId> |
| <version>2.7</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-core</artifactId> |
| <version>2.7</version> |
| <scope>test</scope> |
| </dependency> |
| |
| </dependencies> |
| |
| <build> |
| <plugins> |
| <!-- |
| For the tests, we need to exclude the Log4j2 to slf4j adapter dependency |
| and let Elasticsearch directly use Log4j2, otherwise the embedded Elasticsearch node |
| used in tests will fail to work. |
| |
| In other words, the connector jar is routing Elasticsearch 5.x's Log4j2 API's to SLF4J, |
| but for the test builds, we still stick to directly using Log4j2. |
| --> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <version>2.12.2</version> |
| <configuration> |
| <classpathDependencyExcludes> |
| <classpathDependencyExclude>org.apache.logging.log4j:log4j-to-slf4j</classpathDependencyExclude> |
| </classpathDependencyExcludes> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| |
| </project> |