From ae423e1d1e591d54cd4da32ffe8835b5fea05ed0 Mon Sep 17 00:00:00 2001 From: Stephan Ewen Date: Thu, 11 May 2017 17:00:03 +0200 Subject: [PATCH] [FLINK-6514] [build] Create a proper separate Hadoop uber jar for 'flink-dist' assembly This closes #3876 --- flink-dist/src/main/assemblies/bin.xml | 8 +- flink-dist/src/main/assemblies/opt.xml | 7 - .../flink-shaded-hadoop2-uber/pom.xml | 129 ++++++++++++++++++ flink-shaded-hadoop/pom.xml | 38 ++++-- 4 files changed, 157 insertions(+), 25 deletions(-) create mode 100644 flink-shaded-hadoop/flink-shaded-hadoop2-uber/pom.xml diff --git a/flink-dist/src/main/assemblies/bin.xml b/flink-dist/src/main/assemblies/bin.xml index cefb477297cdc..45fd79238f478 100644 --- a/flink-dist/src/main/assemblies/bin.xml +++ b/flink-dist/src/main/assemblies/bin.xml @@ -33,9 +33,9 @@ under the License. lib false - true false false + true true @@ -54,11 +54,11 @@ under the License. 0644 - + - ../flink-shaded-hadoop/flink-shaded-hadoop2/target/flink-shaded-hadoop2-${project.version}.jar + ../flink-shaded-hadoop/flink-shaded-hadoop2-uber/target/flink-shaded-hadoop2-uber-${project.version}.jar lib/ - flink-shaded-hadoop2-${project.version}.jar + flink-shaded-hadoop2-uber-${project.version}.jar 0644 diff --git a/flink-dist/src/main/assemblies/opt.xml b/flink-dist/src/main/assemblies/opt.xml index 23846be45150d..bb04d286d3e39 100644 --- a/flink-dist/src/main/assemblies/opt.xml +++ b/flink-dist/src/main/assemblies/opt.xml @@ -110,12 +110,5 @@ flink-metrics-datadog-${project.version}.jar 0644 - - - ../flink-shaded-hadoop/flink-shaded-hadoop2/target/flink-shaded-hadoop2-${project.version}.jar - opt/ - flink-shaded-hadoop2-${project.version}.jar - 0644 - diff --git a/flink-shaded-hadoop/flink-shaded-hadoop2-uber/pom.xml b/flink-shaded-hadoop/flink-shaded-hadoop2-uber/pom.xml new file mode 100644 index 0000000000000..1ccff32b618c3 --- /dev/null +++ b/flink-shaded-hadoop/flink-shaded-hadoop2-uber/pom.xml @@ -0,0 +1,129 @@ + + + + + + 4.0.0 + + + org.apache.flink + flink-shaded-hadoop + 1.4-SNAPSHOT + .. + + + flink-shaded-hadoop2-uber + flink-shaded-hadoop2-uber + + jar + + + + + + org.apache.flink + flink-shaded-hadoop2 + ${project.version} + + + + + + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + shade-hadoop + package + + shade + + + false + true + ${project.basedir}/target/dependency-reduced-pom.xml + true + + + + + * + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + *:* + + + org.slf4j:* + log4j:* + + + + + + + + + + + + + + + + + + + + + diff --git a/flink-shaded-hadoop/pom.xml b/flink-shaded-hadoop/pom.xml index 1d957ab3b220e..a549ae99ee1ca 100644 --- a/flink-shaded-hadoop/pom.xml +++ b/flink-shaded-hadoop/pom.xml @@ -36,15 +36,31 @@ under the License. flink-shaded-hadoop2 + flink-shaded-hadoop2-uber - + com.google.code.findbugs jsr305 provided + + org.slf4j + slf4j-api + provided + + + org.apache.zookeeper + zookeeper + provided + + + org.apache.avro + avro + provided + @@ -92,24 +108,14 @@ under the License. META-INF/*.RSA - - org.slf4j:* - - org/slf4j/impl/** - - - - - log4j:* - - org/apache/log4j/** - - + + + @@ -127,6 +133,10 @@ under the License. org.apache.httpcomponents:* commons-httpclient:commons-httpclient + + org.slf4j:* + log4j:* +