<commit_before>import AssemblyKeys._
import SonatypeKeys._

sonatypeSettings

useGpg := true

pgpReadOnly := false

moduleName := "streaming-api"

crossPaths := false

organization := "com.stratio.streaming"

profileName := "com.stratio"

publishMavenStyle := true

version := "0.2.0-SNAPSHOT"

scalaVersion := "2.10.3"

seq(assemblySettings: _*)

jarName in assembly := "stratio-streaming-api-0.2.0-SNAPSHOT.jar"

addArtifact(Artifact("streaming-api"), sbtassembly.Plugin.AssemblyKeys.assembly)

mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
  {
    case PathList(ps @ _*) if ps.last endsWith ".properties" => MergeStrategy.first
    case PathList(ps @ _*) if ps.last endsWith ".xml" => MergeStrategy.first
    case PathList("scala", xs @ _*)         => MergeStrategy.first
    case PathList("org","apache", xs @ _*)         => MergeStrategy.first
    case PathList("org","slf4j", xs @ _*)         => MergeStrategy.first
    case PathList("org","xerial", xs @ _*)         => MergeStrategy.first
    case x => old(x)
  }
}

test in assembly := {}

resolvers ++= Seq(
   "Nexus snapshots" at "http://nexus.strat.io:8081/nexus/content/repositories/snapshots",
   "Nexus releases" at "http://nexus.strat.io:8081/nexus/content/repositories/releases",
   "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
)

libraryDependencies ++= Seq(
  "org.scalatest" % "scalatest_2.10" % "2.0" % "test",
  "org.apache.kafka" % "kafka_2.10" % "0.8.1" exclude("com.sun.jdmk", "jmxtools") exclude("com.sun.jmx", "jmxri"),
  "com.typesafe" % "config" % "1.2.0",
  "org.apache.curator" % "curator-framework" % "2.4.1",
  "org.slf4j" % "slf4j-log4j12" % "1.7.5",
  "com.stratio.streaming" % "streaming-commons" % "0.2.0-SNAPSHOT",
  "com.google.code.gson" % "gson" % "2.2.4"
)

credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")

publishTo := {
  val nexus = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
  Some("releases" at nexus)
}

// To sync with Maven central, you need to supply the following information:
pomExtra := {
  <url>http://www.stratio.com</url>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git@github.com/Stratio/stratio-streaming-api.git</connection>
    <developerConnection>scm:git:git@github.com:Stratio/stratio-streaming-api.git</developerConnection>
    <url>https://github.com/Stratio/stratio-streaming-api</url>
  </scm>
  <developers><commit_msg>Publish the snapshots to our nexus and releases to sonatype<commit_after>import AssemblyKeys._
import SonatypeKeys._

sonatypeSettings

useGpg := true

pgpReadOnly := false

moduleName := "streaming-api"

crossPaths := false

organization := "com.stratio.streaming"

profileName := "com.stratio"

publishMavenStyle := true

version := "0.2.0-SNAPSHOT"

scalaVersion := "2.10.3"

seq(assemblySettings: _*)

jarName in assembly := "stratio-streaming-api-0.2.0-SNAPSHOT.jar"

addArtifact(Artifact("streaming-api"), sbtassembly.Plugin.AssemblyKeys.assembly)

mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
  {
    case PathList(ps @ _*) if ps.last endsWith ".properties" => MergeStrategy.first
    case PathList(ps @ _*) if ps.last endsWith ".xml" => MergeStrategy.first
    case PathList("scala", xs @ _*)         => MergeStrategy.first
    case PathList("org","apache", xs @ _*)         => MergeStrategy.first
    case PathList("org","slf4j", xs @ _*)         => MergeStrategy.first
    case PathList("org","xerial", xs @ _*)         => MergeStrategy.first
    case x => old(x)
  }
}

test in assembly := {}

resolvers ++= Seq(
   "Nexus snapshots" at "http://nexus.strat.io:8081/nexus/content/repositories/snapshots",
   "Nexus releases" at "http://nexus.strat.io:8081/nexus/content/repositories/releases",
   "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
)

libraryDependencies ++= Seq(
  "org.scalatest" % "scalatest_2.10" % "2.0" % "test",
  "org.apache.kafka" % "kafka_2.10" % "0.8.1" exclude("com.sun.jdmk", "jmxtools") exclude("com.sun.jmx", "jmxri"),
  "com.typesafe" % "config" % "1.2.0",
  "org.apache.curator" % "curator-framework" % "2.4.1",
  "org.slf4j" % "slf4j-log4j12" % "1.7.5",
  "com.stratio.streaming" % "streaming-commons" % "0.2.0-SNAPSHOT",
  "com.google.code.gson" % "gson" % "2.2.4"
)

credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")

publishTo := {
  if (version.value.trim.endsWith("SNAPSHOT"))
    Some("snapshots" at "http://nexus.strat.io:8081/nexus/content/repositories/snapshots")
  else
    Some("releases"  at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
}

// To sync with Maven central, you need to supply the following information:
pomExtra := {
  <url>http://www.stratio.com</url>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git@github.com/Stratio/stratio-streaming-api.git</connection>
    <developerConnection>scm:git:git@github.com:Stratio/stratio-streaming-api.git</developerConnection>
    <url>https://github.com/Stratio/stratio-streaming-api</url>
  </scm>
  <developers>
{'fraction_non_alphanumeric': 0.17551020408163265, 'fraction_numerical': 0.02189239332096475, 'mean_word_length': 3.9732472324723247, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 57, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6358332', 'n_tokens_mistral': 2061, 'n_tokens_neox': 2003, 'n_words': 327}