<commit_before>import sbt._
import sbt.Process._

import assembly._

import de.element34.sbteclipsify._


class SparkProject(info: ProjectInfo) extends ParentProject(info) with IdeaProject {

  lazy val core = project("core", "Spark Core", new CoreProject(_))

  lazy val repl = project("repl", "Spark REPL", new ReplProject(_), core)

  lazy val examples = project("examples", "Spark Examples", new ExamplesProject(_), core)

  lazy val bagel = project("bagel", "Bagel", new BagelProject(_), core)

  lazy val jettyWebapp = "org.eclipse.jetty" % "jetty-webapp" % "7.4.1.v20110513" % "provided"

  trait BaseProject extends BasicScalaProject with ScalaPaths with BasicPackagePaths with Eclipsify with IdeaProject {
    override def compileOptions = super.compileOptions ++ Seq(Unchecked)
    override def packageDocsJar = defaultJarPath("-javadoc.jar")
    override def packageSrcJar= defaultJarPath("-sources.jar")
    lazy val sourceArtifact = Artifact.sources(artifactID)
    lazy val docsArtifact = Artifact.javadoc(artifactID)
    override def packageToPublishActions = super.packageToPublishActions ++ Seq(packageDocs, packageSrc)
  }

  class CoreProject(info: ProjectInfo) extends DefaultProject(info) with BaseProject with DepJar with XmlTestReport {
    val guava = "com.google.guava" % "guava" % "r09"
    val log4j = "log4j" % "log4j" % "1.2.16"
    val slf4jVersion = "1.6.1"
    val slf4jApi = "org.slf4j" % "slf4j-api" % slf4jVersion
    val slf4jLog4j = "org.slf4j" % "slf4j-log4j12" % slf4jVersion
    val compressLzf = "com.ning" % "compress-lzf" % "0.7.0"
    val hadoop = "org.apache.hadoop" % "hadoop-core" % "0.20.2"
    val asm = "asm" % "asm-all" % "3.3.1"
    val scalaTest = "org.scalatest" % "scalatest" % "1.3" % "test"
    val scalaCheck = "org.scala-tools.testing" %% "scalacheck" % "1.7" % "test"
    val jetty = jettyWebapp
  }

  class ReplProject(info: ProjectInfo) extends DefaultProject(info) with BaseProject with DepJar with XmlTestReport {
    val jetty = jettyWebapp
  }

  class ExamplesProject(info: ProjectInfo) extends DefaultProject(info) with BaseProject {
    val colt = "colt" % "colt" % "1.2.0"
  }

  class BagelProject(info: ProjectInfo) extends DefaultProject(info) with BaseProject with DepJar with XmlTestReport {
    val jetty = jettyWebapp
  }
	
}


// Project mixin for an XML-based ScalaTest report. Unfortunately
// there is currently no way to call this directly from SBT without
// executing a subprocess.
trait XmlTestReport extends BasicScalaProject {
  def testReportDir = outputPath / "test-report"

  lazy val testReport = task {
    log.info("Creating " + testReportDir + "...")<commit_msg>Depend on jetty-server in compile scope and upgrade to 7.4.2.<commit_after>import sbt._
import sbt.Process._

import assembly._

import de.element34.sbteclipsify._


class SparkProject(info: ProjectInfo) extends ParentProject(info) with IdeaProject {

  lazy val core = project("core", "Spark Core", new CoreProject(_))

  lazy val repl = project("repl", "Spark REPL", new ReplProject(_), core)

  lazy val examples = project("examples", "Spark Examples", new ExamplesProject(_), core)

  lazy val bagel = project("bagel", "Bagel", new BagelProject(_), core)

  lazy val jettyWebapp = "org.eclipse.jetty" % "jetty-webapp" % "7.4.1.v20110513" % "provided"

  trait BaseProject extends BasicScalaProject with ScalaPaths with BasicPackagePaths with Eclipsify with IdeaProject {
    override def compileOptions = super.compileOptions ++ Seq(Unchecked)

    lazy val jettyServer = "org.eclipse.jetty" % "jetty-server" % "7.4.2.v20110526"
    
    override def packageDocsJar = defaultJarPath("-javadoc.jar")
    override def packageSrcJar= defaultJarPath("-sources.jar")
    lazy val sourceArtifact = Artifact.sources(artifactID)
    lazy val docsArtifact = Artifact.javadoc(artifactID)
    override def packageToPublishActions = super.packageToPublishActions ++ Seq(packageDocs, packageSrc)
  }

  class CoreProject(info: ProjectInfo) extends DefaultProject(info) with BaseProject with DepJar with XmlTestReport {
    val guava = "com.google.guava" % "guava" % "r09"
    val log4j = "log4j" % "log4j" % "1.2.16"
    val slf4jVersion = "1.6.1"
    val slf4jApi = "org.slf4j" % "slf4j-api" % slf4jVersion
    val slf4jLog4j = "org.slf4j" % "slf4j-log4j12" % slf4jVersion
    val compressLzf = "com.ning" % "compress-lzf" % "0.7.0"
    val hadoop = "org.apache.hadoop" % "hadoop-core" % "0.20.2"
    val asm = "asm" % "asm-all" % "3.3.1"
    val scalaTest = "org.scalatest" % "scalatest" % "1.3" % "test"
    val scalaCheck = "org.scala-tools.testing" %% "scalacheck" % "1.7" % "test"
  }

  class ReplProject(info: ProjectInfo) extends DefaultProject(info) with BaseProject with DepJar with XmlTestReport

  class ExamplesProject(info: ProjectInfo) extends DefaultProject(info) with BaseProject {
    val colt = "colt" % "colt" % "1.2.0"
  }

  class BagelProject(info: ProjectInfo) extends DefaultProject(info) with BaseProject with DepJar with XmlTestReport

}


// Project mixin for an XML-based ScalaTest report. Unfortunately
// there is currently no way to call this directly from SBT without
// executing a subprocess.
trait XmlTestReport extends BasicScalaProject {
  def testReportDir = outputPath / "test-report"

  lazy val testReport = task {
    log.info("Creating " + testReportDir + "...")
{'fraction_non_alphanumeric': 0.1161531279178338, 'fraction_numerical': 0.02315592903828198, 'mean_word_length': 4.189922480620155, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '4532028', 'n_tokens_mistral': 1873, 'n_tokens_neox': 1810, 'n_words': 478}