diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..821d998 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.sw? +project/* +target/* diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..f5d36d6 --- /dev/null +++ b/build.sbt @@ -0,0 +1,38 @@ +resolvers in ThisBuild ++= Seq("Apache Development Snapshot Repository" at "https://repository.apache.org/content/repositories/snapshots/", + "velvia maven" at "http://dl.bintray.com/velvia/maven", + Resolver.mavenLocal) + +// settings definitions +val flinkVersion = settingKey[String]("Flink version") +val flinkDependencies = settingKey[Seq[String]]("Direct flink dependencies") + +// The "main" project +lazy val root = (project in file(".")) + .settings( + name := "SocketFlink", + version := "1.99.8", + organization := "net.juliobiason", + flinkVersion := "1.4.0", + scalaVersion := "2.11.8", + mainClass := Some("net.juliobiason.flink.SocketWindowWordCount"), + + // dependencies + libraryDependencies ++= Seq( + "commons-codec" % "commons-codec" % "1.11", + "mysql" % "mysql-connector-java" % "5.1.24", + "org.apache.flink" % "flink-core" % flinkVersion.value, + "org.apache.flink" % "flink-java" % flinkVersion.value, + "org.apache.flink" %% "flink-streaming-java" % flinkVersion.value % "provided", + "org.slf4j" % "slf4j-log4j12" % "1.7.25" + ), + + // as silly as it looks, this is what we need to do to run our + // pipeline as a standalone project (using Flink libraries, but + // not Flink itself). + run := Defaults.runTask(fullClasspath in Compile, + mainClass in (Compile, run), + runner in (Compile, run)).evaluated, + + javacOptions += "-Xlint:deprecation", + javacOptions += "-Xlint:unchecked" + )