Skip to content

Commit

Permalink
[FLINK-10814][examples] Add scala suffix to Kafka example module
Browse files Browse the repository at this point in the history
  • Loading branch information
hequn8128 authored and zentol committed Nov 9, 2018
1 parent ecd4567 commit 2c929d6
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 8 deletions.
49 changes: 47 additions & 2 deletions flink-examples/flink-examples-streaming-kafka-0.10/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ under the License.
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>flink-examples-streaming-kafka-0.10</artifactId>
<artifactId>flink-examples-streaming-kafka-0.10_${scala.binary.version}</artifactId>
<name>flink-examples-streaming-kafka-0.10</name>

<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-examples-streaming-kafka-base</artifactId>
<artifactId>flink-examples-streaming-kafka-base_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>

Expand All @@ -48,6 +49,12 @@ under the License.
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-scala_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
Expand All @@ -57,6 +64,44 @@ under the License.

<build>
<plugins>

<!-- Scala Compiler -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<executions>
<!-- Run scala compiler in the process-resources phase, so that dependencies on
scala classes can be resolved later in the (Java) compile phase -->
<execution>
<id>scala-compile-first</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
</execution>

<!-- Run scala compiler in the process-test-resources phase, so that dependencies on
scala classes can be resolved later in the (Java) test-compile phase -->
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Scala Code Style, most of the configuration done via plugin management -->
<plugin>
<groupId>org.scalastyle</groupId>
<artifactId>scalastyle-maven-plugin</artifactId>
<configuration>
<configLocation>${project.basedir}/../../tools/maven/scalastyle-config.xml</configLocation>
</configuration>
</plugin>

<!-- Use the shade plugin to build a fat jar for the kafka connector test -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package org.apache.flink.streaming.scala.examples.kafka
import org.apache.flink.api.common.restartstrategy.RestartStrategies
import org.apache.flink.api.common.serialization.SimpleStringSchema
import org.apache.flink.api.java.utils.ParameterTool
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment
import org.apache.flink.streaming.api.scala._
import org.apache.flink.streaming.connectors.kafka.{FlinkKafkaConsumer010, FlinkKafkaProducer010}

/**
Expand Down
4 changes: 2 additions & 2 deletions flink-examples/flink-examples-streaming-kafka-0.11/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ under the License.
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>flink-examples-streaming-kafka-0.11</artifactId>
<artifactId>flink-examples-streaming-kafka-0.11_${scala.binary.version}</artifactId>
<name>flink-examples-streaming-kafka-0.11</name>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-examples-streaming-kafka-base</artifactId>
<artifactId>flink-examples-streaming-kafka-base_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion flink-examples/flink-examples-streaming-kafka-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ under the License.
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>flink-examples-streaming-kafka-base</artifactId>
<artifactId>flink-examples-streaming-kafka-base_${scala.binary.version}</artifactId>
<name>flink-examples-streaming-kafka-base</name>

<packaging>jar</packaging>
Expand Down
4 changes: 2 additions & 2 deletions flink-examples/flink-examples-streaming-kafka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ under the License.
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>flink-examples-streaming-kafka</artifactId>
<artifactId>flink-examples-streaming-kafka_${scala.binary.version}</artifactId>
<name>flink-examples-streaming-kafka</name>

<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-examples-streaming-kafka-base</artifactId>
<artifactId>flink-examples-streaming-kafka-base_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down

0 comments on commit 2c929d6

Please sign in to comment.