You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2018/12/11 15:27:49 UTC

[flink] branch master updated: [FLINK-11080][ES] Rework shade-plugin filters

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 3c5eb92  [FLINK-11080][ES] Rework shade-plugin filters
3c5eb92 is described below

commit 3c5eb92728e0d925d600afecc754ae6a54227a4f
Author: zentol <ch...@apache.org>
AuthorDate: Wed Dec 5 15:46:05 2018 +0100

    [FLINK-11080][ES] Rework shade-plugin filters
---
 .../flink-connector-elasticsearch6/pom.xml         | 58 ++++++++++++++++------
 1 file changed, 43 insertions(+), 15 deletions(-)

diff --git a/flink-connectors/flink-connector-elasticsearch6/pom.xml b/flink-connectors/flink-connector-elasticsearch6/pom.xml
index 40b9ab6..57d1079 100644
--- a/flink-connectors/flink-connector-elasticsearch6/pom.xml
+++ b/flink-connectors/flink-connector-elasticsearch6/pom.xml
@@ -197,29 +197,57 @@ under the License.
 								<configuration>
 									<shadedArtifactAttached>true</shadedArtifactAttached>
 									<shadedClassifierName>sql-jar</shadedClassifierName>
+									<artifactSet>
+										<includes>
+											<include>*:*</include>
+										</includes>
+										<excludes>
+											<!-- These dependencies are not required. -->
+											<exclude>com.carrotsearch:hppc</exclude>
+											<exclude>com.tdunning:t-digest</exclude>
+											<exclude>joda-time:joda-time</exclude>
+											<exclude>net.sf.jopt-simple:jopt-simple</exclude>
+											<exclude>org.elasticsearch:jna</exclude>
+											<exclude>org.hdrhistogram:HdrHistogram</exclude>
+											<exclude>org.yaml:snakeyaml</exclude>
+										</excludes>
+									</artifactSet>
 									<filters>
 										<filter>
-											<artifact>*:*</artifact>
-											<!-- It is difficult to find out artifacts that are really required by ES. -->
-											<!-- We use hard filters for now to clean up the SQL JAR. -->
+											<artifact>org.elasticsearch:elasticsearch</artifact>
 											<excludes>
-												<exclude>com/carrotsearch/**</exclude>
-												<exclude>com/sun/**</exclude>
-												<exclude>com/tdunning/**</exclude>
 												<exclude>config/**</exclude>
+												<exclude>modules.txt</exclude>
+												<exclude>plugins.txt</exclude>
+												<exclude>org/joda/**</exclude>
+											</excludes>
+										</filter>
+										<filter>
+											<artifact>org.elasticsearch.client:elasticsearch-rest-high-level-client</artifact>
+											<excludes>
 												<exclude>forbidden/**</exclude>
-												<exclude>joptsimple/**</exclude>
+											</excludes>
+										</filter>
+										<filter>
+											<artifact>org.apache.httpcomponents:httpclient</artifact>
+											<excludes>
+												<exclude>mozilla/**</exclude>
+											</excludes>
+										</filter>
+										<filter>
+											<artifact>org.apache.lucene:lucene-analyzers-common</artifact>
+											<excludes>
+												<exclude>org/tartarus/**</exclude>
+											</excludes>
+										</filter>
+										<filter>
+											<artifact>*:*</artifact>
+											<excludes>
+												<!-- exclude Java 9 specific classes as otherwise the shade-plugin crashes -->
+												<exclude>META-INF/versions/**</exclude>
 												<exclude>META-INF/services/com.fasterxml.**</exclude>
 												<exclude>META-INF/services/org.apache.lucene.**</exclude>
 												<exclude>META-INF/services/org.elasticsearch.**</exclude>
-												<exclude>META-INF/versions/**</exclude>
-												<exclude>modules.txt</exclude>
-												<exclude>mozilla/**</exclude>
-												<exclude>org/HdrHistogram/**</exclude>
-												<exclude>org/joda/**</exclude>
-												<exclude>org/tartarus/**</exclude>
-												<exclude>org/yaml/**</exclude>
-												<exclude>plugins.txt</exclude>
 											</excludes>
 										</filter>
 									</filters>