You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2016/12/20 16:49:10 UTC

[05/10] flink git commit: [FLINK-5369] [build] Rework jsr305 and logging dependencies.

[FLINK-5369] [build] Rework jsr305 and logging dependencies.

Currently, every project in Flink has a hard (compile scope) dependency on the jsr305, slf4j, and log4j
artifacts. That way they are pulled into every fat jar, including user fat jars as soon as they refer to
a connector or library.

This commit changes the behavior in two ways:

  1. It removes the concrete logger dependencies from the root pom file. Instead, it adds them to the
     'flink-core' project. That way, all modules that refer to 'flink-core' will have those dependencies
     as well, but the projects that have 'flink-core' as provided (connectors, libraries, user programs,
     etc) will have those dependencies transitively as provided as well.

  2. The commit overrides the slf4j and jsr305 dependencies in the parents of 'flink-connectors',
     'flink-libraries', and 'flink-metrics' and sets the to 'provided'. That way all core projects
     pull the logger classes, but all projects that are not part of flink-dist (and rather bundled
     in fat jars) will not bundle these dependencies again.

The flink-dist puts the dependencies into the fat jar (slf4j, jsr305) or the lib folder (log4j).


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

Branch: refs/heads/master
Commit: cefb8db3525dc25421d41cfcdaaac1bd5540bc68
Parents: 9bc1063
Author: Stephan Ewen <se...@apache.org>
Authored: Mon Dec 19 16:24:29 2016 +0100
Committer: Stephan Ewen <se...@apache.org>
Committed: Tue Dec 20 17:01:43 2016 +0100

----------------------------------------------------------------------
 flink-connectors/pom.xml                        | 17 +++++
 flink-core/pom.xml                              | 31 ++++++++-
 flink-dist/pom.xml                              | 20 +++++-
 flink-examples/pom.xml                          | 19 ++++++
 flink-java/pom.xml                              |  8 +++
 flink-libraries/flink-cep-scala/pom.xml         | 21 ++++++
 flink-libraries/flink-gelly-examples/pom.xml    | 14 ++++
 flink-libraries/flink-gelly-scala/pom.xml       | 41 ++++++++---
 flink-libraries/flink-gelly/pom.xml             |  6 ++
 flink-libraries/flink-ml/pom.xml                | 26 +++++++
 flink-libraries/pom.xml                         | 18 +++++
 flink-metrics/pom.xml                           | 18 +++++
 .../main/resources/archetype-resources/pom.xml  | 33 +++++++++
 .../main/resources/archetype-resources/pom.xml  | 29 ++++++++
 flink-runtime/pom.xml                           |  5 ++
 flink-scala/pom.xml                             |  6 --
 pom.xml                                         | 71 ++++++++++++++------
 17 files changed, 344 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/flink-connectors/pom.xml
----------------------------------------------------------------------
diff --git a/flink-connectors/pom.xml b/flink-connectors/pom.xml
index ba5ce46..c563d92 100644
--- a/flink-connectors/pom.xml
+++ b/flink-connectors/pom.xml
@@ -54,6 +54,23 @@ under the License.
 		<module>flink-connector-filesystem</module>
 	</modules>
 
+	<!-- override these root dependencies as 'provided', so they don't end up
+		in the jars-with-dependencies (uber jars) of connectors and
+		user programs that depend on the connectors -->
+
+	<dependencies>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.google.code.findbugs</groupId>
+			<artifactId>jsr305</artifactId>
+			<scope>provided</scope>
+		</dependency>
+	</dependencies>
+
 	<!-- See main pom.xml for explanation of profiles -->
 	<profiles>
 		<!--

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/flink-core/pom.xml
----------------------------------------------------------------------
diff --git a/flink-core/pom.xml b/flink-core/pom.xml
index 396ef86..ea261cf 100644
--- a/flink-core/pom.xml
+++ b/flink-core/pom.xml
@@ -47,6 +47,14 @@ under the License.
 			<version>${project.version}</version>
 		</dependency>
 
+		<!-- standard utilities -->
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-lang3</artifactId>
+			<!-- managed version -->
+		</dependency>
+
+		<!-- for the fallback generic serializer -->
 		<dependency>
 			<groupId>com.esotericsoftware.kryo</groupId>
 			<artifactId>kryo</artifactId>
@@ -87,7 +95,28 @@ under the License.
 			<version>${asm.version}</version>
 		</dependency>
 
-		<!-- test dependencies -->
+		<!--
+			Because there are no logger implementation dependency in the root pom, we
+			add them here so that they are available during execution of code (core 
+			and example) in the IDE
+
+			NOTE: Once we are confident that users will use the newer quickstart templates,
+			we can drop these dependencies and only add them to 'flink-dist' and as test
+			dependencies
+		-->
+
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+		</dependency>
+
+		<!-- ================== test dependencies ================== -->
+
 		<dependency>
 			<groupId>org.apache.flink</groupId>
 			<artifactId>flink-test-utils-junit</artifactId>

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/flink-dist/pom.xml
----------------------------------------------------------------------
diff --git a/flink-dist/pom.xml b/flink-dist/pom.xml
index 93feec6..25dc708 100644
--- a/flink-dist/pom.xml
+++ b/flink-dist/pom.xml
@@ -35,7 +35,8 @@ under the License.
 
 	<dependencies>
 
-		<!-- BINARIES -->
+		<!-- Flink project binaries -->
+
 		<dependency>
 			<groupId>org.apache.flink</groupId>
 			<artifactId>flink-core</artifactId>
@@ -137,7 +138,22 @@ under the License.
 			<artifactId>flink-yarn_2.10</artifactId>
 			<version>${project.version}</version>
 		</dependency>
-		
+
+		<!-- Concrete logging framework - we only add this here to not tie
+			the projects to one specific framework and make it easier for
+			users to swap logging frameworks -->
+
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<scope>compile</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<scope>compile</scope>
+		</dependency>
 	</dependencies>
 
 	<profiles>

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/flink-examples/pom.xml
----------------------------------------------------------------------
diff --git a/flink-examples/pom.xml b/flink-examples/pom.xml
index e47ad2c..e285b63 100644
--- a/flink-examples/pom.xml
+++ b/flink-examples/pom.xml
@@ -33,6 +33,9 @@ under the License.
 	<packaging>pom</packaging>
 
 	<dependencies>
+
+		<!-- Flink dependencies -->
+
 		<dependency>
 			<groupId>org.apache.flink</groupId>
 			<artifactId>flink-core</artifactId>
@@ -44,6 +47,22 @@ under the License.
 			<artifactId>flink-clients_2.10</artifactId>
 			<version>${project.version}</version>
 		</dependency>
+
+		<!-- Add a logging Framework, to make the examples produce -->
+		<!--             logs when executing in the IDE            -->
+
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<scope>compile</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<scope>compile</scope>
+		</dependency>
+
 	</dependencies>
 
 	<modules>

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/flink-java/pom.xml
----------------------------------------------------------------------
diff --git a/flink-java/pom.xml b/flink-java/pom.xml
index 728b6ee..846209f 100644
--- a/flink-java/pom.xml
+++ b/flink-java/pom.xml
@@ -55,10 +55,18 @@ under the License.
 
 		<dependency>
 			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-lang3</artifactId>
+			<!-- managed version -->
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.commons</groupId>
 			<artifactId>commons-math3</artifactId>
 			<!-- managed version -->
 		</dependency>
 
+		<!-- test dependencies -->
+
 		<dependency>
 			<groupId>com.google.guava</groupId>
 			<artifactId>guava</artifactId>

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/flink-libraries/flink-cep-scala/pom.xml
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-cep-scala/pom.xml b/flink-libraries/flink-cep-scala/pom.xml
index a613d44..81e5190 100644
--- a/flink-libraries/flink-cep-scala/pom.xml
+++ b/flink-libraries/flink-cep-scala/pom.xml
@@ -52,12 +52,33 @@ under the License.
         </dependency>
 
         <!-- We need to add this explicitly due to shading -->
+
         <dependency>
             <groupId>org.ow2.asm</groupId>
             <artifactId>asm</artifactId>
             <version>${asm.version}</version>
         </dependency>
 
+        <!-- the dependencies below are already provided in Flink -->
+
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-reflect</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-compiler</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
         <!-- test dependencies -->
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/flink-libraries/flink-gelly-examples/pom.xml
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly-examples/pom.xml b/flink-libraries/flink-gelly-examples/pom.xml
index 9b90b04..28c7c67 100644
--- a/flink-libraries/flink-gelly-examples/pom.xml
+++ b/flink-libraries/flink-gelly-examples/pom.xml
@@ -61,6 +61,20 @@
 			<version>${project.version}</version>
 		</dependency>
 
+		<!-- to be able to execute the examples properly in common IDEs, we need to
+			restate these dependencies in 'compile' scope -->
+
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.google.code.findbugs</groupId>
+			<artifactId>jsr305</artifactId>
+			<scope>compile</scope>
+		</dependency>
+
 		<!-- test dependencies -->
 
 		<dependency>

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/flink-libraries/flink-gelly-scala/pom.xml
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly-scala/pom.xml b/flink-libraries/flink-gelly-scala/pom.xml
index 08aeace..69a7bfb 100644
--- a/flink-libraries/flink-gelly-scala/pom.xml
+++ b/flink-libraries/flink-gelly-scala/pom.xml
@@ -34,12 +34,28 @@ under the License.
     <packaging>jar</packaging>
 
     <dependencies>
+        
+        <!-- core dependencies -->
         <dependency>
             <groupId>org.apache.flink</groupId>
             <artifactId>flink-scala_2.10</artifactId>
             <version>${project.version}</version>
-			<scope>provided</scope>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-clients_2.10</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-gelly_2.10</artifactId>
+            <version>${project.version}</version>
         </dependency>
+
         <!-- We need to add this explicitly because through shading the dependency on asm seems
         to go away. -->
         <dependency>
@@ -47,16 +63,25 @@ under the License.
             <artifactId>asm</artifactId>
             <version>${asm.version}</version>
         </dependency>
+
+        <!-- the dependencies below are already provided in Flink -->
+
         <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-clients_2.10</artifactId>
-            <version>${project.version}</version>
-			<scope>provided</scope>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-reflect</artifactId>
+            <scope>provided</scope>
         </dependency>
+
         <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-gelly_2.10</artifactId>
-            <version>${project.version}</version>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-compiler</artifactId>
+            <scope>provided</scope>
         </dependency>
         
         <!-- test dependencies -->

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/flink-libraries/flink-gelly/pom.xml
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/pom.xml b/flink-libraries/flink-gelly/pom.xml
index ff39298..7feb177 100644
--- a/flink-libraries/flink-gelly/pom.xml
+++ b/flink-libraries/flink-gelly/pom.xml
@@ -52,6 +52,12 @@ under the License.
 			<scope>provided</scope>
 		</dependency>
 
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-lang3</artifactId>
+			<scope>provided</scope>
+		</dependency>
+
 		<!-- test dependencies -->
 		
 		<dependency>

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/flink-libraries/flink-ml/pom.xml
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-ml/pom.xml b/flink-libraries/flink-ml/pom.xml
index 83a53b7..c1a9a39 100644
--- a/flink-libraries/flink-ml/pom.xml
+++ b/flink-libraries/flink-ml/pom.xml
@@ -50,6 +50,32 @@
 			<version>0.12</version>
 		</dependency>
 
+		<!-- the dependencies below are already provided in Flink -->
+
+		<dependency>
+			<groupId>org.scala-lang</groupId>
+			<artifactId>scala-reflect</artifactId>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.scala-lang</groupId>
+			<artifactId>scala-library</artifactId>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.scala-lang</groupId>
+			<artifactId>scala-compiler</artifactId>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-math3</artifactId>
+			<scope>provided</scope>
+		</dependency>
+
 		<!-- test dependencies -->
 
 		<dependency>

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/flink-libraries/pom.xml
----------------------------------------------------------------------
diff --git a/flink-libraries/pom.xml b/flink-libraries/pom.xml
index c0698c8..31f6e03 100644
--- a/flink-libraries/pom.xml
+++ b/flink-libraries/pom.xml
@@ -43,4 +43,22 @@ under the License.
 		<module>flink-cep</module>
 		<module>flink-cep-scala</module>
 	</modules>
+
+	<!-- override these root dependencies as 'provided', so they don't end up
+		in the jars-with-dependencies (uber jars) of connectors and
+		user programs that depend on the connectors -->
+
+	<dependencies>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.google.code.findbugs</groupId>
+			<artifactId>jsr305</artifactId>
+			<scope>provided</scope>
+		</dependency>
+	</dependencies>
+
 </project>

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/flink-metrics/pom.xml
----------------------------------------------------------------------
diff --git a/flink-metrics/pom.xml b/flink-metrics/pom.xml
index 629c50d..90785b4 100644
--- a/flink-metrics/pom.xml
+++ b/flink-metrics/pom.xml
@@ -41,4 +41,22 @@ under the License.
 		<module>flink-metrics-jmx</module>
 		<module>flink-metrics-statsd</module>
 	</modules>
+
+	<!-- override these root dependencies as 'provided', so they don't end up
+		in the jars-with-dependencies. They are already contained
+		in the flink-dist build -->
+
+	<dependencies>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.google.code.findbugs</groupId>
+			<artifactId>jsr305</artifactId>
+			<scope>provided</scope>
+		</dependency>
+	</dependencies>
+
 </project>

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/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 57f3e25..a502037 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
@@ -31,6 +31,8 @@ under the License.
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<flink.version>1.2-SNAPSHOT</flink.version>
+		<slf4j.version>1.7.7</slf4j.version>
+		<log4j.version>1.2.17</log4j.version>
 	</properties>
 
 	<repositories>
@@ -72,6 +74,7 @@ under the License.
 	-->
 
 	<dependencies>
+		<!-- Apache Flink dependencies -->
 		<dependency>
 			<groupId>org.apache.flink</groupId>
 			<artifactId>flink-java</artifactId>
@@ -87,15 +90,31 @@ under the License.
 			<artifactId>flink-clients_2.10</artifactId>
 			<version>${flink.version}</version>
 		</dependency>
+
+		<!-- explicitly add a standard loggin framework, as Flink does not (in the future) have
+			a hard dependency on one specific framework by default -->
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<version>${slf4j.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>${log4j.version}</version>
+		</dependency>
+		
 	</dependencies>
 
 	<profiles>
 		<profile>
 			<!-- Profile for packaging correct JAR files -->
 			<id>build-jar</id>
+
 			<activation>
 				<activeByDefault>false</activeByDefault>
 			</activation>
+
 			<dependencies>
 				<dependency>
 					<groupId>org.apache.flink</groupId>
@@ -115,6 +134,18 @@ under the License.
 					<version>${flink.version}</version>
 					<scope>provided</scope>
 				</dependency>
+				<dependency>
+					<groupId>org.slf4j</groupId>
+					<artifactId>slf4j-log4j12</artifactId>
+					<version>${slf4j.version}</version>
+					<scope>provided</scope>
+				</dependency>
+				<dependency>
+					<groupId>log4j</groupId>
+					<artifactId>log4j</artifactId>
+					<version>${log4j.version}</version>
+					<scope>provided</scope>
+				</dependency>
 			</dependencies>
 
 			<build>
@@ -191,6 +222,8 @@ under the License.
 									versions of these dependencies.
 
 									-->
+
+									<exclude>log4j:log4j</exclude>
 									<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/cefb8db3/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 24225f6..c7211b8 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
@@ -46,6 +46,8 @@ under the License.
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<flink.version>1.2-SNAPSHOT</flink.version>
+		<slf4j.version>1.7.7</slf4j.version>
+		<log4j.version>1.2.17</log4j.version>
 	</properties>
 
 	<!-- 
@@ -73,6 +75,7 @@ under the License.
 	-->
 
 	<dependencies>
+		<!-- Apache Flink dependencies -->
 		<dependency>
 			<groupId>org.apache.flink</groupId>
 			<artifactId>flink-scala_2.10</artifactId>
@@ -88,6 +91,19 @@ under the License.
 			<artifactId>flink-clients_2.10</artifactId>
 			<version>${flink.version}</version>
 		</dependency>
+		
+		<!-- explicitly add a standard loggin framework, as Flink does not (in the future) have
+			a hard dependency on one specific framework by default -->
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<version>${slf4j.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>${log4j.version}</version>
+		</dependency>
 	</dependencies>
 
 	<profiles>
@@ -116,6 +132,18 @@ under the License.
 					<version>${flink.version}</version>
 					<scope>provided</scope>
 				</dependency>
+				<dependency>
+					<groupId>org.slf4j</groupId>
+					<artifactId>slf4j-log4j12</artifactId>
+					<version>${slf4j.version}</version>
+					<scope>provided</scope>
+				</dependency>
+				<dependency>
+					<groupId>log4j</groupId>
+					<artifactId>log4j</artifactId>
+					<version>${log4j.version}</version>
+					<scope>provided</scope>
+				</dependency>
 			</dependencies>
 
 			<build>
@@ -196,6 +224,7 @@ under the License.
 
 									-->
 
+									<exclude>log4j:log4j</exclude>
 									<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/cefb8db3/flink-runtime/pom.xml
----------------------------------------------------------------------
diff --git a/flink-runtime/pom.xml b/flink-runtime/pom.xml
index e522d77..4a35304 100644
--- a/flink-runtime/pom.xml
+++ b/flink-runtime/pom.xml
@@ -57,6 +57,11 @@ under the License.
 		</dependency>
 
 		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-lang3</artifactId>
+		</dependency>
+		
+		<dependency>
 			<groupId>commons-cli</groupId>
 			<artifactId>commons-cli</artifactId>
 		</dependency>

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/flink-scala/pom.xml
----------------------------------------------------------------------
diff --git a/flink-scala/pom.xml b/flink-scala/pom.xml
index 88f49e5..3777de5 100644
--- a/flink-scala/pom.xml
+++ b/flink-scala/pom.xml
@@ -44,12 +44,6 @@ under the License.
 			<artifactId>flink-java</artifactId>
 			<version>${project.version}</version>
 		</dependency>
-		
-		<dependency>
-			<groupId>org.apache.flink</groupId>
-			<artifactId>flink-optimizer_2.10</artifactId>
-			<version>${project.version}</version>
-		</dependency>
 
 		<dependency>
 			<groupId>org.scala-lang</groupId>

http://git-wip-us.apache.org/repos/asf/flink/blob/cefb8db3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9676976..6f16aa6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,7 +91,6 @@ under the License.
 		<flink.forkCount>1C</flink.forkCount>
 		<flink.reuseForks>true</flink.reuseForks>
 		<log4j.configuration>log4j-test.properties</log4j.configuration>
-		<slf4j.version>1.7.7</slf4j.version>
 		<guava.version>18.0</guava.version>
 		<akka.version>2.3-custom</akka.version>
 		<java.version>1.7</java.version>
@@ -125,35 +124,21 @@ under the License.
 			<version>1.2-SNAPSHOT</version>
 		</dependency>
 
-		<!-- Add the 'javax.annotation' annotations (JSR305), such as '@Nullable' -->
-		<dependency>
-			<groupId>com.google.code.findbugs</groupId>
-			<artifactId>jsr305</artifactId>
-		</dependency>
-		
-		<dependency>
-			<groupId>org.apache.commons</groupId>
-			<artifactId>commons-lang3</artifactId>
-			<version>3.3.2</version>
-		</dependency>
+		<!-- Root dependencies for all projects -->
 
+		<!-- Logging API -->
 		<dependency>
 			<groupId>org.slf4j</groupId>
 			<artifactId>slf4j-api</artifactId>
-			<version>${slf4j.version}</version>
 		</dependency>
 
+		<!-- 'javax.annotation' classes like '@Nullable' -->
 		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-log4j12</artifactId>
-			<version>${slf4j.version}</version>
+			<groupId>com.google.code.findbugs</groupId>
+			<artifactId>jsr305</artifactId>
 		</dependency>
 
-		<dependency>
-			<groupId>log4j</groupId>
-			<artifactId>log4j</artifactId>
-			<version>1.2.17</version>
-		</dependency>
+		<!-- test dependencies -->
 
 		<dependency>
 			<groupId>junit</groupId>
@@ -194,9 +179,27 @@ under the License.
 			<type>jar</type>
 			<scope>test</scope>
 		</dependency>
+
+		<!-- tests will have log4j as the default logging framework available -->
+
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<type>jar</type>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<type>jar</type>
+			<scope>test</scope>
+		</dependency>
+
 	</dependencies>
 
 	<!-- this section defines the module versions that are used if nothing else is specified. -->
+	
 	<dependencyManagement>
 		<!-- WARN: 
 			DO NOT put 	guava, 
@@ -215,7 +218,31 @@ under the License.
 				<artifactId>jsr305</artifactId>
 				<version>1.3.9</version>
 			</dependency>
-			
+
+			<dependency>
+				<groupId>org.slf4j</groupId>
+				<artifactId>slf4j-api</artifactId>
+				<version>1.7.7</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.slf4j</groupId>
+				<artifactId>slf4j-log4j12</artifactId>
+				<version>1.7.7</version>
+			</dependency>
+
+			<dependency>
+				<groupId>log4j</groupId>
+				<artifactId>log4j</artifactId>
+				<version>1.2.17</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.apache.commons</groupId>
+				<artifactId>commons-lang3</artifactId>
+				<version>3.3.2</version>
+			</dependency>
+
 			<!-- Make sure we use a consistent avro version throughout the project -->
 			<dependency>
 				<groupId>org.apache.avro</groupId>