Skip to content

Commit

Permalink
[FLINK-2268] Allow not including the Hadoop uber jar
Browse files Browse the repository at this point in the history
  • Loading branch information
aljoscha committed Sep 27, 2017
1 parent a477db3 commit 2b96c8d
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 8 deletions.
33 changes: 33 additions & 0 deletions flink-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,39 @@ under the License.
</dependencies>

<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>
Expand Down
8 changes: 0 additions & 8 deletions flink-dist/src/main/assemblies/bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
40 changes: 40 additions & 0 deletions flink-dist/src/main/assemblies/hadoop.xml
Original file line number Diff line number Diff line change
@@ -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:https://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:https://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http:https://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http:https://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>

0 comments on commit 2b96c8d

Please sign in to comment.