Repository: flink Updated Branches: refs/heads/master 9c0a45398 -> d11e09108
[quickstarts] Remove redundant old fat jar assembly file. Adjusts the comments inside the POM file to encourage use ov "mvn clean package", rather than "mvn clean install". Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/b6319ea2 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/b6319ea2 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/b6319ea2 Branch: refs/heads/master Commit: b6319ea2e2bbad8fcb2508113ac9e0c365028b46 Parents: 1aba942 Author: Stephan Ewen <se...@apache.org> Authored: Thu Mar 26 18:52:14 2015 +0100 Committer: Stephan Ewen <se...@apache.org> Committed: Fri Mar 27 20:15:20 2015 +0100 ---------------------------------------------------------------------- .../main/resources/archetype-resources/pom.xml | 18 ++++++--- .../main/resources/archetype-resources/pom.xml | 20 +++++++--- .../src/assembly/flink-fat-jar.xml | 39 -------------------- 3 files changed, 26 insertions(+), 51 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/b6319ea2/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml index efd2016..703986c 100644 --- a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml +++ b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml @@ -48,22 +48,28 @@ under the License. <!-- - Execute - mvn clean install -Pbuild-jar + Execute "mvn clean package -Pbuild-jar" to build a jar file out of this project! - How to use the Flink Quickstart pom: + a) Adding new dependencies: You can add dependencies to the list below. - Please check if the maven-shade-plugin below is filtering out your dependency and remove the exclude from there. + Please check if the maven-shade-plugin below is filtering out your dependency + and remove the exclude from there. b) Build a jar for running on the cluster: There are two options for creating a jar from this project - b.1) "mvn clean install" -> this will create a fat jar which contains all dependencies necessary for running the jar created by this pom in a cluster. The "maven-shade-plugin" excludes everything that is provided on a running Flink cluster. - b.2) "mvn clean install -Pbuild-jar" -> This will also create a fat-jar, but with much nicer dependency exclusion handling. This approach is preferred and leads to much cleaner jar files. + b.1) "mvn clean package" -> this will create a fat jar which contains all + dependencies necessary for running the jar created by this pom in a cluster. + The "maven-shade-plugin" excludes everything that is provided on a running Flink cluster. + + b.2) "mvn clean package -Pbuild-jar" -> This will also create a fat-jar, but with much + nicer dependency exclusion handling. This approach is preferred and leads to + much cleaner jar files. --> + <dependencies> <dependency> <groupId>org.apache.flink</groupId> http://git-wip-us.apache.org/repos/asf/flink/blob/b6319ea2/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml index 76c1688..1e4d87a 100644 --- a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml +++ b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml @@ -49,22 +49,28 @@ under the License. <!-- - Execute - mvn clean install -Pbuild-jar + Execute "mvn clean package -Pbuild-jar" to build a jar file out of this project! - How to use the Flink Quickstart pom: + a) Adding new dependencies: You can add dependencies to the list below. - Please check if the maven-shade-plugin below is filtering out your dependency and remove the exclude from there. + Please check if the maven-shade-plugin below is filtering out your dependency + and remove the exclude from there. b) Build a jar for running on the cluster: There are two options for creating a jar from this project - b.1) "mvn clean install" -> this will create a fat jar which contains all dependencies necessary for running the jar created by this pom in a cluster. The "maven-shade-plugin" excludes everything that is provided on a running Flink cluster. - b.2) "mvn clean install -Pbuild-jar" -> This will also create a fat-jar, but with much nicer dependency exclusion handling. This approach is preferred and leads to much cleaner jar files. + b.1) "mvn clean package" -> this will create a fat jar which contains all + dependencies necessary for running the jar created by this pom in a cluster. + The "maven-shade-plugin" excludes everything that is provided on a running Flink cluster. + + b.2) "mvn clean package -Pbuild-jar" -> This will also create a fat-jar, but with much + nicer dependency exclusion handling. This approach is preferred and leads to + much cleaner jar files. --> + <dependencies> <dependency> <groupId>org.apache.flink</groupId> @@ -121,12 +127,14 @@ under the License. <exclude>org.apache.flink:flink-scala-examples</exclude> <exclude>org.apache.flink:flink-streaming-examples</exclude> <exclude>org.apache.flink:flink-streaming-core</exclude> + <!-- Also exclude very big transitive dependencies of Flink WARNING: You have to remove these excludes if your code relies on other versions of these dependencies. --> + <exclude>org.scala-lang:scala-library</exclude> <exclude>org.scala-lang:scala-compiler</exclude> <exclude>org.scala-lang:scala-reflect</exclude> http://git-wip-us.apache.org/repos/asf/flink/blob/b6319ea2/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/assembly/flink-fat-jar.xml ---------------------------------------------------------------------- diff --git a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/assembly/flink-fat-jar.xml b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/assembly/flink-fat-jar.xml deleted file mode 100644 index 2819b81..0000000 --- a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/assembly/flink-fat-jar.xml +++ /dev/null @@ -1,39 +0,0 @@ -<!-- - ~ 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.2" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> - <id>flink-fat-jar</id> - <formats> - <format>jar</format> - </formats> - <includeBaseDirectory>false</includeBaseDirectory> - <dependencySets> - <dependencySet> - <outputDirectory>/</outputDirectory> - <useProjectArtifact>true</useProjectArtifact> - <excludes> - <exclude>org.apache.flink:*</exclude> - </excludes> - <useTransitiveFiltering>true</useTransitiveFiltering> - <unpack>true</unpack> - <scope>runtime</scope> - </dependencySet> - </dependencySets> -</assembly> \ No newline at end of file