You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by rm...@apache.org on 2015/09/24 09:50:46 UTC

[1/2] flink git commit: [FLINK-2200] [build system] Add scala version suffix to artifact id for Scala 2.11

Repository: flink
Updated Branches:
  refs/heads/travis_test [created] 5dc2756d1


[FLINK-2200] [build system] Add scala version suffix to artifact id for Scala 2.11


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/b68f05d9
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/b68f05d9
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/b68f05d9

Branch: refs/heads/travis_test
Commit: b68f05d9c0fa598133d8cab2e4665d91be5ef161
Parents: 717d54c
Author: Chiwan Park <ch...@apache.org>
Authored: Fri Jul 3 02:28:51 2015 +0900
Committer: Robert Metzger <rm...@apache.org>
Committed: Wed Sep 23 21:42:13 2015 +0200

----------------------------------------------------------------------
 docs/_config.yml                                |  3 -
 docs/apis/programming_guide.md                  | 12 ++-
 docs/index.md                                   |  6 +-
 docs/setup/building.md                          |  4 +-
 flink-contrib/flink-operator-stats/pom.xml      |  2 +-
 flink-dist/src/main/assemblies/bin.xml          | 12 +--
 .../main/resources/archetype-resources/pom.xml  |  2 +-
 .../main/resources/archetype-resources/pom.xml  |  2 +-
 flink-quickstart/pom.xml                        |  2 +-
 flink-runtime-web/pom.xml                       |  2 +-
 flink-staging/flink-gelly-scala/pom.xml         |  2 +-
 tools/change-scala-version.sh                   | 81 ++++++++++++++++++++
 12 files changed, 109 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/b68f05d9/docs/_config.yml
----------------------------------------------------------------------
diff --git a/docs/_config.yml b/docs/_config.yml
index 059340d..ae69328 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -31,9 +31,6 @@ version: "0.10-SNAPSHOT"
 version_hadoop1: "0.10-hadoop1-SNAPSHOT"
 version_short: "0.10" # Used for the top navbar w/o snapshot suffix
 
-# This is the Scala version we use in this version
-scala_version: "2.10"
-
 # Some commonly linked pages (this was more important to have as a variable
 # during incubator; by now it should also be fine to hardcode these.)
 website_url: "http://flink.apache.org"

http://git-wip-us.apache.org/repos/asf/flink/blob/b68f05d9/docs/apis/programming_guide.md
----------------------------------------------------------------------
diff --git a/docs/apis/programming_guide.md b/docs/apis/programming_guide.md
index a9c7880..ff831a9 100644
--- a/docs/apis/programming_guide.md
+++ b/docs/apis/programming_guide.md
@@ -136,7 +136,7 @@ mvn archetype:generate /
 </div>
 </div>
 
-The archetypes are working for stable releases and preview versions (`-SNAPSHOT`)
+The archetypes are working for stable releases and preview versions (`-SNAPSHOT`).
 
 If you want to add Flink to an existing Maven project, add the following entry to your
 *dependencies* section in the *pom.xml* file of your project:
@@ -187,7 +187,17 @@ that creates the type information for Flink operations.
 </div>
 </div>
 
+#### Scala Dependency Versions
 
+Because Scala 2.10 binary is not compatible with Scala 2.11 binary, we provide multiple artifacts
+to support both Scala versions.
+
+Starting from the 0.10 line, we cross-build all Flink modules for both 2.10 and 2.11. If you want
+to run your program on Flink with Scala 2.11, you need to add a `_2.11` suffix to the `artifactId`
+values of the Flink modules in your dependencies section.
+
+If you are looking for building Flink with Scala 2.11, please check
+[build guide](../setup/building.html#build-flink-for-scala-211).
 
 #### Hadoop Dependency Versions
 

http://git-wip-us.apache.org/repos/asf/flink/blob/b68f05d9/docs/index.md
----------------------------------------------------------------------
diff --git a/docs/index.md b/docs/index.md
index f03ac49..80ed836 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -64,9 +64,11 @@ You can download the latest pre-built snapshot version from the [downloads]({{ s
 
 The Scala API uses Scala {{ site.scala_version }}. Please make sure to use a compatible version.
 
+Basically, the Scala API uses Scala 2.10. But you can use the API with Scala 2.11. To use Flink with
+Scala 2.11, please check [build guide](/setup/building.html#build-flink-for-scala-211)
+and [programming guide](/apis/programming_guide.html#scala-dependency-versions).
+
 
 ## Flink Architecture
 
 <img src="fig/process_model.svg" width="100%" alt="Flink Process Model">
-
-

http://git-wip-us.apache.org/repos/asf/flink/blob/b68f05d9/docs/setup/building.md
----------------------------------------------------------------------
diff --git a/docs/setup/building.md b/docs/setup/building.md
index ce59761..2f51da6 100644
--- a/docs/setup/building.md
+++ b/docs/setup/building.md
@@ -96,7 +96,6 @@ So if you are building Flink for Hadoop `2.0.0-alpha`, use the following command
 -P!include-yarn -Dhadoop.version=2.0.0-alpha
 ~~~
 
-
 ## Build Flink for a specific Scala Version
 
 **Note:** Users that purely use the Java APIs and libraries can ignore this section.
@@ -110,11 +109,10 @@ By default, Flink is built with Scala *2.10*. To build Flink with Scala *2.11*,
 mvn clean install -DskipTests -Dscala-2.11
 ~~~
 
-
 To build against custom Scala versions, you need to supply the *language version* and the *binary version* as properties to the build:
 
 ~~~bash
-mvn clean install -DskipTests -Dscala.version=2.11.4 -Dscala.binary.version=2.11
+mvn clean install -DskipTests -Dscala-2.11 -Dscala.version=2.11.4 -Dscala.binary.version=2.11
 ~~~
 
 Flink is developed against Scala *2.10*, and tested additionally against Scala *2.11*. These two versions are known to be compatible. Earlier versions (like Scala *2.9*) are *not* compatible.

http://git-wip-us.apache.org/repos/asf/flink/blob/b68f05d9/flink-contrib/flink-operator-stats/pom.xml
----------------------------------------------------------------------
diff --git a/flink-contrib/flink-operator-stats/pom.xml b/flink-contrib/flink-operator-stats/pom.xml
index fb2f3e6..d85e1a6 100644
--- a/flink-contrib/flink-operator-stats/pom.xml
+++ b/flink-contrib/flink-operator-stats/pom.xml
@@ -64,4 +64,4 @@ under the License.
         </dependency>
     </dependencies>
 
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/flink/blob/b68f05d9/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 960fd30..270fb17 100644
--- a/flink-dist/src/main/assemblies/bin.xml
+++ b/flink-dist/src/main/assemblies/bin.xml
@@ -155,12 +155,12 @@ under the License.
 				<include>*.jar</include>
 			</includes>
 			<excludes>
-				<exclude>flink-java-examples-${project.version}.jar</exclude>
-				<exclude>original-flink-java-examples-${project.version}.jar</exclude>
-				<exclude>flink-java-examples-${project.version}-sources.jar</exclude>
-				<exclude>flink-java-examples-${project.version}-tests.jar</exclude>
-				<exclude>flink-java-examples-${project.version}-javadoc.jar</exclude>
-				<exclude>flink-java-examples-${project.version}-*.jar</exclude>
+				<exclude>flink-java-examples*-${project.version}.jar</exclude>
+				<exclude>original-flink-java-examples*-${project.version}.jar</exclude>
+				<exclude>flink-java-examples*-${project.version}-sources.jar</exclude>
+				<exclude>flink-java-examples*-${project.version}-tests.jar</exclude>
+				<exclude>flink-java-examples*-${project.version}-javadoc.jar</exclude>
+				<exclude>flink-java-examples*-${project.version}-*.jar</exclude>
 			</excludes>
 		</fileSet>
 

http://git-wip-us.apache.org/repos/asf/flink/blob/b68f05d9/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 49bfb76..8697e53 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
@@ -96,7 +96,7 @@ under the License.
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-shade-plugin</artifactId>
-				<version>2.3</version>
+				<version>2.4.1</version>
 				<executions>
 					<!-- Run shade goal on package phase -->
 					<execution>

http://git-wip-us.apache.org/repos/asf/flink/blob/b68f05d9/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 f01d82d..3c2345f 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
@@ -100,7 +100,7 @@ under the License.
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-shade-plugin</artifactId>
-				<version>2.3</version>
+				<version>2.4.1</version>
 				<executions>
 					<!-- Run shade goal on package phase -->
 					<execution>

http://git-wip-us.apache.org/repos/asf/flink/blob/b68f05d9/flink-quickstart/pom.xml
----------------------------------------------------------------------
diff --git a/flink-quickstart/pom.xml b/flink-quickstart/pom.xml
index c5f55df..0a3fcc2 100644
--- a/flink-quickstart/pom.xml
+++ b/flink-quickstart/pom.xml
@@ -84,4 +84,4 @@ under the License.
             </modules>
         </profile>
     </profiles>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/flink/blob/b68f05d9/flink-runtime-web/pom.xml
----------------------------------------------------------------------
diff --git a/flink-runtime-web/pom.xml b/flink-runtime-web/pom.xml
index 804e6da..afe71b4 100644
--- a/flink-runtime-web/pom.xml
+++ b/flink-runtime-web/pom.xml
@@ -90,7 +90,7 @@ under the License.
 			<artifactId>guava</artifactId>
 			<version>${guava.version}</version>
 		</dependency>
-		
+
 	</dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/flink/blob/b68f05d9/flink-staging/flink-gelly-scala/pom.xml
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly-scala/pom.xml b/flink-staging/flink-gelly-scala/pom.xml
index 390dbb8..18c0516 100644
--- a/flink-staging/flink-gelly-scala/pom.xml
+++ b/flink-staging/flink-gelly-scala/pom.xml
@@ -195,4 +195,4 @@ under the License.
         </plugins>
     </build>
 
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/flink/blob/b68f05d9/tools/change-scala-version.sh
----------------------------------------------------------------------
diff --git a/tools/change-scala-version.sh b/tools/change-scala-version.sh
new file mode 100755
index 0000000..ff38711
--- /dev/null
+++ b/tools/change-scala-version.sh
@@ -0,0 +1,81 @@
+#!/usr/bin/env bash
+
+#
+# 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.
+#
+
+# This shell script is from Apache Spark with some modification.
+
+set -e
+
+VALID_VERSIONS=( 2.10 2.11 )
+
+usage() {
+  echo "Usage: $(basename $0) [-h|--help] <scala version to be used>
+where :
+  -h| --help Display this help text
+  valid scala version values : ${VALID_VERSIONS[*]}
+" 1>&2
+  exit 1
+}
+
+if [[ ($# -ne 1) || ( $1 == "--help") ||  $1 == "-h" ]]; then
+  usage
+fi
+
+TO_VERSION=$1
+
+check_scala_version() {
+  for i in ${VALID_VERSIONS[*]}; do [ $i = "$1" ] && return 0; done
+  echo "Invalid Scala version: $1. Valid versions: ${VALID_VERSIONS[*]}" 1>&2
+  exit 1
+}
+
+check_scala_version "$TO_VERSION"
+
+if [ $TO_VERSION = "2.11" ]; then
+  FROM_SUFFIX=""
+  TO_SUFFIX="_2.11"
+else
+  FROM_SUFFIX="_2\.11"
+  TO_SUFFIX=""
+fi
+
+sed_i() {
+  sed -e "$1" "$2" > "$2.tmp" && mv "$2.tmp" "$2"
+}
+
+export -f sed_i
+
+echo "sed_i 's/\(artifactId>flink.*'$FROM_SUFFIX'\)<\/artifactId>/\1'$TO_SUFFIX'<\/artifactId>/g' {}";
+
+BASEDIR=$(dirname $0)/..
+find "$BASEDIR" -name 'pom.xml' -not -path '*target*' -print \
+  -exec bash -c "sed_i 's/\(artifactId>flink.*\)'$FROM_SUFFIX'<\/artifactId>/\1'$TO_SUFFIX'<\/artifactId>/g' {}" \;
+
+# fix for examples
+find "$BASEDIR/flink-examples/flink-java-examples" -name 'pom.xml' -not -path '*target*' -print \
+  -exec bash -c "sed_i 's/\(<copy file=\".*flink-java-examples\)'$FROM_SUFFIX'/\1'$TO_SUFFIX'/g' {}" \;
+
+# fix for quickstart
+find "$BASEDIR/flink-quickstart" -name 'pom.xml' -not -path '*target*' -print \
+  -exec bash -c "sed_i 's/\(<exclude>org\.apache\.flink:flink-.*\)'$FROM_SUFFIX'<\/exclude>/\1'$TO_SUFFIX'<\/exclude>/g' {}" \;
+
+# fix for flink-dist
+find "$BASEDIR/flink-dist" -name 'bin.xml' -not -path '*target*' -print \
+  -exec bash -c "sed_i 's/\(<source>.*flink-dist\)'$FROM_SUFFIX'/\1'$TO_SUFFIX'/g' {}" \;
+find "$BASEDIR/flink-dist" -name 'bin.xml' -not -path '*target*' -print \
+  -exec bash -c "sed_i 's/\(<include>org\.apache\.flink:flink-.*\)'$FROM_SUFFIX'<\/include>/\1'$TO_SUFFIX'<\/include>/g' {}" \;


[2/2] flink git commit: [FLINK-2200] [build system] Deploy Flink 2.11 with every build (nightly)

Posted by rm...@apache.org.
[FLINK-2200] [build system] Deploy Flink 2.11 with every build (nightly)


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/5dc2756d
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/5dc2756d
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/5dc2756d

Branch: refs/heads/travis_test
Commit: 5dc2756d1788b12cd97798667d11fe19e795e723
Parents: b68f05d
Author: Robert Metzger <rm...@apache.org>
Authored: Wed Sep 23 15:02:24 2015 +0200
Committer: Robert Metzger <rm...@apache.org>
Committed: Thu Sep 24 09:49:08 2015 +0200

----------------------------------------------------------------------
 flink-shaded-hadoop/pom.xml   |  2 +-
 pom.xml                       |  5 +++
 tools/change-scala-version.sh | 24 +++++++++++
 tools/deploy_to_maven.sh      | 86 +++++++++++++++++++++-----------------
 4 files changed, 78 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/5dc2756d/flink-shaded-hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/flink-shaded-hadoop/pom.xml b/flink-shaded-hadoop/pom.xml
index 6e75b25..a99f3c4 100644
--- a/flink-shaded-hadoop/pom.xml
+++ b/flink-shaded-hadoop/pom.xml
@@ -35,7 +35,7 @@ under the License.
 	<packaging>pom</packaging>
 
 	<modules>
-		<module>${shading-artifact.name}</module>
+		<module>${shading-artifact-module.name}</module>
 	</modules>
 
 	<profiles>

http://git-wip-us.apache.org/repos/asf/flink/blob/5dc2756d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 6603e81..6f1a137 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,7 +71,10 @@ under the License.
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+		<!-- Mutable name of the hadoop shading artifact. The module name can contain a scala version suffix. -->
 		<shading-artifact.name>error</shading-artifact.name>
+		<!-- The shading artifact module name can be used as a module name. it does not get a scala version suffix -->
+		<shading-artifact-module.name>error</shading-artifact-module.name>
 		<hadoop-one.version>1.2.1</hadoop-one.version>
 		<hadoop-two.version>2.3.0</hadoop-two.version>
 		<!-- Need to use a user property here because the surefire/failsafe
@@ -377,6 +380,7 @@ under the License.
 			<properties>
 				<hadoop.version>${hadoop-one.version}</hadoop.version>
 				<shading-artifact.name>flink-shaded-hadoop1</shading-artifact.name>
+				<shading-artifact-module.name>flink-shaded-hadoop1</shading-artifact-module.name>
 			</properties>
 		</profile>
 
@@ -392,6 +396,7 @@ under the License.
 			<properties>
 				<hadoop.version>${hadoop-two.version}</hadoop.version>
 				<shading-artifact.name>flink-shaded-hadoop2</shading-artifact.name>
+				<shading-artifact-module.name>flink-shaded-hadoop2</shading-artifact-module.name>
 			</properties>
 			<modules>
 				<module>flink-yarn</module>

http://git-wip-us.apache.org/repos/asf/flink/blob/5dc2756d/tools/change-scala-version.sh
----------------------------------------------------------------------
diff --git a/tools/change-scala-version.sh b/tools/change-scala-version.sh
index ff38711..2c124a9 100755
--- a/tools/change-scala-version.sh
+++ b/tools/change-scala-version.sh
@@ -79,3 +79,27 @@ find "$BASEDIR/flink-dist" -name 'bin.xml' -not -path '*target*' -print \
   -exec bash -c "sed_i 's/\(<source>.*flink-dist\)'$FROM_SUFFIX'/\1'$TO_SUFFIX'/g' {}" \;
 find "$BASEDIR/flink-dist" -name 'bin.xml' -not -path '*target*' -print \
   -exec bash -c "sed_i 's/\(<include>org\.apache\.flink:flink-.*\)'$FROM_SUFFIX'<\/include>/\1'$TO_SUFFIX'<\/include>/g' {}" \;
+
+
+if [ "$TO_VERSION" == "2.11" ]; then
+  # set the profile activation to !scala-2.11 in parent pom, so that it activates by default
+  bash -c "sed_i 's/<name>scala-2.11<\/name>/<name>!scala-2.11<\/name>/g' $BASEDIR/pom.xml" \;
+  # set the profile activation in all sub modules to scala-2.11 (so that they are disabled by default)
+  find $BASEDIR/flink-* -name 'pom.xml' -not -path '*target*' -print \
+    -exec bash -c "sed_i 's/<name>!scala-2.11<\/name>/<name>scala-2.11<\/name>/g' {}" \;
+
+  # set the name of the shading artifact properly
+  bash -c "sed_i 's/\(shading-artifact.name>flink-shaded[a-z0-9\-]*\)'$FROM_SUFFIX'<\/shading-artifact.name>/\1'$TO_SUFFIX'<\/shading-artifact.name>/g' $BASEDIR/pom.xml" \;
+fi
+
+if [ "$TO_VERSION" == "2.10" ]; then
+  # do the opposite as above
+  bash -c "sed_i 's/<name>!scala-2.11<\/name>/<name>scala-2.11<\/name>/g' $BASEDIR/pom.xml" \;
+  # also for the other files
+  find $BASEDIR/flink-* -name 'pom.xml' -not -path '*target*' -print \
+    -exec bash -c "sed_i 's/<name>scala-2.11<\/name>/<name>!scala-2.11<\/name>/g' {}" \;
+
+  # unset shading artifact name
+  bash -c "sed_i 's/\(shading-artifact.name>flink-shaded[a-z0-9\-]*\)'$FROM_SUFFIX'<\/shading-artifact.name>/\1'$TO_SUFFIX'<\/shading-artifact.name>/g' $BASEDIR/pom.xml" \;
+fi
+

http://git-wip-us.apache.org/repos/asf/flink/blob/5dc2756d/tools/deploy_to_maven.sh
----------------------------------------------------------------------
diff --git a/tools/deploy_to_maven.sh b/tools/deploy_to_maven.sh
index e51e0aa..ffe966f 100755
--- a/tools/deploy_to_maven.sh
+++ b/tools/deploy_to_maven.sh
@@ -28,12 +28,6 @@
 # 5. Nothing
 
 
-echo "install lifecylce mapping fake plugin"
-git clone https://github.com/mfriedenhagen/dummy-lifecycle-mapping-plugin.git
-cd dummy-lifecycle-mapping-plugin
-mvn -B install
-cd ..
-
 function getVersion() {
 	here="`dirname \"$0\"`"              # relative
 	here="`( cd \"$here\" && pwd )`"  # absolutized and normalized
@@ -47,57 +41,73 @@ function getVersion() {
 	echo `mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -E '^([0-9]+.[0-9]+(.[0-9]+)?(-[a-zA-Z0-9]+)?)$'`
 }
 
-pwd
-
-# this will take a while
-CURRENT_FLINK_VERSION=`getVersion`
-if [[ "$CURRENT_FLINK_VERSION" == *-SNAPSHOT ]]; then
-	CURRENT_FLINK_VERSION_HADOOP1=${CURRENT_FLINK_VERSION/-SNAPSHOT/-hadoop1-SNAPSHOT}
-else
-	CURRENT_FLINK_VERSION_HADOOP1="$CURRENT_FLINK_VERSION-hadoop1"
-fi
+function deploy_to_s3() {
+	CURRENT_FLINK_VERSION=$1
+	HD=$2
+
+	echo "Deplyoing flink version $CURRENT_FLINK_VERSION (hadoop=$HD) to s3:"
+	mkdir flink-$CURRENT_FLINK_VERSION
+	cp -r flink-dist/target/flink-*-bin/flink-$CURRENT_FLINK_VERSION*/* flink-$CURRENT_FLINK_VERSION/
+	tar -czf flink-$CURRENT_FLINK_VERSION-bin-$HD.tgz flink-$CURRENT_FLINK_VERSION
+	travis-artifacts upload --path flink-$CURRENT_FLINK_VERSION-bin-$HD.tgz   --target-path / 
+	# delete files again
+	rm -rf flink-$CURRENT_FLINK_VERSION
+	rm flink-$CURRENT_FLINK_VERSION-bin-$HD.tgz
+}
 
-echo "detected current version as: '$CURRENT_FLINK_VERSION' ; hadoop1: $CURRENT_FLINK_VERSION_HADOOP1 "
+pwd
 
 
 # Check if push/commit is eligible for pushing
-echo "Job: $TRAVIS_JOB_NUMBER ; isPR: $TRAVIS_PULL_REQUEST"
-if [[ $TRAVIS_PULL_REQUEST == "false" ]] ; then
+echo "Job: $TRAVIS_JOB_NUMBER ; isPR: $TRAVIS_PULL_REQUEST ; repo slug : $TRAVIS_REPO_SLUG "
+if [[ $TRAVIS_PULL_REQUEST == "false" ]] && [[ $TRAVIS_REPO_SLUG == "rmetzger/flink" ]] ; then
+
+	echo "install lifecylce mapping fake plugin"
+	git clone https://github.com/mfriedenhagen/dummy-lifecycle-mapping-plugin.git
+	cd dummy-lifecycle-mapping-plugin
+	mvn -B install
+	cd ..
+
+	# this will take a while
+	CURRENT_FLINK_VERSION=`getVersion`
+	if [[ "$CURRENT_FLINK_VERSION" == *-SNAPSHOT ]]; then
+		CURRENT_FLINK_VERSION_HADOOP1=${CURRENT_FLINK_VERSION/-SNAPSHOT/-hadoop1-SNAPSHOT}
+	else
+		CURRENT_FLINK_VERSION_HADOOP1="$CURRENT_FLINK_VERSION-hadoop1"
+	fi
+
+	echo "detected current version as: '$CURRENT_FLINK_VERSION' ; hadoop1: $CURRENT_FLINK_VERSION_HADOOP1 "
 
 	#
 	# This script is called by travis to deploy our project to sonatype SNAPSHOTS.
 	# It will deploy both a hadoop v1 and a hadoop v2 (yarn) artifact
 	# 
 
-	if [[ $TRAVIS_JOB_NUMBER == *1 ]] && [[ $TRAVIS_PULL_REQUEST == "false" ]] && [[ $CURRENT_FLINK_VERSION == *SNAPSHOT* ]] ; then 
+	if [[ $TRAVIS_JOB_NUMBER == *1 ]] &&  [[ $CURRENT_FLINK_VERSION == *SNAPSHOT* ]] ; then 
 		# Deploy hadoop v1 to maven
 		echo "Generating poms for hadoop1"
 		./tools/generate_specific_pom.sh $CURRENT_FLINK_VERSION $CURRENT_FLINK_VERSION_HADOOP1 pom.hadoop1.xml
 		mvn -B -f pom.hadoop1.xml -Pdocs-and-source -DskipTests -Drat.ignoreErrors=true deploy --settings deploysettings.xml; 
+
+		# deploy to s3
+		deploy_to_s3 $CURRENT_FLINK_VERSION "hadoop1"
 	fi
 
-	if [[ $TRAVIS_JOB_NUMBER == *2 ]] && [[ $TRAVIS_PULL_REQUEST == "false" ]] && [[ $CURRENT_FLINK_VERSION == *SNAPSHOT* ]] ; then 
+	if [[ $TRAVIS_JOB_NUMBER == *2 ]] && [[ $CURRENT_FLINK_VERSION == *SNAPSHOT* ]] ; then 
 		# deploy hadoop v2 (yarn)
 		echo "deploy standard version (hadoop2)"
-		mvn -B -DskipTests -Pdocs-and-source -Drat.ignoreErrors=true clean deploy --settings deploysettings.xml;
-	fi
+		mvn -B -DskipTests -Pdocs-and-source -Drat.skip=true -Drat.ignoreErrors=true clean deploy --settings deploysettings.xml;
+
+		deploy_to_s3 $CURRENT_FLINK_VERSION "hadoop2"
+
+		echo "deploy hadoop2 version (standard) for scala 2.11"
+		./tools/change-scala-version.sh 2.11
+		mvn -B -DskipTests -Pdocs-and-source -Drat.skip=true -Drat.ignoreErrors=true clean deploy --settings deploysettings.xml;
+
+		deploy_to_s3 $CURRENT_FLINK_VERSION "hadoop2_2.11"
 
-	if [[ $TRAVIS_JOB_NUMBER == *1 ]] || [[ $TRAVIS_JOB_NUMBER == *2 ]] ; then
-		echo "Uploading build to amazon s3. Job Number: $TRAVIS_JOB_NUMBER"
-		
-		HD="hadoop1"
-		
-		# job nr 2 is hadoop 2
-		if [[ $TRAVIS_JOB_NUMBER == *2 ]] ; then
-			HD="hadoop2"
-		fi
-
-		mkdir flink-$CURRENT_FLINK_VERSION
-		cp -r flink-dist/target/flink-*-bin/flink-$CURRENT_FLINK_VERSION*/* flink-$CURRENT_FLINK_VERSION/
-		tar -czf flink-$CURRENT_FLINK_VERSION-bin-$HD.tgz flink-$CURRENT_FLINK_VERSION
-		travis-artifacts upload --path flink-$CURRENT_FLINK_VERSION-bin-$HD.tgz   --target-path / 
-		echo "doing a ls -lisah:"
-		ls -lisah
+		echo "Changing back to scala 2.10"
+		./tools/change-scala-version.sh 2.10
 	fi
 fi # pull request check