Skip to content

Commit

Permalink
[FLINK-3460] [build] Set Flink dependencies in flink-streaming-connec…
Browse files Browse the repository at this point in the history
…tors, flink-batch-connectors, cep, gelly and flink-ml modules to provided

The flink-streaming-connectors all depend on flink-streaming-java in compile scope.
This entails that this dependency is always pulled in, when you build a fat jar. By
setting this dependency to provided, this will be avoided. Furthermore, the connectors
are always used in conjunction with flink-streaming-java. This means that you will
always have an explicit dependency import of flink-streaming-java in your build script.
This allows you to run your program locally but it is also easy to exclude the dependency
from being included in the fat jar by setting it to provided, as well.

This closes apache#1683.
  • Loading branch information
tillrohrmann committed Feb 23, 2016
1 parent 3b47ad2 commit 939768a
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flink-batch-connectors/flink-avro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${project.version}</version>
<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>
Expand Down
2 changes: 2 additions & 0 deletions flink-batch-connectors/flink-hadoop-compatibility/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${project.version}</version>
<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>
Expand Down
4 changes: 4 additions & 0 deletions flink-batch-connectors/flink-hbase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,28 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>${shading-artifact.name}</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down
1 change: 1 addition & 0 deletions flink-batch-connectors/flink-hcatalog/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down
1 change: 1 addition & 0 deletions flink-batch-connectors/flink-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down
2 changes: 2 additions & 0 deletions flink-libraries/flink-cep/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down
2 changes: 2 additions & 0 deletions flink-libraries/flink-gelly-scala/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-scala_2.10</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- We need to add this explicitly because through shading the dependency on asm seems
to go away. -->
Expand All @@ -50,6 +51,7 @@ under the License.
<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>
Expand Down
2 changes: 2 additions & 0 deletions flink-libraries/flink-gelly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${project.version}</version>
<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>
Expand Down
1 change: 1 addition & 0 deletions flink-libraries/flink-ml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<groupId>org.apache.flink</groupId>
<artifactId>flink-scala_2.10</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down
1 change: 1 addition & 0 deletions flink-streaming-connectors/flink-connector-flume/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down
2 changes: 2 additions & 0 deletions flink-streaming-connectors/flink-connector-kafka-0.8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down Expand Up @@ -117,6 +118,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-curator-recipes</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down
1 change: 1 addition & 0 deletions flink-streaming-connectors/flink-connector-nifi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down
1 change: 1 addition & 0 deletions flink-streaming-connectors/flink-connector-twitter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down

0 comments on commit 939768a

Please sign in to comment.