import _root_.sbtassembly.AssemblyPlugin.autoImport._
import _root_.sbtassembly.PathList
import play.PlayImport._
import sbt.Keys._
import sbt._
//import com.github.play2war.plugin._
lazy val root = (project in file(".")).enablePlugins(PlayScala)
name := "dsquality"
version := "0.1.0-SNAPSHOT"
//spName := "com.piki_ds/dstopic"
//sparkComponents ++= Seq("streaming", "sql", "mllib", "repl", "yarn")
organization := "com.piki_ds"
scalaVersion := "2.11.7"
aggregate in runMain := true
val sprayV = "1.3.3"
val sparkV = "1.5.2"
assemblyMergeStrategy in assembly := {
case x if Assembly.isConfigFile(x) =>
MergeStrategy.concat
case PathList(ps @ _*) if Assembly.isReadme(ps.last) || Assembly.isLicenseFile(ps.last) =>
MergeStrategy.rename
case PathList("META-INF", xs @ _*) =>
(xs map {_.toLowerCase}) match {
case ("manifest.mf" :: Nil) | ("index.list" :: Nil) | ("dependencies" :: Nil) =>
MergeStrategy.discard
case ps @ (x :: xs) if ps.last.endsWith(".sf") || ps.last.endsWith(".dsa") =>
MergeStrategy.discard
case "plexus" :: xs =>
MergeStrategy.discard
case "services" :: xs =>
MergeStrategy.filterDistinctLines
case ("spring.schemas" :: Nil) | ("spring.handlers" :: Nil) =>
MergeStrategy.filterDistinctLines
case _ => MergeStrategy.first
}
case _ => MergeStrategy.first
}
//Play2WarKeys.servletVersion := "3.0"
//Play2WarPlugin.play2WarSettings
val hadoopversion = "2.6.0"
libraryDependencies ++= Seq(
"org.apache.hadoop" % "hadoop-hdfs" % hadoopversion exclude("commons-daemon", "commons-daemon") excludeAll ExclusionRule(organization = "javax.servlet") excludeAll(ExclusionRule(organization = "org.eclipse.jetty")),
"org.apache.hadoop" % "hadoop-auth" % hadoopversion exclude("commons-daemon", "commons-daemon") excludeAll ExclusionRule(organization = "javax.servlet") excludeAll(ExclusionRule(organization = "org.eclipse.jetty")),
"org.apache.hadoop" % "hadoop-client" % hadoopversion exclude("commons-daemon", "commons-daemon") excludeAll ExclusionRule(organization = "javax.servlet") excludeAll(ExclusionRule(organization = "org.eclipse.jetty")),
"org.slf4j" % "slf4j-api" % "1.7.2",
"com.google.code.findbugs" % "jsr305" % "2.0.3",
"com.quantifind" %% "wisp" % "0.0.4",
"c3p0" % "c3p0" % "0.9.1.2",
"redis.clients" % "jedis" % "2.2.1",
"com.google.guava" % "guava" % "18.0",
"mysql" % "mysql-connector-java" % "5.1.32",
"org.json4s" %% "json4s-jackson" % "3.2.11",
"org.json4s" %% "json4s-ext" % "3.2.11",
"org.json4s" %% "json4s-native" % "3.2.11",
"org.feijoas" %% "mango" % "0.11",
"org.scalatest" %% "scalatest" % "2.1.6" % "test",
"nz.ac.waikato.cms.weka" % "weka-dev" % "3.7.12",
"org.apache.spark" %% "spark-core" % sparkV % "provided",
"org.apache.spark" %% "spark-core" % sparkV,
"org.apache.spark" %% "spark-streaming" % sparkV ,
"org.apache.spark" %% "spark-sql" % sparkV ,
"org.apache.spark" %% "spark-mllib" % sparkV ,
"org.apache.spark" %% "spark-repl" % sparkV ,
"org.apache.spark" %% "spark-yarn" % sparkV,
"com.piki_ds" %% "dsutils" % "0.1.11",
"com.piki_ds" %% "dsutils_hbase" % "0.3.8-SNAPSHOT",
"org.codehaus.jackson" % "jackson-core-asl" % "1.9.13",
"org.jblas" % "jblas" % "1.2.4",
"com.piki_ds" %% "dscontentreport" % "0.1.0-SNAPSHOT"
)
resolvers ++= Seq(
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
"Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases/",
"Scala Tools Snapshots" at "http://scala-tools.org/repo-snapshots/",
"spray repo" at "http://repo.spray.io/",
"piki-public" at "http://ci.pikicast.com/nexus/content/groups/public/",
"piki-rel" at "http://ci.pikicast.com/nexus/content/repositories/private/",
"piki-snap" at "http://ci.pikicast.com/nexus/content/repositories/snapshots/"
)
resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
retrieveManaged := true
publishMavenStyle := true
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
publishTo := {
val nexus = "http://ci.pikicast.com/nexus/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "content/repositories/private")
}