You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by al...@apache.org on 2017/09/27 11:09:25 UTC
[20/20] flink git commit: [FLINK-2268] Allow not including the Hadoop
uber jar
[FLINK-2268] Allow not including the Hadoop uber jar
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/2b96c8d7
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/2b96c8d7
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/2b96c8d7
Branch: refs/heads/master
Commit: 2b96c8d74b66228484e53a58907157086aef4eeb
Parents: a477db3
Author: Aljoscha Krettek <al...@gmail.com>
Authored: Thu Aug 24 15:30:17 2017 +0200
Committer: Aljoscha Krettek <al...@gmail.com>
Committed: Wed Sep 27 10:05:11 2017 +0200
----------------------------------------------------------------------
flink-dist/pom.xml | 33 +++++++++++++++++++++
flink-dist/src/main/assemblies/bin.xml | 8 ------
flink-dist/src/main/assemblies/hadoop.xml | 40 ++++++++++++++++++++++++++
3 files changed, 73 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/2b96c8d7/flink-dist/pom.xml
----------------------------------------------------------------------
diff --git a/flink-dist/pom.xml b/flink-dist/pom.xml
index 837b46f..ffad448 100644
--- a/flink-dist/pom.xml
+++ b/flink-dist/pom.xml
@@ -358,6 +358,39 @@ under the License.
<profiles>
<profile>
+ <!-- Copies that shaded Hadoop uber jar to the dist folder. -->
+ <id>include-hadoop</id>
+ <activation>
+ <property>
+ <name>!withoutHadoop</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>hadoop</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assemblies/hadoop.xml</descriptor>
+ </descriptors>
+ <finalName>flink-${project.version}-bin</finalName>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<!-- Creates/Removes the 'build-target' symlink in the root directory (only Unix systems) -->
<id>symlink-build-target</id>
<activation>
http://git-wip-us.apache.org/repos/asf/flink/blob/2b96c8d7/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 c35e9c3..8b4526d 100644
--- a/flink-dist/src/main/assemblies/bin.xml
+++ b/flink-dist/src/main/assemblies/bin.xml
@@ -54,14 +54,6 @@ under the License.
<fileMode>0644</fileMode>
</file>
- <!-- copy the Hadoop uber jar -->
- <file>
- <source>../flink-shaded-hadoop/flink-shaded-hadoop2-uber/target/flink-shaded-hadoop2-uber-${project.version}.jar</source>
- <outputDirectory>lib/</outputDirectory>
- <destName>flink-shaded-hadoop2-uber-${project.version}.jar</destName>
- <fileMode>0644</fileMode>
- </file>
-
<!-- copy the config file -->
<file>
<source>src/main/resources/flink-conf.yaml</source>
http://git-wip-us.apache.org/repos/asf/flink/blob/2b96c8d7/flink-dist/src/main/assemblies/hadoop.xml
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/assemblies/hadoop.xml b/flink-dist/src/main/assemblies/hadoop.xml
new file mode 100644
index 0000000..27c562e
--- /dev/null
+++ b/flink-dist/src/main/assemblies/hadoop.xml
@@ -0,0 +1,40 @@
+<!--
+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.
+-->
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>hadoop</id>
+ <formats>
+ <format>dir</format>
+ </formats>
+
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <baseDirectory>flink-${project.version}</baseDirectory>
+
+ <files>
+ <!-- copy the Hadoop uber jar -->
+ <file>
+ <source>../flink-shaded-hadoop/flink-shaded-hadoop2-uber/target/flink-shaded-hadoop2-uber-${project.version}.jar</source>
+ <outputDirectory>lib/</outputDirectory>
+ <destName>flink-shaded-hadoop2-uber-${project.version}.jar</destName>
+ <fileMode>0644</fileMode>
+ </file>
+ </files>
+</assembly>