提交 3e9af820 编写于 作者: C Christian Wuerz 提交者: mbalassi

[FLINK-2080] Document how to use Flink with sbt

Closes #787
上级 80b1d566
......@@ -23,6 +23,7 @@ under the License.
* This will be replaced by the TOC
{:toc}
Start working on your Flink Scala program in a few simple steps.
## Requirements
......@@ -134,3 +135,19 @@ object WordCountJob {
For a complete overview over our API, have a look at the [Programming Guide]({{ site.baseurl }}/apis/programming_guide.html) and [further example programs]({{ site.baseurl }}/apis/examples.html). If you have any trouble, ask on our [Mailing List](http://mail-archives.apache.org/mod_mbox/flink-dev/). We are happy to provide help.
## Alternative Build Tools: SBT
To build and run applications with SBT instead of Maven is pretty straight forward. After creating the standard sbt [directory layout](http://www.scala-sbt.org/0.13/tutorial/Directories.html) it's enough to add the Flink dependencies to the `build.sbt` file:
~~~scala
libraryDependencies ++= Seq("org.apache.flink" % "flink-scala" % "{{site.version}}", "org.apache.flink" % "flink-clients" % "{{site.version}}")
~~~
Now the application can be executed by `sbt run`. By default SBT runs an application in the same JVM itself is running in. This can lead to lass loading issues with Flink. To avoid these, append the following line to `build.sbt`:
~~~scala
fork in run := true
~~~
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册