You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2014/09/30 19:59:05 UTC
[6/9] git commit: Major depedendency cleanups - add "flink-shading"
for shaded libraries (currently guava only) - relocate guava in all projects
and exclude it from the lib and exported dependencies - Exlude unnecessary
transitive dependencies from
Major depedendency cleanups
- add "flink-shading" for shaded libraries (currently guava only)
- relocate guava in all projects and exclude it from the lib and exported dependencies
- Exlude unnecessary transitive dependencies from hadoop 1
Project: http://git-wip-us.apache.org/repos/asf/incubator-flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-flink/commit/758de7db
Tree: http://git-wip-us.apache.org/repos/asf/incubator-flink/tree/758de7db
Diff: http://git-wip-us.apache.org/repos/asf/incubator-flink/diff/758de7db
Branch: refs/heads/master
Commit: 758de7dbcd5148e17d94a45c5f6b74016b013a70
Parents: 7e43b1c
Author: Stephan Ewen <se...@apache.org>
Authored: Mon Sep 29 20:39:09 2014 +0200
Committer: Stephan Ewen <se...@apache.org>
Committed: Tue Sep 30 18:39:58 2014 +0200
----------------------------------------------------------------------
.../flink-streaming-connectors/pom.xml | 51 +++++-
.../flink-streaming-core/pom.xml | 2 +-
.../flink-streaming-examples/pom.xml | 2 +-
flink-addons/flink-streaming/pom.xml | 20 ---
flink-core/pom.xml | 8 +
.../api/common/accumulators/Histogram.java | 5 +-
flink-dist/pom.xml | 12 ++
flink-dist/src/main/assemblies/bin.xml | 27 +--
flink-dist/src/main/flink-bin/bin/flink | 6 -
flink-dist/src/main/flink-bin/bin/webclient.sh | 6 -
flink-runtime/pom.xml | 28 +++
flink-shaded/pom.xml | 80 +++++++++
pom.xml | 172 +++++++++++--------
13 files changed, 272 insertions(+), 147 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/758de7db/flink-addons/flink-streaming/flink-streaming-connectors/pom.xml
----------------------------------------------------------------------
diff --git a/flink-addons/flink-streaming/flink-streaming-connectors/pom.xml b/flink-addons/flink-streaming/flink-streaming-connectors/pom.xml
index 9777477..e941112 100644
--- a/flink-addons/flink-streaming/flink-streaming-connectors/pom.xml
+++ b/flink-addons/flink-streaming/flink-streaming-connectors/pom.xml
@@ -99,8 +99,8 @@ under the License.
<artifactId>spymemcached</artifactId>
<version>2.8.4</version>
</dependency>
-
- </dependencies>
+
+ </dependencies>
<build>
<plugins>
@@ -115,14 +115,47 @@ under the License.
</execution>
</executions>
</plugin>
+
+ <!-- Relocate the entire Google Guava dependency into a different namespace -->
<plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptorRefs>
- <descriptorRef>jar-with-dependencies</descriptorRef>
- </descriptorRefs>
- </configuration>
- </plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>2.3</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <shadedArtifactAttached>false</shadedArtifactAttached>
+ <createDependencyReducedPom>true</createDependencyReducedPom>
+ <dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
+ <artifactSet>
+ <includes>
+ <include>org.apache.flume:*</include>
+ <include>com.twitter:*</include>
+ </includes>
+ </artifactSet>
+ <relocations>
+ <relocation>
+ <pattern>com.google</pattern>
+ <shadedPattern>org.apache.flink.shaded.com.google</shadedPattern>
+ </relocation>
+ </relocations>
+ <filters>
+ <filter>
+ <artifact>*:*</artifact>
+ <excludes>
+ <exclude>build.properties</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/758de7db/flink-addons/flink-streaming/flink-streaming-core/pom.xml
----------------------------------------------------------------------
diff --git a/flink-addons/flink-streaming/flink-streaming-core/pom.xml b/flink-addons/flink-streaming/flink-streaming-core/pom.xml
index 0be9839..63b1145 100644
--- a/flink-addons/flink-streaming/flink-streaming-core/pom.xml
+++ b/flink-addons/flink-streaming/flink-streaming-core/pom.xml
@@ -46,7 +46,7 @@ under the License.
<groupId>org.apache.commons</groupId>
<artifactId>commons-math</artifactId>
<version>2.2</version>
- </dependency>
+ </dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/758de7db/flink-addons/flink-streaming/flink-streaming-examples/pom.xml
----------------------------------------------------------------------
diff --git a/flink-addons/flink-streaming/flink-streaming-examples/pom.xml b/flink-addons/flink-streaming/flink-streaming-examples/pom.xml
index 7c02f27..228d69c 100644
--- a/flink-addons/flink-streaming/flink-streaming-examples/pom.xml
+++ b/flink-addons/flink-streaming/flink-streaming-examples/pom.xml
@@ -48,7 +48,7 @@ under the License.
<version>${project.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-connectors</artifactId>
<version>${project.version}</version>
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/758de7db/flink-addons/flink-streaming/pom.xml
----------------------------------------------------------------------
diff --git a/flink-addons/flink-streaming/pom.xml b/flink-addons/flink-streaming/pom.xml
index a354df6..2fcf5a8 100644
--- a/flink-addons/flink-streaming/pom.xml
+++ b/flink-addons/flink-streaming/pom.xml
@@ -44,51 +44,31 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
<version>${project.version}</version>
- <type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-compiler</artifactId>
<version>${project.version}</version>
- <type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime</artifactId>
<version>${project.version}</version>
- <type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-clients</artifactId>
<version>${project.version}</version>
- <type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${project.version}</version>
- <type>jar</type>
</dependency>
-
- <dependency>
- <groupId>org.apache.flink</groupId>
- <artifactId>flink-tests</artifactId>
- <version>${project.version}</version>
- <type>jar</type>
- </dependency>
-
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>3.3.2</version>
- <type>jar</type>
- </dependency>
-
</dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/758de7db/flink-core/pom.xml
----------------------------------------------------------------------
diff --git a/flink-core/pom.xml b/flink-core/pom.xml
index e0c0a2f..b3ca398 100644
--- a/flink-core/pom.xml
+++ b/flink-core/pom.xml
@@ -34,6 +34,14 @@ under the License.
<packaging>jar</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>flink-shaded</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
<plugin>
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/758de7db/flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java b/flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java
index 857dada..6f5c0e9 100644
--- a/flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java
+++ b/flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java
@@ -21,12 +21,11 @@ package org.apache.flink.api.common.accumulators;
import java.io.IOException;
import java.util.Map;
+import java.util.TreeMap;
import org.apache.flink.core.memory.DataInputView;
import org.apache.flink.core.memory.DataOutputView;
-import com.google.common.collect.Maps;
-
/**
* Histogram for discrete-data. Let's you populate a histogram distributedly.
* Implemented as a Integer->Integer TreeMap, so that the entries are sorted
@@ -39,7 +38,7 @@ public class Histogram implements Accumulator<Integer, Map<Integer, Integer>> {
private static final long serialVersionUID = 1L;
- private Map<Integer, Integer> treeMap = Maps.newTreeMap();
+ private Map<Integer, Integer> treeMap = new TreeMap<Integer, Integer>();
@Override
public void add(Integer value) {
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/758de7db/flink-dist/pom.xml
----------------------------------------------------------------------
diff --git a/flink-dist/pom.xml b/flink-dist/pom.xml
index b9aee28..d39b5ac 100644
--- a/flink-dist/pom.xml
+++ b/flink-dist/pom.xml
@@ -37,6 +37,18 @@ under the License.
<!-- BINARIES -->
<dependency>
<groupId>org.apache.flink</groupId>
+ <artifactId>flink-shaded</artifactId>
+ <version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
<version>${project.version}</version>
</dependency>
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/758de7db/flink-dist/src/main/assemblies/bin.xml
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/assemblies/bin.xml b/flink-dist/src/main/assemblies/bin.xml
index 90a3bcd..3353515 100644
--- a/flink-dist/src/main/assemblies/bin.xml
+++ b/flink-dist/src/main/assemblies/bin.xml
@@ -41,37 +41,12 @@ under the License.
<excludes>
<exclude>org.apache.flink:flink-java-examples</exclude>
<exclude>org.apache.flink:flink-scala-examples</exclude>
+ <exclude>org.apache.flink:flink-streaming-examples</exclude>
<!--
<exclude>**/*javadoc*</exclude>
<exclude>**/*sources*</exclude>
-->
- <!--
- This is a hardcoded exclude-list containing all libraries that are exclusively used in pact-clients.
- The previous command did not work because it also excludes libraries that should be in lib, such as commons-io.
- -->
- <exclude>commons-fileupload:commons-fileupload</exclude>
- </excludes>
- </dependencySet>
-
- <dependencySet>
- <outputDirectory>lib_clients</outputDirectory>
- <unpack>false</unpack>
- <useTransitiveDependencies>true</useTransitiveDependencies>
- <useProjectArtifact>false</useProjectArtifact>
- <useProjectAttachments>false</useProjectAttachments>
- <useTransitiveFiltering>true</useTransitiveFiltering>
-
- <includes>
- <include>org.apache.flink:flink-clients:**</include>
- </includes>
-
- <!--
- <excludes>
- <exclude>**/*examples*.jar</exclude>
- <exclude>**/*javadoc*</exclude>
- <exclude>**/*sources*</exclude>
</excludes>
- -->
</dependencySet>
</dependencySets>
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/758de7db/flink-dist/src/main/flink-bin/bin/flink
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/flink-bin/bin/flink b/flink-dist/src/main/flink-bin/bin/flink
index 4b4cd54..1dbc4f3 100755
--- a/flink-dist/src/main/flink-bin/bin/flink
+++ b/flink-dist/src/main/flink-bin/bin/flink
@@ -27,8 +27,6 @@ if [ "$FLINK_IDENT_STRING" = "" ]; then
FLINK_IDENT_STRING="$USER"
fi
-FLINK_LIB_CLIENTS_DIR=$FLINK_ROOT_DIR/lib_clients
-
# auxiliary function to construct a lightweight classpath for the
# Flink CLI client
@@ -41,10 +39,6 @@ constructCLIClientClassPath() {
CC_CLASSPATH=$CC_CLASSPATH:$jarfile
fi
done
-
- for jarfile in $FLINK_LIB_CLIENTS_DIR/*.jar ; do
- CC_CLASSPATH=$CC_CLASSPATH:$jarfile
- done
echo $CC_CLASSPATH
}
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/758de7db/flink-dist/src/main/flink-bin/bin/webclient.sh
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/flink-bin/bin/webclient.sh b/flink-dist/src/main/flink-bin/bin/webclient.sh
index b45001a..cda41bd 100755
--- a/flink-dist/src/main/flink-bin/bin/webclient.sh
+++ b/flink-dist/src/main/flink-bin/bin/webclient.sh
@@ -30,8 +30,6 @@ if [ "$FLINK_IDENT_STRING" = "" ]; then
FLINK_IDENT_STRING="$USER"
fi
-FLINK_LIB_CLIENTS_DIR=$FLINK_ROOT_DIR/lib_clients
-
JVM_ARGS="$JVM_ARGS -Xmx512m"
# auxilliary function to construct the classpath for the webclient
@@ -44,10 +42,6 @@ constructWebclientClassPath() {
FLINK_WEBCLIENT_CLASSPATH=$FLINK_WEBCLIENT_CLASSPATH:$jarfile
fi
done
-
- for jarfile in "$FLINK_LIB_CLIENTS_DIR"/*.jar ; do
- FLINK_WEBCLIENT_CLASSPATH=$FLINK_WEBCLIENT_CLASSPATH:$jarfile
- done
echo $FLINK_WEBCLIENT_CLASSPATH
}
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/758de7db/flink-runtime/pom.xml
----------------------------------------------------------------------
diff --git a/flink-runtime/pom.xml b/flink-runtime/pom.xml
index 2a36dc8..b84a4a0 100644
--- a/flink-runtime/pom.xml
+++ b/flink-runtime/pom.xml
@@ -184,6 +184,34 @@ under the License.
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-compiler</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-runtime</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jsp-api-2.1</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jsp-2.1</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.jdt</groupId>
+ <artifactId>core</artifactId>
+ </exclusion>
</exclusions>
</dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/758de7db/flink-shaded/pom.xml
----------------------------------------------------------------------
diff --git a/flink-shaded/pom.xml b/flink-shaded/pom.xml
new file mode 100644
index 0000000..4d117ac
--- /dev/null
+++ b/flink-shaded/pom.xml
@@ -0,0 +1,80 @@
+<?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-parent</artifactId>
+ <version>0.7-incubating-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>flink-shaded</artifactId>
+ <name>flink-shaded</name>
+
+ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <!-- Relocate the entire Google Guava dependency into a different namespace -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>2.3</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <shadedArtifactAttached>false</shadedArtifactAttached>
+ <createDependencyReducedPom>true</createDependencyReducedPom>
+ <dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
+ <artifactSet>
+ <includes>
+ <include>com.google.guava:guava</include>
+ </includes>
+ </artifactSet>
+ <relocations>
+ <relocation>
+ <pattern>com.google</pattern>
+ <shadedPattern>org.apache.flink.shaded.com.google</shadedPattern>
+ </relocation>
+ </relocations>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/758de7db/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 99980ea..3c0b9b7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,6 +52,7 @@ under the License.
</scm>
<modules>
+ <module>flink-shaded</module>
<module>flink-core</module>
<module>flink-java</module>
<module>flink-scala</module>
@@ -83,13 +84,13 @@ under the License.
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
- <version>3.1</version>
+ <version>3.3.2</version>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
</dependency>
<dependency>
@@ -103,13 +104,12 @@ under the License.
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
-
+
+ <!-- global provided guava dependency, prevents guava from being packaged. we use a shaded variant instead -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>17.0</version>
- <type>jar</type>
- <scope>compile</scope>
+ <scope>provided</scope>
</dependency>
<dependency>
@@ -151,8 +151,64 @@ under the License.
<type>jar</type>
<scope>test</scope>
</dependency>
-
</dependencies>
+
+ <!-- this section defines the module versions that are used if nothing else is specified. -->
+ <dependencyManagement>
+ <dependencies>
+
+ <!-- Make sure we use a consistent guava version throughout the project -->
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>17.0</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <!-- Make sure we use a consistent jetty version throughout the project -->
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <version>8.0.0.M1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-security</artifactId>
+ <version>8.0.0.M1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
+ <version>8.0.0.M1</version>
+ </dependency>
+
+ <!-- Make sure we use a consistent avro version throughout the project -->
+ <dependency>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro</artifactId>
+ <version>1.7.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro-mapred</artifactId>
+ <version>1.7.6</version>
+ </dependency>
+
+ <!-- Managed dependency required for HBase in flink-hbase -->
+ <dependency>
+ <groupId>org.javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.18.1-GA</version>
+ </dependency>
+
+ <!-- stax is pulled in different versions by different transitive dependencies-->
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
<profiles>
<profile>
@@ -359,45 +415,6 @@ under the License.
</profile>
</profiles>
- <dependencyManagement>
- <!-- this section defines the module versions that are used if nothing else is specified. -->
- <dependencies>
- <!-- Make sure we use a consistent jetty version throughout the project -->
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <version>8.0.0.M1</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-security</artifactId>
- <version>8.0.0.M1</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlet</artifactId>
- <version>8.0.0.M1</version>
- </dependency>
- <!-- Make sure we use a consistent avro version throughout the project -->
- <dependency>
- <groupId>org.apache.avro</groupId>
- <artifactId>avro</artifactId>
- <version>1.7.6</version>
- </dependency>
- <dependency>
- <groupId>org.apache.avro</groupId>
- <artifactId>avro-mapred</artifactId>
- <version>1.7.6</version>
- </dependency>
- <!-- Managed dependency required for HBase in pact-hbase -->
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>3.18.1-GA</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<reporting>
<plugins>
<!-- execution of Unit Tests -->
@@ -424,33 +441,6 @@ under the License.
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>2.3</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <createDependencyReducedPom>false</createDependencyReducedPom>
- <artifactSet>
- <includes>
- <include>com.google.guava:guava</include>
- </includes>
- </artifactSet>
- <relocations>
- <relocation>
- <pattern>com.google</pattern>
- <shadedPattern>org.apache.flink.shaded.com.google</shadedPattern>
- </relocation>
- </relocations>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version><!--$NO-MVN-MAN-VER$-->
@@ -463,6 +453,37 @@ under the License.
</archive>
</configuration>
</plugin>
+
+ <!-- Relocate references to Google Guava classes into a different namespace -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>2.3</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <shadedArtifactAttached>false</shadedArtifactAttached>
+ <createDependencyReducedPom>false</createDependencyReducedPom>
+ <artifactSet>
+ <includes>
+ <include>org.apache.flink:${project.artifact}</include>
+ </includes>
+ </artifactSet>
+ <relocations>
+ <relocation>
+ <pattern>com.google</pattern>
+ <shadedPattern>org.apache.flink.shaded.com.google</shadedPattern>
+ </relocation>
+ </relocations>
+ </configuration>
+ </plugin>
+
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
@@ -531,6 +552,7 @@ under the License.
<exclude>tools/maven/checkstyle.xml</exclude>
<exclude>tools/maven/scalastyle-config.xml</exclude>
<exclude>**/scalastyle-output.xml</exclude>
+ <exclude>**/dependency-reduced-pom.xml</exclude>
<exclude>tools/maven/suppressions.xml</exclude>
<exclude>**/pom.xml</exclude>
<exclude>**/pom.hadoop2.xml</exclude>