http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/integrationtest/core/src/main/scala/io/gearpump/integrationtest/storm/StormClient.scala
----------------------------------------------------------------------
diff --git 
a/integrationtest/core/src/main/scala/io/gearpump/integrationtest/storm/StormClient.scala
 
b/integrationtest/core/src/main/scala/io/gearpump/integrationtest/storm/StormClient.scala
index 7b460d7..ea9ca65 100644
--- 
a/integrationtest/core/src/main/scala/io/gearpump/integrationtest/storm/StormClient.scala
+++ 
b/integrationtest/core/src/main/scala/io/gearpump/integrationtest/storm/StormClient.scala
@@ -7,7 +7,7 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *    http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,12 +18,13 @@
 
 package io.gearpump.integrationtest.storm
 
-import backtype.storm.utils.{Utils, DRPCClient}
-import io.gearpump.integrationtest.{Util, Docker}
-import io.gearpump.integrationtest.minicluster.{MiniCluster, RestClient, 
BaseContainer}
-
 import scala.util.Random
 
+import backtype.storm.utils.{DRPCClient, Utils}
+
+import io.gearpump.integrationtest.minicluster.{BaseContainer, MiniCluster, 
RestClient}
+import io.gearpump.integrationtest.{Docker, Util}
+
 class StormClient(cluster: MiniCluster, restClient: RestClient) {
 
   private val masterAddrs: List[(String, Int)] = cluster.getMastersAddresses
@@ -39,7 +40,8 @@ class StormClient(cluster: MiniCluster, restClient: 
RestClient) {
   private val drpcContainer = new BaseContainer(DRPC_HOST, STORM_DRPC, 
masterAddrs,
     tunnelPorts = Set(DRPC_PORT, DRPC_INVOCATIONS_PORT))
 
-  private val nimbusContainer = new BaseContainer(NIMBUS_HOST, s"$STORM_NIMBUS 
-output $CONFIG_FILE", masterAddrs)
+  private val nimbusContainer =
+    new BaseContainer(NIMBUS_HOST, s"$STORM_NIMBUS -output $CONFIG_FILE", 
masterAddrs)
 
   def start(): Unit = {
     nimbusContainer.createAndStart()
@@ -50,23 +52,23 @@ class StormClient(cluster: MiniCluster, restClient: 
RestClient) {
   }
 
   private def ensureNimbusRunning(): Unit = {
-    Util.retryUntil(()=>{
+    Util.retryUntil(() => {
       val response = Docker.execute(NIMBUS_HOST, "grep \"port\" " + 
CONFIG_FILE)
       // Parse format nimbus.thrift.port: '39322'
-      val thriftPort = response.split(" ")(1).replace("'","").toInt
+      val thriftPort = response.split(" ")(1).replace("'", "").toInt
 
       Docker.executeSilently(NIMBUS_HOST, s"""sh -c "netstat -na | grep 
$thriftPort" """)
     }, "Nimbus running")
   }
 
   private def ensureDrpcServerRunning(): Unit = {
-    Util.retryUntil(()=>{
+    Util.retryUntil(() => {
       Docker.executeSilently(DRPC_HOST, s"""sh -c "netstat -na | grep 
$DRPC_PORT " """)
     }, "DRPC running")
   }
 
   def submitStormApp(jar: String, mainClass: String, args: String, appName: 
String): Int = {
-    Util.retryUntil(()=>{
+    Util.retryUntil(() => {
       Docker.executeSilently(NIMBUS_HOST, s"$STORM_APP -config $CONFIG_FILE " +
         s"-jar $jar $mainClass $args")
       restClient.listRunningApps().exists(_.appName == appName)
@@ -81,10 +83,9 @@ class StormClient(cluster: MiniCluster, restClient: 
RestClient) {
 
   def shutDown(): Unit = {
 
-    // clean the storm.yaml config file
+    // Cleans up the storm.yaml config file
     Docker.executeSilently(NIMBUS_HOST, s"rm $CONFIG_FILE ")
     drpcContainer.killAndRemove()
     nimbusContainer.killAndRemove()
   }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/integrationtest/storm010/src/main/scala/io/gearpump/integrationtest/storm/Adaptor.scala
----------------------------------------------------------------------
diff --git 
a/integrationtest/storm010/src/main/scala/io/gearpump/integrationtest/storm/Adaptor.scala
 
b/integrationtest/storm010/src/main/scala/io/gearpump/integrationtest/storm/Adaptor.scala
index 3ae20d5..6e4f257 100644
--- 
a/integrationtest/storm010/src/main/scala/io/gearpump/integrationtest/storm/Adaptor.scala
+++ 
b/integrationtest/storm010/src/main/scala/io/gearpump/integrationtest/storm/Adaptor.scala
@@ -7,7 +7,7 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,9 +17,9 @@
  */
 package io.gearpump.integrationtest.storm
 
-import backtype.storm.topology.{OutputFieldsDeclarer, BasicOutputCollector}
 import backtype.storm.topology.base.BaseBasicBolt
-import backtype.storm.tuple.{Fields, Values, Tuple}
+import backtype.storm.topology.{BasicOutputCollector, OutputFieldsDeclarer}
+import backtype.storm.tuple.{Fields, Tuple, Values}
 import storm.kafka.bolt.mapper.FieldNameBasedTupleToKafkaMapper
 
 class Adaptor extends BaseBasicBolt {

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/integrationtest/storm010/src/main/scala/io/gearpump/integrationtest/storm/Storm010KafkaTopology.scala
----------------------------------------------------------------------
diff --git 
a/integrationtest/storm010/src/main/scala/io/gearpump/integrationtest/storm/Storm010KafkaTopology.scala
 
b/integrationtest/storm010/src/main/scala/io/gearpump/integrationtest/storm/Storm010KafkaTopology.scala
index 5ef2df5..fa48112 100644
--- 
a/integrationtest/storm010/src/main/scala/io/gearpump/integrationtest/storm/Storm010KafkaTopology.scala
+++ 
b/integrationtest/storm010/src/main/scala/io/gearpump/integrationtest/storm/Storm010KafkaTopology.scala
@@ -7,7 +7,7 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *    http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,25 +20,28 @@ package io.gearpump.integrationtest.storm
 
 import java.util.{ArrayList => JArrayList, HashMap => JHashMap, Map => JMap}
 
-import backtype.storm.{StormSubmitter, Config}
 import backtype.storm.topology.TopologyBuilder
-import io.gearpump.cluster.main.{ArgumentsParser, CLIOption}
-import storm.kafka.{ZkHosts, SpoutConfig, KafkaSpout}
+import backtype.storm.{Config, StormSubmitter}
 import storm.kafka.bolt.KafkaBolt
+import storm.kafka.{KafkaSpout, SpoutConfig, ZkHosts}
+
+import io.gearpump.cluster.main.{ArgumentsParser, CLIOption}
 
 /**
-  * tests Storm 0.10.x compatibility over Gearpump
-  * this example reads data from Kafka and writes back to it
-  */
+ * Tests Storm 0.10.x compatibility over Gearpump
+ * this example reads data from Kafka and writes back to it
+ */
 object Storm010KafkaTopology extends App with ArgumentsParser {
 
   override val options: Array[(String, CLIOption[Any])] = Array(
     "topologyName" -> CLIOption[Int]("<Storm topology name>", required = true),
     "sourceTopic" -> CLIOption[String]("<Kafka topic to read data>", required 
= true),
     "sinkTopic" -> CLIOption[String]("<Kafka topic to write data>", required = 
true),
-    "zookeeperConnect" -> CLIOption[String]("<Zookeeper connect string, e.g. 
localhost:2181/kafka>", required = true),
+    "zookeeperConnect" -> CLIOption[String]("<Zookeeper connect string, e.g. 
localhost:2181/kafka>",
+      required = true),
     "brokerList" -> CLIOption[String]("<Kafka broker list, e.g. 
localhost:9092>", required = true),
-    "spoutNum" -> CLIOption[Int]("<how many spout tasks>", required = false, 
defaultValue = Some(1)),
+    "spoutNum" -> CLIOption[Int]("<how many spout tasks>", required = false,
+      defaultValue = Some(1)),
     "boltNum" -> CLIOption[Int]("<how many bolt tasks>", required = false, 
defaultValue = Some(1))
   )
 
@@ -52,7 +55,8 @@ object Storm010KafkaTopology extends App with ArgumentsParser 
{
   val boltNum = configs.getInt("boltNum")
 
   val topologyBuilder = new TopologyBuilder()
-  val kafkaSpout: KafkaSpout = new KafkaSpout(getSpoutConfig(sourceTopic, 
zookeeperConnect, topologyName))
+  val kafkaSpout: KafkaSpout = new KafkaSpout(getSpoutConfig(sourceTopic,
+    zookeeperConnect, topologyName))
   val kafkaBolt: KafkaBolt[Array[Byte], Array[Byte]] = new 
KafkaBolt[Array[Byte], Array[Byte]]()
   val adaptor = new Adaptor
   topologyBuilder.setSpout("kafka_spout", kafkaSpout, spoutNum)

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/integrationtest/storm09/src/main/scala/io/gearpump/integrationtest/storm/Adaptor.scala
----------------------------------------------------------------------
diff --git 
a/integrationtest/storm09/src/main/scala/io/gearpump/integrationtest/storm/Adaptor.scala
 
b/integrationtest/storm09/src/main/scala/io/gearpump/integrationtest/storm/Adaptor.scala
index 3ae20d5..6e4f257 100644
--- 
a/integrationtest/storm09/src/main/scala/io/gearpump/integrationtest/storm/Adaptor.scala
+++ 
b/integrationtest/storm09/src/main/scala/io/gearpump/integrationtest/storm/Adaptor.scala
@@ -7,7 +7,7 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,9 +17,9 @@
  */
 package io.gearpump.integrationtest.storm
 
-import backtype.storm.topology.{OutputFieldsDeclarer, BasicOutputCollector}
 import backtype.storm.topology.base.BaseBasicBolt
-import backtype.storm.tuple.{Fields, Values, Tuple}
+import backtype.storm.topology.{BasicOutputCollector, OutputFieldsDeclarer}
+import backtype.storm.tuple.{Fields, Tuple, Values}
 import storm.kafka.bolt.mapper.FieldNameBasedTupleToKafkaMapper
 
 class Adaptor extends BaseBasicBolt {

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/integrationtest/storm09/src/main/scala/io/gearpump/integrationtest/storm/Storm09KafkaTopology.scala
----------------------------------------------------------------------
diff --git 
a/integrationtest/storm09/src/main/scala/io/gearpump/integrationtest/storm/Storm09KafkaTopology.scala
 
b/integrationtest/storm09/src/main/scala/io/gearpump/integrationtest/storm/Storm09KafkaTopology.scala
index 76f469e..918dc56 100644
--- 
a/integrationtest/storm09/src/main/scala/io/gearpump/integrationtest/storm/Storm09KafkaTopology.scala
+++ 
b/integrationtest/storm09/src/main/scala/io/gearpump/integrationtest/storm/Storm09KafkaTopology.scala
@@ -7,7 +7,7 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *    http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -19,25 +19,28 @@ package io.gearpump.integrationtest.storm
 
 import java.util.{ArrayList => JArrayList, HashMap => JHashMap, Map => JMap}
 
-import backtype.storm.{StormSubmitter, Config}
 import backtype.storm.topology.TopologyBuilder
-import io.gearpump.cluster.main.{CLIOption, ArgumentsParser}
-import storm.kafka.{ZkHosts, SpoutConfig, KafkaSpout}
+import backtype.storm.{Config, StormSubmitter}
 import storm.kafka.bolt.KafkaBolt
+import storm.kafka.{KafkaSpout, SpoutConfig, ZkHosts}
+
+import io.gearpump.cluster.main.{ArgumentsParser, CLIOption}
 
 /**
-  * tests Storm 0.9.x compatibility over Gearpump
-  * this example reads data from Kafka and writes back to it
-  */
+ * Tests Storm 0.9.x compatibility over Gearpump
+ * this example reads data from Kafka and writes back to it
+ */
 object Storm09KafkaTopology extends App with ArgumentsParser {
 
   override val options: Array[(String, CLIOption[Any])] = Array(
     "topologyName" -> CLIOption[Int]("<Storm topology name>", required = true),
     "sourceTopic" -> CLIOption[String]("<Kafka topic to read data>", required 
= true),
     "sinkTopic" -> CLIOption[String]("<Kafka topic to write data>", required = 
true),
-    "zookeeperConnect" -> CLIOption[String]("<Zookeeper connect string, e.g. 
localhost:2181/kafka>", required = true),
+    "zookeeperConnect" -> CLIOption[String]("<Zookeeper connect string, e.g. 
localhost:2181/kafka>",
+      required = true),
     "brokerList" -> CLIOption[String]("<Kafka broker list, e.g. 
localhost:9092>", required = true),
-    "spoutNum" -> CLIOption[Int]("<how many spout tasks>", required = false, 
defaultValue = Some(1)),
+    "spoutNum" -> CLIOption[Int]("<how many spout tasks>", required = false,
+      defaultValue = Some(1)),
     "boltNum" -> CLIOption[Int]("<how many bolt tasks>", required = false, 
defaultValue = Some(1))
   )
 
@@ -51,7 +54,8 @@ object Storm09KafkaTopology extends App with ArgumentsParser {
   val boltNum = configs.getInt("boltNum")
 
   val topologyBuilder = new TopologyBuilder()
-  val kafkaSpout: KafkaSpout = new KafkaSpout(getSpoutConfig(sourceTopic, 
zookeeperConnect, topologyName))
+  val kafkaSpout: KafkaSpout = new KafkaSpout(getSpoutConfig(sourceTopic, 
zookeeperConnect,
+    topologyName))
   val kafkaBolt: KafkaBolt[Array[Byte], Array[Byte]] = new 
KafkaBolt[Array[Byte], Array[Byte]]()
   val adaptor = new Adaptor
   topologyBuilder.setSpout("kafka_spout", kafkaSpout, spoutNum)

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/jvm.sbt
----------------------------------------------------------------------
diff --git a/jvm.sbt b/jvm.sbt
index 341079f..c9e80d2 100644
--- a/jvm.sbt
+++ b/jvm.sbt
@@ -1,4 +1,30 @@
-parallelExecution in (ThisBuild, Test) := false
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+parallelExecution in(ThisBuild, Test) := false
+
+scalacOptions in(ThisBuild) ++= 
+  // Show more detailed warnings.
+  Seq("-unchecked", "-feature", "-deprecation", "-Yinline-warnings",
+    // Disable postfix, and other advanced scala features,
+    "-language:-dynamics", "-language:-postfixOps", 
"-language:-reflectiveCalls",
+    "-language:-existentials"
+  )
 
 // http://www.scala-sbt.org/0.13/docs/Testing.html
 logBuffered in IntegrationTest := false

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/notes/0.2.3.markdown
----------------------------------------------------------------------
diff --git a/notes/0.2.3.markdown b/notes/0.2.3.markdown
index 5c0c757..8fb44ed 100644
--- a/notes/0.2.3.markdown
+++ b/notes/0.2.3.markdown
@@ -2,7 +2,7 @@ Change List:
 ---------------
 
 #333, KafkaUtilSpec causes out of memory on travis
-#335, #359, Enable auto-deployment to sonatype
+#335, #359, Enable auto-deployment to sonatype
 #299, Some UT may fail randomly, most because of the expectMsg time out
 #338, fix kafka leader not available exception
 #349, scoverage dependencies get into snapshot build binaries.

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/notes/0.3.5.markdown
----------------------------------------------------------------------
diff --git a/notes/0.3.5.markdown b/notes/0.3.5.markdown
index a8f1bcf..fa02ca2 100644
--- a/notes/0.3.5.markdown
+++ b/notes/0.3.5.markdown
@@ -5,7 +5,7 @@ Change list
  - #775, fix netty config
  - #778, log improvements
  - #781 when launching lots of tasks, the application failed to transfer 
message across hosts 
- - #782, a) add wildcard match to return metrics(support glob char … and *), 
b) add diagnosis message if the clock stop advancing
+ - #782, a) add wildcard match to return metrics(support glob char . and *), 
b) add diagnosis message if the clock stop advancing
  - #786, Read user config from classpath, the appmaster/executor wil use the 
dynamic user config
  - #773: skew chart will show relative skew
  - #790, 1) return detail task data in appmaster REST. 2) bind executor id 
with executor system id

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/notes/0.4.1.markdown
----------------------------------------------------------------------
diff --git a/notes/0.4.1.markdown b/notes/0.4.1.markdown
index 9155235..5209858 100644
--- a/notes/0.4.1.markdown
+++ b/notes/0.4.1.markdown
@@ -1,6 +1,5 @@
 # Gearpump 0.4.1
 
-
 Change logs:
 -----------------
 

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/notes/0.4.markdown
----------------------------------------------------------------------
diff --git a/notes/0.4.markdown b/notes/0.4.markdown
index cdeec93..d355c8d 100644
--- a/notes/0.4.markdown
+++ b/notes/0.4.markdown
@@ -17,7 +17,7 @@
  - #1149: Shell tools printed too much detail on console
  - #1146: actor hungry when worker use block-io to wait response from 
FileServer.
  - #1088: move hbase code to external/
- - #1140:pass app name to task
+ - #1140: pass app name to task
  - #1017: Split daemon dependencies with core dependencies
  - #1144: fix out of memory when trying to scale gearpump to 2000 task on a 2 
core machine
  - #995: Command line parser should be able to fall back  to MAIN-CLASS 
definition in MANIFEST.IN when mainClass is not specified in command line 
options.

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/notes/0.8.0.markdown
----------------------------------------------------------------------
diff --git a/notes/0.8.0.markdown b/notes/0.8.0.markdown
index 02bd5d9..8910c56 100644
--- a/notes/0.8.0.markdown
+++ b/notes/0.8.0.markdown
@@ -40,7 +40,6 @@ After the transition period, the proposed process is like 
this:
 
 Before completing importing source code to Apache Git, we will still use
 
-
 ## Why we make a tag release now, but not wait until Apache importing complete?
 
 There are quite a lot of open task at 
https://issues.apache.org/jira/browse/GEARPUMP-1, which

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/project/Build.scala
----------------------------------------------------------------------
diff --git a/project/Build.scala b/project/Build.scala
index 5b95612..ad775bd 100644
--- a/project/Build.scala
+++ b/project/Build.scala
@@ -1,6 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import com.typesafe.sbt.SbtPgp.autoImport._
 import BuildExample.examples
 import BuildIntegrationTest.integration_test
-import com.typesafe.sbt.SbtPgp.autoImport._
 import de.johoop.jacoco4sbt.JacocoPlugin.jacoco
 import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
 import sbt.Keys._
@@ -13,13 +31,11 @@ import sbtunidoc.Plugin.UnidocKeys._
 import sbtunidoc.Plugin._
 import xerial.sbt.Sonatype._
 
-
 object Build extends sbt.Build {
 
-
   val copySharedSourceFiles = TaskKey[Unit]("copied shared services source 
code")
 
-  val akkaVersion = "2.4.2"
+  val akkaVersion = "2.4.3"
   val kryoVersion = "0.3.2"
   val clouderaVersion = "2.6.0-cdh5.4.2"
   val clouderaHBaseVersion = "1.0.0-cdh5.4.2"
@@ -44,7 +60,7 @@ object Build extends sbt.Build {
   val scalaTestVersion = "2.2.0"
   val scalaCheckVersion = "1.11.3"
   val mockitoVersion = "1.10.17"
-  val bijectionVersion = "0.7.0"
+  val bijectionVersion = "0.8.0"
   val scalazVersion = "7.1.1"
   val algebirdVersion = "0.9.0"
   val chillVersion = "0.6.0"
@@ -52,24 +68,23 @@ object Build extends sbt.Build {
   val projectName = "gearpump"
 
   override def projects: Seq[Project] = (super.projects.toList ++ 
BuildExample.projects.toList
-      ++ Pack.projects.toList).toSeq
+    ++ Pack.projects.toList).toSeq
 
-
-  val commonSettings = Seq(jacoco.settings:_*) ++ sonatypeSettings ++
+  val commonSettings = Seq(jacoco.settings: _*) ++ sonatypeSettings ++
     Seq(
-        resolvers ++= Seq(
-          "patriknw at bintray" at "http://dl.bintray.com/patriknw/maven";,
-          "maven-repo" at "http://repo.maven.apache.org/maven2";,
-          "maven1-repo" at "http://repo1.maven.org/maven2";,
-          "maven2-repo" at "http://mvnrepository.com/artifact";,
-          "sonatype" at 
"https://oss.sonatype.org/content/repositories/releases";,
-          "bintray/non" at "http://dl.bintray.com/non/maven";,
-          "cloudera" at 
"https://repository.cloudera.com/artifactory/cloudera-repos";,
-          "clockfly" at "http://dl.bintray.com/clockfly/maven";,
-          "vincent" at "http://dl.bintray.com/fvunicorn/maven";,
-          "clojars" at "http://clojars.org/repo";
-        )
-        // ,addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0-M5" 
cross CrossVersion.full)
+      resolvers ++= Seq(
+        "patriknw at bintray" at "http://dl.bintray.com/patriknw/maven";,
+        "maven-repo" at "http://repo.maven.apache.org/maven2";,
+        "maven1-repo" at "http://repo1.maven.org/maven2";,
+        "maven2-repo" at "http://mvnrepository.com/artifact";,
+        "sonatype" at "https://oss.sonatype.org/content/repositories/releases";,
+        "bintray/non" at "http://dl.bintray.com/non/maven";,
+        "cloudera" at 
"https://repository.cloudera.com/artifactory/cloudera-repos";,
+        "clockfly" at "http://dl.bintray.com/clockfly/maven";,
+        "vincent" at "http://dl.bintray.com/fvunicorn/maven";,
+        "clojars" at "http://clojars.org/repo";
+      )
+      // ,addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0-M5" cross 
CrossVersion.full)
     ) ++
     Seq(
       scalaVersion := scalaVersionNumber,
@@ -78,50 +93,51 @@ object Build extends sbt.Build {
       useGpg := false,
       pgpSecretRing := file("./secring.asc"),
       pgpPublicRing := file("./pubring.asc"),
-      scalacOptions ++= Seq("-Yclosure-elim","-Yinline"),
+      scalacOptions ++= Seq("-Yclosure-elim", "-Yinline"),
       publishMavenStyle := true,
 
       pgpPassphrase := 
Option(System.getenv().get("PASSPHRASE")).map(_.toArray),
       credentials += Credentials(
-                   "Sonatype Nexus Repository Manager",
-                   "oss.sonatype.org",
-                   System.getenv().get("SONATYPE_USERNAME"),
-                   System.getenv().get("SONATYPE_PASSWORD")),
-      
+        "Sonatype Nexus Repository Manager",
+        "oss.sonatype.org",
+        System.getenv().get("SONATYPE_USERNAME"),
+        System.getenv().get("SONATYPE_PASSWORD")),
+
       pomIncludeRepository := { _ => false },
 
       publishTo := {
         val nexus = "https://oss.sonatype.org/";
-        if (isSnapshot.value)
+        if (isSnapshot.value) {
           Some("snapshots" at nexus + "content/repositories/snapshots")
-        else
-          Some("releases"  at nexus + "service/local/staging/deploy/maven2")
+        } else {
+          Some("releases" at nexus + "service/local/staging/deploy/maven2")
+        }
       },
 
       publishArtifact in Test := true,
 
       pomExtra := {
-      <url>https://github.com/intel-hadoop/gearpump</url>
-      <licenses>
-        <license>
-          <name>Apache 2</name>
-          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-        </license>
-      </licenses>
-      <scm>
-        <connection>scm:git:github.com/intel-hadoop/gearpump</connection>
-        
<developerConnection>scm:git:[email protected]:intel-hadoop/gearpump</developerConnection>
-        <url>github.com/intel-hadoop/gearpump</url>
-      </scm>
-      <developers>
-        <developer>
-          <id>gearpump</id>
-          <name>Gearpump Team</name>
-          <url>https://github.com/intel-hadoop/teams/gearpump</url>
-        </developer>
-      </developers>
-    }
-  )
+        <url>https://github.com/intel-hadoop/gearpump</url>
+          <licenses>
+            <license>
+              <name>Apache 2</name>
+              <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            </license>
+          </licenses>
+          <scm>
+            <connection>scm:git:github.com/intel-hadoop/gearpump</connection>
+            
<developerConnection>scm:git:[email protected]:intel-hadoop/gearpump</developerConnection>
+            <url>github.com/intel-hadoop/gearpump</url>
+          </scm>
+          <developers>
+            <developer>
+              <id>gearpump</id>
+              <name>Gearpump Team</name>
+              <url>https://github.com/intel-hadoop/teams/gearpump</url>
+            </developer>
+          </developers>
+      }
+    )
 
   val noPublish = Seq(
     publish := {},
@@ -135,10 +151,10 @@ object Build extends sbt.Build {
       "com.typesafe.akka" %% "akka-cluster" % akkaVersion,
       "com.typesafe.akka" %% "akka-cluster-tools" % akkaVersion,
       "com.typesafe.akka" %% "akka-http-experimental" % akkaVersion,
-      "com.typesafe.akka" %% "akka-http-spray-json-experimental"% akkaVersion,
+      "com.typesafe.akka" %% "akka-http-spray-json-experimental" % akkaVersion,
       "commons-logging" % "commons-logging" % commonsLoggingVersion,
       "com.typesafe.akka" %% "akka-distributed-data-experimental" % 
akkaVersion,
-      "org.apache.hadoop" % "hadoop-common" % clouderaVersion  % "provided"
+      "org.apache.hadoop" % "hadoop-common" % clouderaVersion % "provided"
     )
   )
 
@@ -149,41 +165,42 @@ object Build extends sbt.Build {
   )
 
   val coreDependencies = Seq(
-        libraryDependencies ++= Seq(
-        "com.github.intel-hadoop" % "gearpump-shaded-metrics-graphite" % 
codahaleVersion,
-        "org.slf4j" % "slf4j-api" % slf4jVersion,
-        "org.slf4j" % "slf4j-log4j12" % slf4jVersion,
-        "com.github.intel-hadoop" % "gearpump-shaded-guava" % guavaVersion,
-        "commons-lang" % "commons-lang" % commonsLangVersion,
-
-        /**
-         * Override Netty version 3.10.3.Final used by Akka 2.4.2 to 
work-around netty hang issue
-         * (https://github.com/gearpump/gearpump/issues/2020)
-         *
-         * Akka 2.4.2 by default use Netty 3.10.3.Final, which has a serious 
issue which can hang the
-         * network. The same issue also happens in version range 
(3.10.0.Final, 3.10.5.Final)
-         * Netty 3.10.6.Final have this issue fixed, however, we find there is 
a 20% performance drop.
-         * So we decided to downgrade netty to 3.8.0.Final (Same version used 
in akka 2.3.12).
-         *
-         * @see https://github.com/gearpump/gearpump/pull/2017 for more 
discussions.
-         */
-        "io.netty" % "netty" % "3.8.0.Final",
-        "com.typesafe.akka" %% "akka-remote" % akkaVersion
-          exclude("io.netty", "netty"),
-
-          "com.typesafe.akka" %% "akka-actor" % akkaVersion,
-          "com.typesafe.akka" %% "akka-agent" % akkaVersion,
-        "com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
-        "com.typesafe.akka" %% "akka-kernel" % akkaVersion,
-        "com.github.intel-hadoop" %% "gearpump-shaded-akka-kryo" % kryoVersion,
-        "org.scala-lang" % "scala-reflect" % scalaVersionNumber,
-        "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4",
-        "com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
-        "org.scalatest" %% "scalatest" % scalaTestVersion % "test",
-        "org.scalacheck" %% "scalacheck" % scalaCheckVersion % "test",
-        "org.mockito" % "mockito-core" % mockitoVersion % "test",
-        "junit" % "junit" % junitVersion % "test"
-      )
+    libraryDependencies ++= Seq(
+      "com.github.intel-hadoop" % "gearpump-shaded-metrics-graphite" % 
codahaleVersion,
+      "org.slf4j" % "slf4j-api" % slf4jVersion,
+      "org.slf4j" % "slf4j-log4j12" % slf4jVersion,
+      "com.github.intel-hadoop" % "gearpump-shaded-guava" % guavaVersion,
+      "commons-lang" % "commons-lang" % commonsLangVersion,
+      "com.google.code.findbugs" % "jsr305" % "1.3.9" % "compile",
+
+      /**
+       * Overrides Netty version 3.10.3.Final used by Akka 2.4.2 to 
work-around netty hang issue
+       * (https://github.com/gearpump/gearpump/issues/2020)
+       *
+       * Akka 2.4.2 by default use Netty 3.10.3.Final, which has a serious 
issue which can hang
+       * the network. The same issue also happens in version range 
(3.10.0.Final, 3.10.5.Final)
+       * Netty 3.10.6.Final have this issue fixed, however, we find there is a 
20% performance
+       * drop. So we decided to downgrade netty to 3.8.0.Final (Same version 
used in akka 2.3.12).
+       *
+       * @see https://github.com/gearpump/gearpump/pull/2017 for more 
discussions.
+       */
+      "io.netty" % "netty" % "3.8.0.Final",
+      "com.typesafe.akka" %% "akka-remote" % akkaVersion
+        exclude("io.netty", "netty"),
+
+      "com.typesafe.akka" %% "akka-actor" % akkaVersion,
+      "com.typesafe.akka" %% "akka-agent" % akkaVersion,
+      "com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
+      "com.typesafe.akka" %% "akka-kernel" % akkaVersion,
+      "com.github.intel-hadoop" %% "gearpump-shaded-akka-kryo" % kryoVersion,
+      "org.scala-lang" % "scala-reflect" % scalaVersionNumber,
+      "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4",
+      "com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
+      "org.scalatest" %% "scalatest" % scalaTestVersion % "test",
+      "org.scalacheck" %% "scalacheck" % scalaCheckVersion % "test",
+      "org.mockito" % "mockito-core" % mockitoVersion % "test",
+      "junit" % "junit" % junitVersion % "test"
+    )
   )
 
   lazy val javadocSettings = Seq(
@@ -194,43 +211,54 @@ object Build extends sbt.Build {
 
   val myAssemblySettings = assemblySettings ++ Seq(
     test in assembly := {},
-    assemblyOption in assembly ~= { _.copy(includeScala = false) },
-    jarName in assembly := { 
s"${name.value.split("-").last}-${scalaBinaryVersion.value}-${version.value}-assembly.jar"
 }
+    assemblyOption in assembly ~= {
+      _.copy(includeScala = false)
+    },
+    jarName in assembly := {
+      
s"${name.value.split("-").last}-${scalaBinaryVersion.value}-${version.value}-assembly.jar"
+    }
   )
 
-  val projectsWithDoc = inProjects(core, streaming, external_kafka, 
external_monoid, external_serializer, external_hbase, external_hadoopfs, 
daemon, streaming)
+  val projectsWithDoc = inProjects(
+    core,
+    streaming,
+    external_kafka,
+    external_monoid,
+    external_serializer,
+    external_hbase,
+    external_hadoopfs,
+    streaming)
 
   lazy val gearpumpUnidocSetting = scalaJavaUnidocSettings ++ Seq(
-    unidocProjectFilter in (ScalaUnidoc, unidoc) := projectsWithDoc,
-    unidocProjectFilter in (JavaUnidoc, unidoc) := projectsWithDoc,
+    unidocProjectFilter in(ScalaUnidoc, unidoc) := projectsWithDoc,
+    unidocProjectFilter in(JavaUnidoc, unidoc) := projectsWithDoc,
 
-    unidocAllSources in (ScalaUnidoc, unidoc) := {
-      ignoreUndocumentedPackages((unidocAllSources in (ScalaUnidoc, 
unidoc)).value)
+    unidocAllSources in(ScalaUnidoc, unidoc) := {
+      ignoreUndocumentedPackages((unidocAllSources in(ScalaUnidoc, 
unidoc)).value)
     },
 
     // Skip class names containing $ and some internal packages in Javadocs
-    unidocAllSources in (JavaUnidoc, unidoc) := {
-      ignoreUndocumentedPackages((unidocAllSources in (JavaUnidoc, 
unidoc)).value)
+    unidocAllSources in(JavaUnidoc, unidoc) := {
+      ignoreUndocumentedPackages((unidocAllSources in(JavaUnidoc, 
unidoc)).value)
     }
   )
 
   private def ignoreUndocumentedPackages(packages: Seq[Seq[File]]): 
Seq[Seq[File]] = {
-    packages //.map(_.filterNot(_.getName.contains("$")))
-      .map(_.filterNot(_.getCanonicalPath.contains("akka")))
+    packages.map(_.filterNot(_.getCanonicalPath.contains("akka")))
   }
 
   lazy val root = Project(
     id = "gearpump",
     base = file("."),
-    settings = commonSettings ++ noPublish ++ gearpumpUnidocSetting
-  ).aggregate(core, daemon, streaming,  services, external_kafka, 
external_monoid, external_serializer,
-      examples, storm, yarn, external_hbase, packProject, external_hadoopfs,
-      integration_test).settings(Defaults.itSettings : _*)
+    settings = commonSettings ++ noPublish ++ gearpumpUnidocSetting)
+    .aggregate(core, daemon, streaming, services, external_kafka, 
external_monoid,
+      external_serializer, examples, storm, yarn, external_hbase, packProject,
+      external_hadoopfs, integration_test).settings(Defaults.itSettings: _*)
 
   lazy val core = Project(
     id = "gearpump-core",
     base = file("core"),
-    settings = commonSettings ++ coreDependencies
+    settings = commonSettings ++ javadocSettings ++ coreDependencies
   )
 
   lazy val daemon = Project(
@@ -243,23 +271,23 @@ object Build extends sbt.Build {
     id = "gearpump-experimental-cgroup",
     base = file("experiments/cgroup"),
     settings = commonSettings ++ noPublish ++ daemonDependencies
-  ) dependsOn(core % "test->test; compile->compile")
+  ) dependsOn (core % "test->test; compile->compile")
 
   lazy val streaming = Project(
     id = "gearpump-streaming",
     base = file("streaming"),
     settings = commonSettings ++ javadocSettings ++ streamingDependencies
-  )  dependsOn(core % "test->test; compile->compile", daemon % "test->test")
+  ) dependsOn(core % "test->test; compile->compile", daemon % "test->test")
 
   lazy val external_kafka = Project(
     id = "gearpump-external-kafka",
     base = file("external/kafka"),
-    settings = commonSettings ++
+    settings = commonSettings ++ javadocSettings  ++
       Seq(
         libraryDependencies ++= Seq(
           "org.apache.kafka" %% "kafka" % kafkaVersion,
           "com.twitter" %% "bijection-core" % bijectionVersion,
-          ("org.apache.kafka" %% "kafka" % kafkaVersion classifier("test")) % 
"test"
+          ("org.apache.kafka" %% "kafka" % kafkaVersion classifier ("test")) % 
"test"
         )
       )
   ) dependsOn (streaming % "test->test; provided")
@@ -272,24 +300,29 @@ object Build extends sbt.Build {
 
   val distDashboardDirectory = 
s"${distDirectory}/target/pack/dashboard/views/scalajs"
 
+  // ScalaJs project need to be build seperately.
+  // sbt "project gearpump-servicesJS" compile
   lazy val serviceJS: Project = services_full.js.settings(serviceJSSettings: 
_*)
 
   lazy val services: Project = services_full.jvm.
-    settings(serviceJvmSettings: _*).
-    settings(compile in Compile <<= (compile in Compile) dependsOn (fastOptJS 
in (serviceJS, Compile))).
-    dependsOn(streaming % "test->test;compile->compile", daemon % 
"test->test;compile->compile;provided")
+    settings(serviceJvmSettings: _*)
+    .settings(compile in Compile <<= (compile in Compile))
+    .dependsOn(streaming % "test->test;compile->compile",
+      daemon % "test->test;compile->compile;provided")
 
   lazy val serviceJvmSettings = commonSettings ++ noPublish ++ Seq(
     libraryDependencies ++= Seq(
-      "com.typesafe.akka" %% "akka-http-testkit"% akkaVersion % "test",
+      "com.typesafe.akka" %% "akka-http-testkit" % akkaVersion % "test",
       "org.scalatest" %% "scalatest" % scalaTestVersion % "test",
       "com.lihaoyi" %% "upickle" % upickleVersion,
-      "com.softwaremill" %% "akka-http-session" % "0.1.4",
-      "com.typesafe.akka" %% "akka-http-spray-json-experimental"% akkaVersion,
+      "com.softwaremill.akka-http-session" %% "core" % "0.2.5",
+      "com.typesafe.akka" %% "akka-http-spray-json-experimental" % akkaVersion,
       "com.github.scribejava" % "scribejava-apis" % "2.4.0",
       "com.ning" % "async-http-client" % "1.9.33",
       "org.webjars" % "angularjs" % "1.4.9",
-      "org.webjars.npm" % "angular-touch" % "1.5.0", // angular 1.5 breaks 
ui-select, but we need ng-touch 1.5
+
+      // angular 1.5 breaks ui-select, but we need ng-touch 1.5
+      "org.webjars.npm" % "angular-touch" % "1.5.0",
       "org.webjars" % "angular-ui-router" % "0.2.15",
       "org.webjars" % "bootstrap" % "3.3.6",
       "org.webjars" % "d3js" % "3.5.6",
@@ -309,7 +342,8 @@ object Build extends sbt.Build {
       "org.webjars.bower" % "clipboard.js" % "0.1.1",
       "org.webjars.npm" % "dashing-deps" % "0.1.2",
       "org.webjars.npm" % "dashing" % "0.4.8"
-  ).map(_.exclude("org.scalamacros", 
"quasiquotes_2.10")).map(_.exclude("org.scalamacros", "quasiquotes_2.10.3")))
+    ).map(_.exclude("org.scalamacros", "quasiquotes_2.10"))
+      .map(_.exclude("org.scalamacros", "quasiquotes_2.10.3")))
 
   lazy val serviceJSSettings = Seq(
     scalaVersion := scalaVersionNumber,
@@ -317,22 +351,27 @@ object Build extends sbt.Build {
     checksums := Seq(""),
     requiresDOM := true,
     libraryDependencies ++= Seq(
-//      "com.lihaoyi" %%% "upickle" % upickleVersion,
-//      "com.lihaoyi" %%% "utest" % "0.3.1"
+      "com.lihaoyi" %%% "upickle" % upickleVersion,
+      "com.lihaoyi" %%% "utest" % "0.3.1"
     ),
     scalaJSStage in Global := FastOptStage,
     testFrameworks += new TestFramework("utest.runner.Framework"),
     requiresDOM := true,
-    persistLauncher in Compile:= false,
-    persistLauncher in Test:= false,
+    persistLauncher in Compile := false,
+    persistLauncher in Test := false,
     skip in packageJSDependencies := false,
-    scoverage.ScoverageSbtPlugin.ScoverageKeys.coverageExcludedPackages := 
".*gearpump\\.dashboard.*",
+    scoverage.ScoverageSbtPlugin.ScoverageKeys.coverageExcludedPackages :=
+      ".*gearpump\\.dashboard.*",
 
     copySharedSourceFiles := {
+      // scalastyle:off println
       println(s"Copy shared source code to project services...")
+      // scalastyle:on println
     },
 
-    artifactPath in fastOptJS in Compile := new 
java.io.File(distDashboardDirectory, moduleName.value + "-fastopt.js"),
+    artifactPath in fastOptJS in Compile :=
+      new java.io.File(distDashboardDirectory, moduleName.value + 
"-fastopt.js"),
+
     fastOptJS in Compile <<= (fastOptJS in 
Compile).dependsOn(copySharedSourceFiles),
 
     relativeSourceMaps := true,
@@ -346,9 +385,9 @@ object Build extends sbt.Build {
         libraryDependencies ++= Seq(
           "org.json4s" %% "json4s-jackson" % "3.2.11"
         ),
-        mainClass in (Compile, packageBin) := 
Some("akka.stream.gearpump.example.Test")
+        mainClass in(Compile, packageBin) := 
Some("akka.stream.gearpump.example.Test")
       )
-  ) dependsOn (streaming % "test->test; provided", daemon % "test->test; 
provided")
+  ) dependsOn(streaming % "test->test; provided", daemon % "test->test; 
provided")
 
   lazy val storm = Project(
     id = "gearpump-experiments-storm",
@@ -406,7 +445,7 @@ object Build extends sbt.Build {
   lazy val external_hbase = Project(
     id = "gearpump-external-hbase",
     base = file("external/hbase"),
-    settings = commonSettings ++
+    settings = commonSettings ++ javadocSettings  ++
       Seq(
         resolvers ++= Seq(
           "cloudera" at 
"https://repository.cloudera.com/artifactory/cloudera-repos";
@@ -416,6 +455,9 @@ object Build extends sbt.Build {
         libraryDependencies ++= Seq(
           "org.apache.hadoop" % "hadoop-common" % clouderaVersion % "provided",
           "org.apache.hadoop" % "hadoop-hdfs" % clouderaVersion % "provided",
+          "org.apache.hadoop" % "hadoop-mapreduce-client-core" % 
clouderaVersion % "provided",
+          "org.codehaus.jackson" % "jackson-core-asl" % "1.9.13" % "provided",
+          "org.codehaus.jackson" % "jackson-mapper-asl" % "1.9.13" % 
"provided",
           "org.apache.hbase" % "hbase-client" % clouderaHBaseVersion
             exclude("com.github.stephenc.findbugs", "findbugs-annotations")
             exclude("com.google.guava", "guava")
@@ -441,42 +483,41 @@ object Build extends sbt.Build {
             exclude("log4j", "log4j")
         )
       )
-  ) dependsOn(streaming % "test->test; provided")
+  ) dependsOn (streaming % "test->test; provided")
 
   lazy val external_monoid = Project(
     id = "gearpump-external-monoid",
     base = file("external/monoid"),
-    settings = commonSettings ++
-        Seq(
-          libraryDependencies ++= Seq(
-            "com.twitter" %% "algebird-core" % algebirdVersion
-          )
+    settings = commonSettings ++ javadocSettings  ++
+      Seq(
+        libraryDependencies ++= Seq(
+          "com.twitter" %% "algebird-core" % algebirdVersion
         )
-  ) dependsOn(streaming % "provided")
+      )
+  ) dependsOn (streaming % "provided")
 
   lazy val external_serializer = Project(
     id = "gearpump-external-serializer",
     base = file("external/serializer"),
-    settings = commonSettings ++
-        Seq(
-          libraryDependencies ++= Seq(
-            "com.twitter" %% "chill-bijection" % chillVersion
-              exclude("com.esotericsoftware.kryo", "kyro")
-              exclude("com.esotericsoftware.minlog", "minlog")
-          )
+    settings = commonSettings ++ javadocSettings  ++
+      Seq(
+        libraryDependencies ++= Seq(
+          "com.twitter" %% "chill-bijection" % chillVersion
+            exclude("com.esotericsoftware.kryo", "kyro")
+            exclude("com.esotericsoftware.minlog", "minlog")
         )
-  ) dependsOn(streaming % "provided")
+      )
+  ) dependsOn (streaming % "provided")
 
   lazy val external_hadoopfs = Project(
     id = "gearpump-external-hadoopfs",
     base = file("external/hadoopfs"),
-    settings = commonSettings ++
-        Seq(
-          libraryDependencies ++= Seq(
-            "org.apache.hadoop" % "hadoop-common" % clouderaVersion  % 
"provided",
-            "org.apache.hadoop" % "hadoop-hdfs" % clouderaVersion % "provided"
-          )
+    settings = commonSettings ++ javadocSettings ++
+      Seq(
+        libraryDependencies ++= Seq(
+          "org.apache.hadoop" % "hadoop-common" % clouderaVersion % "provided",
+          "org.apache.hadoop" % "hadoop-hdfs" % clouderaVersion % "provided"
         )
-  ) dependsOn(streaming % "test->test; provided")
-
+      )
+  ) dependsOn (streaming % "test->test; provided")
 }

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/project/BuildExample.scala
----------------------------------------------------------------------
diff --git a/project/BuildExample.scala b/project/BuildExample.scala
index 0bee08e..3bd93c3 100644
--- a/project/BuildExample.scala
+++ b/project/BuildExample.scala
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import sbt.Keys._
 import sbt._
 import Build._
@@ -9,152 +27,171 @@ object BuildExample extends sbt.Build {
     id = "gearpump-examples",
     base = file("examples"),
     settings = commonSettings ++ noPublish
-  ) aggregate (wordcount, wordcountJava, complexdag, sol, fsio, examples_kafka,
-      distributedshell, stockcrawler, transport, examples_state, pagerank, 
distributeservice)
+  ) aggregate(wordcount, wordcountJava, complexdag, sol, fsio, examples_kafka,
+    distributedshell, stockcrawler, transport, examples_state, pagerank, 
distributeservice)
 
   lazy val wordcountJava = Project(
     id = "gearpump-examples-wordcountjava",
     base = file("examples/streaming/wordcount-java"),
     settings = commonSettings ++ noPublish ++ myAssemblySettings ++
       Seq(
-        mainClass in (Compile, packageBin) := 
Some("io.gearpump.streaming.examples.wordcountjava.WordCount"),
+        mainClass in(Compile, packageBin) :=
+          Some("io.gearpump.streaming.examples.wordcountjava.WordCount"),
+
         target in assembly := baseDirectory.value.getParentFile.getParentFile 
/ "target" /
           CrossVersion.binaryScalaVersion(scalaVersion.value)
       )
-  ) dependsOn (streaming % "test->test; provided", daemon % "test->test; 
provided")
+  ) dependsOn(streaming % "test->test; provided", daemon % "test->test; 
provided")
 
   lazy val wordcount = Project(
     id = "gearpump-examples-wordcount",
     base = file("examples/streaming/wordcount"),
     settings = commonSettings ++ noPublish ++ myAssemblySettings ++
-        Seq(
-          mainClass in (Compile, packageBin) := 
Some("io.gearpump.streaming.examples.wordcount.WordCount"),
-          target in assembly := 
baseDirectory.value.getParentFile.getParentFile / "target" /
-              CrossVersion.binaryScalaVersion(scalaVersion.value)
-        )
-  ) dependsOn (streaming % "test->test; provided", daemon % "test->test; 
provided")
+      Seq(
+        mainClass in(Compile, packageBin) :=
+          Some("io.gearpump.streaming.examples.wordcount.WordCount"),
+
+        target in assembly := baseDirectory.value.getParentFile.getParentFile 
/ "target" /
+          CrossVersion.binaryScalaVersion(scalaVersion.value)
+      )
+  ) dependsOn(streaming % "test->test; provided", daemon % "test->test; 
provided")
 
   lazy val sol = Project(
     id = "gearpump-examples-sol",
     base = file("examples/streaming/sol"),
     settings = commonSettings ++ noPublish ++ myAssemblySettings ++
-        Seq(
-          mainClass in (Compile, packageBin) := 
Some("io.gearpump.streaming.examples.sol.SOL"),
-          target in assembly := 
baseDirectory.value.getParentFile.getParentFile / "target" /
-              CrossVersion.binaryScalaVersion(scalaVersion.value)
+      Seq(
+        mainClass in(Compile, packageBin) := 
Some("io.gearpump.streaming.examples.sol.SOL"),
+        target in assembly := baseDirectory.value.getParentFile.getParentFile 
/ "target" /
+          CrossVersion.binaryScalaVersion(scalaVersion.value)
 
-        )
+      )
   ) dependsOn (streaming % "test->test; provided")
 
   lazy val complexdag = Project(
     id = "gearpump-examples-complexdag",
     base = file("examples/streaming/complexdag"),
     settings = commonSettings ++ noPublish ++ myAssemblySettings ++
-        Seq(
-          mainClass in (Compile, packageBin) := 
Some("io.gearpump.streaming.examples.complexdag.Dag"),
-          target in assembly := 
baseDirectory.value.getParentFile.getParentFile / "target" /
-              CrossVersion.binaryScalaVersion(scalaVersion.value)
-        )
+      Seq(
+        mainClass in(Compile, packageBin) :=
+          Some("io.gearpump.streaming.examples.complexdag.Dag"),
+
+        target in assembly := baseDirectory.value.getParentFile.getParentFile 
/ "target" /
+          CrossVersion.binaryScalaVersion(scalaVersion.value)
+      )
   ) dependsOn (streaming % "test->test; provided")
 
   lazy val transport = Project(
     id = "gearpump-examples-transport",
     base = file("examples/streaming/transport"),
-    settings = commonSettings ++ noPublish ++ 
-        Seq(
-          libraryDependencies ++= Seq(
-            "io.spray" %%  "spray-can"       % sprayVersion,
-            "io.spray" %%  "spray-routing-shapeless2"   % sprayVersion,
-            "io.spray" %%  "spray-json"    % sprayJsonVersion,
-            "com.lihaoyi" %% "upickle" % upickleVersion
-          ),
-          mainClass in (Compile, packageBin) := 
Some("io.gearpump.streaming.examples.transport.Transport"),
-          target in assembly := 
baseDirectory.value.getParentFile.getParentFile / "target" /
-              CrossVersion.binaryScalaVersion(scalaVersion.value)
-        )
+    settings = commonSettings ++ noPublish ++
+      Seq(
+        libraryDependencies ++= Seq(
+          "io.spray" %% "spray-can" % sprayVersion,
+          "io.spray" %% "spray-routing-shapeless2" % sprayVersion,
+          "io.spray" %% "spray-json" % sprayJsonVersion,
+          "com.lihaoyi" %% "upickle" % upickleVersion
+        ),
+        mainClass in(Compile, packageBin) :=
+          Some("io.gearpump.streaming.examples.transport.Transport"),
+
+        target in assembly := baseDirectory.value.getParentFile.getParentFile 
/ "target" /
+          CrossVersion.binaryScalaVersion(scalaVersion.value)
+      )
   ) dependsOn (streaming % "test->test; provided")
 
   lazy val distributedshell = Project(
     id = "gearpump-examples-distributedshell",
     base = file("examples/distributedshell"),
     settings = commonSettings ++ noPublish ++ myAssemblySettings ++
-        Seq(
-          mainClass in (Compile, packageBin) := 
Some("io.gearpump.examples.distributedshell.DistributedShell"),
-          target in assembly := baseDirectory.value.getParentFile / "target" /
-              CrossVersion.binaryScalaVersion(scalaVersion.value)
-        )
-  ) dependsOn(daemon % "test->test; provided")
+      Seq(
+        mainClass in(Compile, packageBin) :=
+          Some("io.gearpump.examples.distributedshell.DistributedShell"),
+
+        target in assembly := baseDirectory.value.getParentFile / "target" /
+          CrossVersion.binaryScalaVersion(scalaVersion.value)
+      )
+  ) dependsOn (daemon % "test->test; provided")
 
   lazy val distributeservice = Project(
     id = "gearpump-examples-distributeservice",
     base = file("examples/distributeservice"),
-    settings = commonSettings ++ noPublish ++ 
-        Seq(
-          libraryDependencies ++= Seq(
-            "commons-httpclient" % "commons-httpclient" % commonsHttpVersion,
-            "commons-lang" % "commons-lang" % commonsLangVersion,
-            "commons-io" % "commons-io" % commonsIOVersion,
-            "io.spray" %%  "spray-can"       % sprayVersion,
-            "io.spray" %%  "spray-routing-shapeless2"   % sprayVersion
-          ),
-          mainClass in (Compile, packageBin) := 
Some("io.gearpump.experiments.distributeservice.DistributeService"),
-          target in assembly := baseDirectory.value.getParentFile / "target" /
-              CrossVersion.binaryScalaVersion(scalaVersion.value)
-    )
-  ) dependsOn(daemon % "test->test; provided")
+    settings = commonSettings ++ noPublish ++
+      Seq(
+        libraryDependencies ++= Seq(
+          "commons-httpclient" % "commons-httpclient" % commonsHttpVersion,
+          "commons-lang" % "commons-lang" % commonsLangVersion,
+          "commons-io" % "commons-io" % commonsIOVersion,
+          "io.spray" %% "spray-can" % sprayVersion,
+          "io.spray" %% "spray-routing-shapeless2" % sprayVersion
+        ),
+        mainClass in(Compile, packageBin) :=
+          Some("io.gearpump.experiments.distributeservice.DistributeService"),
+
+        target in assembly := baseDirectory.value.getParentFile / "target" /
+          CrossVersion.binaryScalaVersion(scalaVersion.value)
+      )
+  ) dependsOn (daemon % "test->test; provided")
 
   lazy val fsio = Project(
     id = "gearpump-examples-fsio",
     base = file("examples/streaming/fsio"),
     settings = commonSettings ++ noPublish ++
-        Seq(
-          libraryDependencies ++= Seq(
-            "org.apache.hadoop" % "hadoop-common" % clouderaVersion
-              exclude("org.mortbay.jetty", "jetty-util")
-              exclude("org.mortbay.jetty", "jetty")
-              exclude("org.fusesource.leveldbjni", "leveldbjni-all")
-              exclude("tomcat", "jasper-runtime")
-              exclude("commons-beanutils", "commons-beanutils-core")
-              exclude("commons-beanutils", "commons-beanutils")
-              exclude("asm", "asm")
-              exclude("org.ow2.asm", "asm")
-          ),
-          mainClass in (Compile, packageBin) := 
Some("io.gearpump.streaming.examples.fsio.SequenceFileIO"),
-          target in assembly := 
baseDirectory.value.getParentFile.getParentFile / "target" /
-              CrossVersion.binaryScalaVersion(scalaVersion.value)
-        )
+      Seq(
+        libraryDependencies ++= Seq(
+          "org.apache.hadoop" % "hadoop-common" % clouderaVersion
+            exclude("org.mortbay.jetty", "jetty-util")
+            exclude("org.mortbay.jetty", "jetty")
+            exclude("org.fusesource.leveldbjni", "leveldbjni-all")
+            exclude("tomcat", "jasper-runtime")
+            exclude("commons-beanutils", "commons-beanutils-core")
+            exclude("commons-beanutils", "commons-beanutils")
+            exclude("asm", "asm")
+            exclude("org.ow2.asm", "asm")
+        ),
+        mainClass in(Compile, packageBin) :=
+          Some("io.gearpump.streaming.examples.fsio.SequenceFileIO"),
+
+        target in assembly := baseDirectory.value.getParentFile.getParentFile 
/ "target" /
+          CrossVersion.binaryScalaVersion(scalaVersion.value)
+      )
   ) dependsOn (streaming % "test->test; provided")
 
   lazy val examples_kafka = Project(
     id = "gearpump-examples-kafka",
     base = file("examples/streaming/kafka"),
     settings = commonSettings ++ noPublish ++ myAssemblySettings ++
-        Seq(
-          mainClass in (Compile, packageBin) := 
Some("io.gearpump.streaming.examples.kafka.wordcount.KafkaWordCount"),
-          target in assembly := 
baseDirectory.value.getParentFile.getParentFile / "target" /
-              CrossVersion.binaryScalaVersion(scalaVersion.value)
-        )
+      Seq(
+        mainClass in(Compile, packageBin) :=
+          
Some("io.gearpump.streaming.examples.kafka.wordcount.KafkaWordCount"),
+
+        target in assembly := baseDirectory.value.getParentFile.getParentFile 
/ "target" /
+          CrossVersion.binaryScalaVersion(scalaVersion.value)
+      )
   ) dependsOn(streaming % "test->test; provided", external_kafka)
 
   lazy val stockcrawler = Project(
     id = "gearpump-examples-stockcrawler",
     base = file("examples/streaming/stockcrawler"),
-    settings = commonSettings ++ noPublish ++ 
-        Seq(
-          libraryDependencies ++= Seq(
-            "io.spray" %%  "spray-can"       % sprayVersion,
-            "io.spray" %%  "spray-routing-shapeless2"   % sprayVersion,
-            "com.lihaoyi" %% "upickle" % upickleVersion,
-            "commons-httpclient" % "commons-httpclient" % commonsHttpVersion,
-            "net.sourceforge.htmlcleaner" % "htmlcleaner" % "2.2",
-            "joda-time" % "joda-time" % "2.7",
-            "io.spray" %%  "spray-json"    % sprayJsonVersion
-          ),
-          mainClass in (Compile, packageBin) := 
Some("io.gearpump.streaming.examples.stock.main.Stock"),
-          target in assembly := 
baseDirectory.value.getParentFile.getParentFile / "target" /
-              CrossVersion.binaryScalaVersion(scalaVersion.value)
-        )
-  ) dependsOn (streaming % "test->test; provided", external_kafka % 
"test->test")
+    settings = commonSettings ++ noPublish ++
+      Seq(
+        libraryDependencies ++= Seq(
+          "io.spray" %% "spray-can" % sprayVersion,
+          "io.spray" %% "spray-routing-shapeless2" % sprayVersion,
+          "com.lihaoyi" %% "upickle" % upickleVersion,
+          "commons-httpclient" % "commons-httpclient" % commonsHttpVersion,
+          "net.sourceforge.htmlcleaner" % "htmlcleaner" % "2.2",
+          "joda-time" % "joda-time" % "2.7",
+          "org.joda" % "joda-convert" % "1.2",
+          "io.spray" %% "spray-json" % sprayJsonVersion
+        ),
+        mainClass in(Compile, packageBin) :=
+          Some("io.gearpump.streaming.examples.stock.main.Stock"),
+
+        target in assembly := baseDirectory.value.getParentFile.getParentFile 
/ "target" /
+          CrossVersion.binaryScalaVersion(scalaVersion.value)
+      )
+  ) dependsOn(streaming % "test->test; provided", external_kafka % 
"test->test")
 
   lazy val examples_state = Project(
     id = "gearpump-examples-state",
@@ -172,19 +209,24 @@ object BuildExample extends sbt.Build {
           exclude("org.ow2.asm", "asm"),
         "org.apache.hadoop" % "hadoop-hdfs" % clouderaVersion
       ),
-      mainClass in (Compile, packageBin) := 
Some("io.gearpump.streaming.examples.state.MessageCountApp"),
+      mainClass in(Compile, packageBin) :=
+        Some("io.gearpump.streaming.examples.state.MessageCountApp"),
+
       target in assembly := baseDirectory.value.getParentFile.getParentFile / 
"target" /
-          CrossVersion.binaryScalaVersion(scalaVersion.value)
+        CrossVersion.binaryScalaVersion(scalaVersion.value)
     )
-  ) dependsOn (streaming % "test->test; provided", external_hadoopfs, 
external_monoid, external_serializer, external_kafka)
+  ).dependsOn(streaming % "test->test; provided",
+    external_hadoopfs, external_monoid, external_serializer, external_kafka)
 
   lazy val pagerank = Project(
     id = "gearpump-examples-pagerank",
     base = file("examples/pagerank"),
     settings = commonSettings ++ noPublish ++ myAssemblySettings ++ Seq(
-      mainClass in (Compile, packageBin) := 
Some("io.gearpump.experiments.pagerank.example.PageRankExample"),
+      mainClass in(Compile, packageBin) :=
+        Some("io.gearpump.experiments.pagerank.example.PageRankExample"),
+
       target in assembly := baseDirectory.value.getParentFile.getParentFile / 
"target" /
         CrossVersion.binaryScalaVersion(scalaVersion.value)
     )
-  ) dependsOn(streaming % "test->test; provided")
-}
+  ) dependsOn (streaming % "test->test; provided")
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/project/BuildIntegrationTest.scala
----------------------------------------------------------------------
diff --git a/project/BuildIntegrationTest.scala 
b/project/BuildIntegrationTest.scala
index ea95204..9ec3640 100644
--- a/project/BuildIntegrationTest.scala
+++ b/project/BuildIntegrationTest.scala
@@ -1,7 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import sbt.Keys._
 import sbt._
-import sbtassembly.Plugin.AssemblyKeys._
 import Build._
+import sbtassembly.Plugin.AssemblyKeys._
 
 object BuildIntegrationTest extends sbt.Build {
 
@@ -12,7 +30,7 @@ object BuildIntegrationTest extends sbt.Build {
     id = "gearpump-integrationtest",
     base = file("integrationtest"),
     settings = commonSettings ++ noPublish
-  ) aggregate (it_core, it_storm09, it_storm010)
+  ) aggregate(it_core, it_storm09, it_storm010)
 
   val itTestFilter: String => Boolean = { name => name endsWith "Suite" }
   lazy val it_core = Project(
@@ -30,46 +48,45 @@ object BuildIntegrationTest extends sbt.Build {
         "org.ow2.asm" % "asm-all" % "5.0.3" % "it"
       )
     )
-  ).configs(IntegrationTest).settings(Defaults.itSettings : _*)
-      .dependsOn(
-        streaming % "test->test; provided",
-        services % "test->test; provided",
-        external_kafka,
-        storm,
-        external_serializer
-      )
+  ).configs(IntegrationTest).settings(Defaults.itSettings: _*)
+    .dependsOn(
+      streaming % "test->test; provided",
+      services % "test->test; provided",
+      external_kafka,
+      storm,
+      external_serializer
+    )
 
-  // integration test for Storm 0.9.x
+  // Integration test for Storm 0.9.x
   lazy val it_storm09 = Project(
     id = "gearpump-integrationtest-storm09",
     base = file("integrationtest/storm09"),
-        settings = commonSettings ++ noPublish ++ myAssemblySettings ++
-        Seq(
-          libraryDependencies ++= Seq(
-            "org.apache.storm" % "storm-kafka" % storm09Version,
-            "org.apache.storm" % "storm-starter" % storm09Version,
-            "com.googlecode.json-simple" % "json-simple" % jsonSimpleVersion,
-            "org.apache.kafka" %% "kafka" % kafkaVersion
-          ),
-          target in assembly := baseDirectory.value.getParentFile / "target" /
-              CrossVersion.binaryScalaVersion(scalaVersion.value)
-        )
-  ) dependsOn(storm % "provided")
+    settings = commonSettings ++ noPublish ++ myAssemblySettings ++
+      Seq(
+        libraryDependencies ++= Seq(
+          "org.apache.storm" % "storm-kafka" % storm09Version,
+          "org.apache.storm" % "storm-starter" % storm09Version,
+          "com.googlecode.json-simple" % "json-simple" % jsonSimpleVersion,
+          "org.apache.kafka" %% "kafka" % kafkaVersion
+        ),
+        target in assembly := baseDirectory.value.getParentFile / "target" /
+          CrossVersion.binaryScalaVersion(scalaVersion.value)
+      )
+  ) dependsOn (storm % "provided")
 
-  // integration test for Storm 0.10.x
+  // Integration test for Storm 0.10.x
   lazy val it_storm010 = Project(
     id = "gearpump-integrationtest-storm010",
     base = file("integrationtest/storm010"),
     settings = commonSettings ++ noPublish ++ myAssemblySettings ++
-        Seq(
-          libraryDependencies ++= Seq(
-            "org.apache.storm" % "storm-kafka" % stormVersion,
-            "org.apache.storm" % "storm-starter" % stormVersion,
-            "org.apache.kafka" %% "kafka" % kafkaVersion
-          ),
-          target in assembly := baseDirectory.value.getParentFile / "target" /
-              CrossVersion.binaryScalaVersion(scalaVersion.value)
-        )
-  ) dependsOn(storm % "provided")
-
+      Seq(
+        libraryDependencies ++= Seq(
+          "org.apache.storm" % "storm-kafka" % stormVersion,
+          "org.apache.storm" % "storm-starter" % stormVersion,
+          "org.apache.kafka" %% "kafka" % kafkaVersion
+        ),
+        target in assembly := baseDirectory.value.getParentFile / "target" /
+          CrossVersion.binaryScalaVersion(scalaVersion.value)
+      )
+  ) dependsOn (storm % "provided")
 }

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/project/Pack.scala
----------------------------------------------------------------------
diff --git a/project/Pack.scala b/project/Pack.scala
index 8a5ca8d..7339d1d 100644
--- a/project/Pack.scala
+++ b/project/Pack.scala
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import sbt.Keys._
 import sbt._
 import Build._
@@ -7,12 +25,12 @@ object Pack extends sbt.Build {
   val daemonClassPath = Seq(
     "${PROG_HOME}/conf",
     "${PROG_HOME}/lib/daemon/*",
-     // This is for DFSJarStore
+    // This is for DFSJarStore
     "${PROG_HOME}/lib/yarn/*"
   )
 
   val applicationClassPath = daemonClassPath ++ Seq(
-    // current working directory
+    // Current working directory
     "."
   )
 
@@ -40,59 +58,93 @@ object Pack extends sbt.Build {
   lazy val packProject = Project(
     id = "gearpump-pack",
     base = file(s"$distDirectory"),
-    settings = commonSettings ++ noPublish  ++
-        packSettings ++
-        Seq(
-          packMain := Map(
-            "gear" -> "io.gearpump.cluster.main.Gear",
-            "local" -> "io.gearpump.cluster.main.Local",
-            "master" -> "io.gearpump.cluster.main.Master",
-            "worker" -> "io.gearpump.cluster.main.Worker",
-            "services" -> "io.gearpump.services.main.Services",
-            "yarnclient" -> "io.gearpump.experiments.yarn.client.Client",
-            "storm" -> "io.gearpump.experiments.storm.StormRunner"
-          ),
-          packJvmOpts := Map(
-            "gear" -> Seq("-Djava.net.preferIPv4Stack=true", 
"-Dgearpump.home=${PROG_HOME}"),
-            "local" -> Seq("-server", "-Djava.net.preferIPv4Stack=true", 
"-DlogFilename=local", "-Dgearpump.home=${PROG_HOME}", 
"-Djava.rmi.server.hostname=localhost"),
-            "master" -> Seq("-server", "-Djava.net.preferIPv4Stack=true", 
"-DlogFilename=master", "-Dgearpump.home=${PROG_HOME}", 
"-Djava.rmi.server.hostname=localhost"),
-            "worker" -> Seq("-server", "-Djava.net.preferIPv4Stack=true", 
"-DlogFilename=worker", "-Dgearpump.home=${PROG_HOME}", 
"-Djava.rmi.server.hostname=localhost"),
-            "services" -> Seq("-server", "-Djava.net.preferIPv4Stack=true", 
"-Dgearpump.home=${PROG_HOME}", "-Djava.rmi.server.hostname=localhost"),
-            "yarnclient" -> Seq("-server", "-Djava.net.preferIPv4Stack=true", 
"-Dgearpump.home=${PROG_HOME}", "-Djava.rmi.server.hostname=localhost"),
-            "storm" -> Seq("-server", "-Djava.net.preferIPv4Stack=true", 
"-Dgearpump.home=${PROG_HOME}")
-          ),
-          packLibDir := Map(
-            "lib" -> new ProjectsToPack(core.id, streaming.id),
-            "lib/daemon" -> new ProjectsToPack(daemon.id, 
cgroup.id).exclude(core.id, streaming.id),
-            "lib/yarn" -> new ProjectsToPack(yarn.id).exclude(services.id, 
daemon.id),
-            "lib/services" -> new 
ProjectsToPack(services.id).exclude(daemon.id),
-            "lib/storm" -> new ProjectsToPack(storm.id).exclude(streaming.id)
-          ),
-          packExclude := Seq(thisProjectRef.value.project),
-
-          packResourceDir += (baseDirectory.value / ".." / "conf" -> "conf"),
-          packResourceDir += (baseDirectory.value / ".." / "yarnconf" -> 
"conf/yarnconf"),
-          packResourceDir += (baseDirectory.value / ".." / "unmanagedlibs" / 
scalaBinaryVersion.value -> "lib"),
-          packResourceDir += (baseDirectory.value / ".." / "services" / 
"dashboard" -> "dashboard"),
-          packResourceDir += (baseDirectory.value / ".." / "examples" / 
"target" / CrossVersion.binaryScalaVersion(scalaVersion.value) -> "examples"),
-          packResourceDir += (baseDirectory.value / ".." / "integrationtest" / 
"target" / CrossVersion.binaryScalaVersion(scalaVersion.value) -> 
"integrationtest"),
-
-          // The classpath should not be expanded. Otherwise, the classpath 
maybe too long.
-          // On windows, it may report shell error "command line too long"
-          packExpandedClasspath := false,
-          packExtraClasspath := Map(
-            "gear" -> applicationClassPath,
-            "local" -> daemonClassPath,
-            "master" -> daemonClassPath,
-            "worker" -> daemonClassPath,
-            "services" -> serviceClassPath,
-            "yarnclient" -> yarnClassPath,
-            "storm" -> stormClassPath
-          ),
-
-          packArchivePrefix := projectName + "-" + scalaBinaryVersion.value,
-          packArchiveExcludes := Seq("integrationtest")
-
-        )
+    settings = commonSettings ++ noPublish ++
+      packSettings ++
+      Seq(
+        packMain := Map(
+          "gear" -> "io.gearpump.cluster.main.Gear",
+          "local" -> "io.gearpump.cluster.main.Local",
+          "master" -> "io.gearpump.cluster.main.Master",
+          "worker" -> "io.gearpump.cluster.main.Worker",
+          "services" -> "io.gearpump.services.main.Services",
+          "yarnclient" -> "io.gearpump.experiments.yarn.client.Client",
+          "storm" -> "io.gearpump.experiments.storm.StormRunner"
+        ),
+        packJvmOpts := Map(
+          "gear" -> Seq("-Djava.net.preferIPv4Stack=true", 
"-Dgearpump.home=${PROG_HOME}"),
+          "local" -> Seq(
+            "-server",
+            "-Djava.net.preferIPv4Stack=true",
+            "-DlogFilename=local",
+            "-Dgearpump.home=${PROG_HOME}",
+            "-Djava.rmi.server.hostname=localhost"),
+
+          "master" -> Seq(
+            "-server",
+            "-Djava.net.preferIPv4Stack=true",
+            "-DlogFilename=master",
+            "-Dgearpump.home=${PROG_HOME}",
+            "-Djava.rmi.server.hostname=localhost"),
+
+          "worker" -> Seq(
+            "-server",
+            "-Djava.net.preferIPv4Stack=true",
+            "-DlogFilename=worker",
+            "-Dgearpump.home=${PROG_HOME}",
+            "-Djava.rmi.server.hostname=localhost"),
+
+          "services" -> Seq(
+            "-server",
+            "-Djava.net.preferIPv4Stack=true",
+            "-Dgearpump.home=${PROG_HOME}",
+            "-Djava.rmi.server.hostname=localhost"),
+
+          "yarnclient" -> Seq(
+            "-server",
+            "-Djava.net.preferIPv4Stack=true",
+            "-Dgearpump.home=${PROG_HOME}",
+            "-Djava.rmi.server.hostname=localhost"),
+
+          "storm" -> Seq(
+            "-server",
+            "-Djava.net.preferIPv4Stack=true",
+            "-Dgearpump.home=${PROG_HOME}")
+        ),
+        packLibDir := Map(
+          "lib" -> new ProjectsToPack(core.id, streaming.id),
+          "lib/daemon" -> new ProjectsToPack(daemon.id, 
cgroup.id).exclude(core.id, streaming.id),
+          "lib/yarn" -> new ProjectsToPack(yarn.id).exclude(services.id, 
daemon.id),
+          "lib/services" -> new ProjectsToPack(services.id).exclude(daemon.id),
+          "lib/storm" -> new ProjectsToPack(storm.id).exclude(streaming.id)
+        ),
+        packExclude := Seq(thisProjectRef.value.project),
+
+        packResourceDir += (baseDirectory.value / ".." / "conf" -> "conf"),
+        packResourceDir += (baseDirectory.value / ".." / "yarnconf" -> 
"conf/yarnconf"),
+        packResourceDir += (baseDirectory.value / ".." / "unmanagedlibs" /
+          scalaBinaryVersion.value -> "lib"),
+        packResourceDir += (baseDirectory.value / ".." / "services" / 
"dashboard" -> "dashboard"),
+        packResourceDir += (baseDirectory.value / ".." / "examples" / "target" 
/
+          CrossVersion.binaryScalaVersion(scalaVersion.value) -> "examples"),
+        packResourceDir += (baseDirectory.value / ".." / "integrationtest" / 
"target" /
+          CrossVersion.binaryScalaVersion(scalaVersion.value) -> 
"integrationtest"),
+
+        // The classpath should not be expanded. Otherwise, the classpath 
maybe too long.
+        // On windows, it may report shell error "command line too long"
+        packExpandedClasspath := false,
+        packExtraClasspath := Map(
+          "gear" -> applicationClassPath,
+          "local" -> daemonClassPath,
+          "master" -> daemonClassPath,
+          "worker" -> daemonClassPath,
+          "services" -> serviceClassPath,
+          "yarnclient" -> yarnClassPath,
+          "storm" -> stormClassPath
+        ),
+
+        packArchivePrefix := projectName + "-" + scalaBinaryVersion.value,
+        packArchiveExcludes := Seq("integrationtest")
+
+      )
   ).dependsOn(core, streaming, services, yarn, storm)
 }

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/project/PhantomJS2Env.scala
----------------------------------------------------------------------
diff --git a/project/PhantomJS2Env.scala b/project/PhantomJS2Env.scala
index 4d7c68d..fe7ee6a 100644
--- a/project/PhantomJS2Env.scala
+++ b/project/PhantomJS2Env.scala
@@ -1,13 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import org.scalajs.core.tools.io._
 import org.scalajs.jsenv.phantomjs.PhantomJSEnv
 
 // https://github.com/scala-js/scala-js/issues/1555
 class PhantomJS2Env(jettyClassLoader: ClassLoader,
-                    phantomjsPath: String = "phantomjs",
-                    addArgs: Seq[String] = Seq.empty,
-                    addEnv: Map[String, String] = Map.empty,
-                    override val autoExit: Boolean = true)
-    extends PhantomJSEnv(phantomjsPath, addArgs, addEnv, autoExit, 
jettyClassLoader) {
+    phantomjsPath: String = "phantomjs",
+    addArgs: Seq[String] = Seq.empty,
+    addEnv: Map[String, String] = Map.empty,
+    override val autoExit: Boolean = true)
+  extends PhantomJSEnv(phantomjsPath, addArgs, addEnv, autoExit, 
jettyClassLoader) {
 
   override protected def vmName: String = "PhantomJS2"
 

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/project/build.properties
----------------------------------------------------------------------
diff --git a/project/build.properties b/project/build.properties
index a4820ce..c4df008 100644
--- a/project/build.properties
+++ b/project/build.properties
@@ -7,7 +7,7 @@
 # "License"); you may not use this file except in compliance
 # with the License.  You may obtain a copy of the License at
 #
-#     http://www.apache.org/licenses/LICENSE-2.0
+#      http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,4 +16,4 @@
 # limitations under the License.
 #
 
-sbt.version=0.13.9
+sbt.version=0.13.11

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/project/plugins.sbt
----------------------------------------------------------------------
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 0477712..100a222 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,4 +1,23 @@
-resolvers += Resolver.url("fvunicorn", 
url("http://dl.bintray.com/fvunicorn/sbt-plugins";))(Resolver.ivyStylePatterns)
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+resolvers += Resolver.url("fvunicorn",
+  
url("http://dl.bintray.com/fvunicorn/sbt-plugins";))(Resolver.ivyStylePatterns)
 
 resolvers += Classpaths.sbtPluginReleases
 
@@ -18,6 +37,9 @@ addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.8.5")
 
 addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.1.0")
 
-addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0")
+addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
 
 addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.3")
+
+addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0")
+

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/c176e448/scalastyle-config.xml
----------------------------------------------------------------------
diff --git a/scalastyle-config.xml b/scalastyle-config.xml
new file mode 100644
index 0000000..1b0a838
--- /dev/null
+++ b/scalastyle-config.xml
@@ -0,0 +1,240 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--
+
+If you wish to turn off checking for a section of code, you can put a comment 
in the source
+before and after the section, with the following syntax:
+
+  // scalastyle:off
+  ...  // stuff that breaks the styles
+  // scalastyle:on
+
+You can also disable only one rule, by specifying its rule id, as specified in:
+  http://www.scalastyle.org/rules-0.8.0.html
+
+  // scalastyle:off no.finalize
+  override def finalize(): Unit = ...
+  // scalastyle:on no.finalize
+
+This file is divided into 3 sections:
+ (1) rules that we enforce.
+ (2) rules that we would like to enforce, but haven't cleaned up the codebase 
to turn on yet
+     (or we need to make the scalastyle rule more configurable).
+ (3) rules that we don't want to enforce.
+-->
+
+<scalastyle>
+  <name>Scalastyle standard configuration</name>
+
+  <check level="error" class="org.scalastyle.file.FileTabChecker" 
enabled="true"></check>
+
+  <check level="error" class="org.scalastyle.file.HeaderMatchesChecker" 
enabled="true">
+    <parameters>
+      <parameter name="header"><![CDATA[/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */]]></parameter>
+    </parameters>
+  </check>
+
+  <check level="error" 
class="org.scalastyle.scalariform.SpacesAfterPlusChecker"
+         enabled="true"></check>
+
+  <check level="error" 
class="org.scalastyle.scalariform.SpacesBeforePlusChecker"
+         enabled="true"></check>
+
+  <check level="error" class="org.scalastyle.file.FileLineLengthChecker" 
enabled="true">
+    <parameters>
+      <parameter name="maxLineLength"><![CDATA[100]]></parameter>
+      <parameter name="tabSize"><![CDATA[2]]></parameter>
+      <parameter name="ignoreImports">true</parameter>
+    </parameters>
+  </check>
+
+  <check level="error" class="org.scalastyle.scalariform.ClassNamesChecker" 
enabled="true">
+    <parameters>
+      <parameter name="regex"><![CDATA[[A-Z][A-Za-z]*]]></parameter>
+    </parameters>
+  </check>
+
+  <check level="error" class="org.scalastyle.scalariform.ObjectNamesChecker" 
enabled="true">
+    <parameters>
+      <parameter name="regex"><![CDATA[[A-Z][A-Za-z]*]]></parameter>
+    </parameters>
+  </check>
+
+  <check level="error" 
class="org.scalastyle.scalariform.PackageObjectNamesChecker" enabled="true">
+    <parameters>
+      <parameter name="regex"><![CDATA[^[a-z][A-Za-z]*$]]></parameter>
+    </parameters>
+  </check>
+
+  <check level="error" 
class="org.scalastyle.scalariform.ParameterNumberChecker" enabled="true">
+    <parameters>
+      <parameter name="maxParameters"><![CDATA[10]]></parameter>
+    </parameters>
+  </check>
+
+  <check level="error" class="org.scalastyle.scalariform.NoFinalizeChecker" 
enabled="true"></check>
+
+  <check level="error" 
class="org.scalastyle.scalariform.CovariantEqualsChecker"
+         enabled="true"></check>
+
+  <check level="error" class="org.scalastyle.scalariform.StructuralTypeChecker"
+         enabled="true"></check>
+
+  <check level="error" class="org.scalastyle.scalariform.UppercaseLChecker" 
enabled="true"></check>
+
+  <check level="error" class="org.scalastyle.scalariform.IfBraceChecker" 
enabled="true">
+    <parameters>
+      <parameter name="singleLineAllowed"><![CDATA[true]]></parameter>
+      <parameter name="doubleLineAllowed"><![CDATA[true]]></parameter>
+    </parameters>
+  </check>
+
+  <check level="error" 
class="org.scalastyle.scalariform.PublicMethodsHaveTypeChecker"
+         enabled="true"></check>
+
+  <check level="error" 
class="org.scalastyle.scalariform.NonASCIICharacterChecker"
+         enabled="true"></check>
+
+  <check level="error" 
class="org.scalastyle.scalariform.SpaceAfterCommentStartChecker"
+         enabled="true"></check>
+
+  <check level="error" 
class="org.scalastyle.scalariform.EnsureSingleSpaceBeforeTokenChecker"
+         enabled="true">
+    <parameters>
+      <parameter name="tokens">ARROW, EQUALS, ELSE, TRY, CATCH, FINALLY, 
LARROW, RARROW</parameter>
+    </parameters>
+  </check>
+
+  <check level="error" 
class="org.scalastyle.scalariform.EnsureSingleSpaceAfterTokenChecker"
+         enabled="true">
+    <parameters>
+      <parameter name="tokens">ARROW, EQUALS, COMMA, COLON, IF, ELSE, DO, 
WHILE, FOR, MATCH, TRY,
+        CATCH, FINALLY, LARROW, RARROW
+      </parameter>
+    </parameters>
+  </check>
+
+  <!-- ??? usually shouldn't be checked into the code base. -->
+  <check level="error" 
class="org.scalastyle.scalariform.NotImplementedErrorUsage"
+         enabled="true"></check>
+
+  <check customId="println" level="error" 
class="org.scalastyle.scalariform.TokenChecker"
+         enabled="true">
+    <parameters>
+      <parameter name="regex">^println$</parameter>
+    </parameters>
+    <customMessage><![CDATA[Are you sure you want to println? If yes, wrap the 
code block with
+      // scalastyle:off println
+      println(...)
+      // scalastyle:on println]]></customMessage>
+  </check>
+
+  <check customId="runtimeaddshutdownhook" level="error" 
class="org.scalastyle.file.RegexChecker"
+         enabled="true">
+    <parameters>
+      <parameter name="regex">Runtime\.getRuntime\.addShutdownHook</parameter>
+    </parameters>
+    <customMessage><![CDATA[
+      Are you sure that you want to use Runtime.getRuntime.addShutdownHook? In 
most cases, you should use
+      ShutdownHookManager.addShutdownHook instead.
+      If you must use Runtime.getRuntime.addShutdownHook, wrap the code block 
with
+      // scalastyle:off runtimeaddshutdownhook
+      Runtime.getRuntime.addShutdownHook(...)
+      // scalastyle:on runtimeaddshutdownhook
+    ]]></customMessage>
+  </check>
+
+  <check customId="mutablesynchronizedbuffer" level="error" 
class="org.scalastyle.file.RegexChecker"
+         enabled="true">
+    <parameters>
+      <parameter name="regex">mutable\.SynchronizedBuffer</parameter>
+    </parameters>
+    <customMessage><![CDATA[
+      Are you sure that you want to use mutable.SynchronizedBuffer? In most 
cases, you should use
+      java.util.concurrent.ConcurrentLinkedQueue instead.
+      If you must use mutable.SynchronizedBuffer, wrap the code block with
+      // scalastyle:off mutablesynchronizedbuffer
+      mutable.SynchronizedBuffer[...]
+      // scalastyle:on mutablesynchronizedbuffer
+    ]]></customMessage>
+  </check>
+
+  <check customId="javaconversions" level="error" 
class="org.scalastyle.scalariform.TokenChecker"
+         enabled="true">
+    <parameters>
+      <parameter name="regex">JavaConversions</parameter>
+    </parameters>
+    <customMessage>Instead of importing implicits in 
scala.collection.JavaConversions._, import
+      scala.collection.JavaConverters._ and use .asScala / .asJava methods
+    </customMessage>
+  </check>
+
+  <check level="error" 
class="org.scalastyle.scalariform.DisallowSpaceBeforeTokenChecker"
+         enabled="true">
+    <parameters>
+      <parameter name="tokens">COMMA</parameter>
+    </parameters>
+  </check>
+
+  <!-- Should add single Space between ')' and '{' -->
+  <check customId="SingleSpaceBetweenRParenAndLCurlyBrace" level="error"
+         class="org.scalastyle.file.RegexChecker" enabled="true">
+    <parameters>
+      <parameter name="regex">\)\{</parameter>
+    </parameters>
+    <customMessage><![CDATA[
+      Single Space between ')' and `{`.
+    ]]></customMessage>
+  </check>
+
+  <check level="error" class="org.scalastyle.scalariform.MethodNamesChecker" 
enabled="false">
+    <parameters>
+      <parameter name="regex"><![CDATA[^[a-z][A-Za-z0-9]*$]]></parameter>
+    </parameters>
+  </check>
+
+  <check level="error" class="org.scalastyle.scalariform.EqualsHashCodeChecker"
+         enabled="true"></check>
+
+  <check level="error" class="org.scalastyle.file.IndentationChecker" 
enabled="true">
+    <parameters>
+      <parameter name="tabSize">2</parameter>
+      <parameter name="methodParamIndentSize">4</parameter>
+    </parameters>
+  </check>
+
+  <!-- Don't allow return -->
+  <check level="error" class="org.scalastyle.scalariform.ReturnChecker" 
enabled="true"></check>
+
+</scalastyle>
\ No newline at end of file

Reply via email to