2011-11-25 11:01:03 +01:00
/* *
2013-01-09 01:47:48 +01:00
* Copyright ( C ) 2009 - 2013 Typesafe Inc . < http : //www.typesafe.com>
2011-11-25 11:01:03 +01:00
*/
2011-09-23 10:21:03 +02:00
package akka
2011-07-04 19:16:43 +12:00
import sbt._
2011-12-08 17:05:01 +13:00
import sbt.Keys._
2012-09-13 09:24:35 +02:00
import com.typesafe.sbt.SbtMultiJvm
2013-06-19 19:13:06 +12:00
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys. { MultiJvm , extraOptions , jvmOptions , scalatestOptions , multiNodeExecuteTests , multiNodeJavaName , multiNodeHostsFileName , multiNodeTargetDirName , multiTestOptions }
2012-10-05 02:42:09 +02:00
import com.typesafe.sbt.SbtScalariform
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
2012-05-28 17:55:59 +02:00
import com.typesafe.sbtosgi.OsgiPlugin. { OsgiKeys , osgiSettings }
2012-05-25 10:02:35 +02:00
import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact
2013-08-27 16:17:22 +02:00
import com.typesafe.tools.mima.plugin.MimaKeys.reportBinaryIssues
2012-09-28 14:47:20 +12:00
import com.typesafe.sbt.SbtSite.site
2012-09-26 18:21:52 +12:00
import com.typesafe.sbt.site.SphinxSupport
2013-01-21 12:14:46 -08:00
import com.typesafe.sbt.site.SphinxSupport. { enableOutput , generatePdf , generatedPdf , generateEpub , generatedEpub , sphinxInputs , sphinxPackages , Sphinx }
2012-09-26 18:21:52 +12:00
import com.typesafe.sbt.preprocess.Preprocess. { preprocess , preprocessExts , preprocessVars , simplePreprocess }
2012-09-24 11:52:02 +02:00
import ls.Plugin. { lsSettings , LsKeys }
2011-08-04 16:49:05 +12:00
import java.lang.Boolean.getBoolean
2012-05-31 14:02:36 +02:00
import sbt.Tests
2012-09-24 14:36:20 +02:00
import LsKeys. { lsync , docsUrl => lsDocsUrl , tags => lsTags }
2013-01-10 11:28:08 +01:00
import java.io. { PrintWriter , InputStreamReader , FileInputStream , File }
2012-12-18 12:10:59 +01:00
import java.nio.charset.Charset
import java.util.Properties
2013-01-30 14:46:23 +01:00
import annotation.tailrec
2013-03-18 11:44:54 +01:00
import Unidoc. { JavaDoc , javadocSettings , junidocSources , sunidoc , unidocExclude }
2013-04-04 17:56:29 +02:00
import scalabuff.ScalaBuffPlugin._
2013-08-21 09:22:46 +02:00
import com.typesafe.sbt.S3Plugin. { S3 , s3Settings }
2011-07-04 19:16:43 +12:00
object AkkaBuild extends Build {
2011-07-11 15:38:22 -06:00
System . setProperty ( "akka.mode" , "test" ) // Is there better place for this?
2012-12-18 12:10:59 +01:00
// Load system properties from a file to make configuration from Jenkins easier
loadSystemProperties ( "project/akka-build.properties" )
2012-07-27 13:15:51 +02:00
val enableMiMa = false
2012-06-28 15:33:49 +02:00
2013-06-08 01:42:50 +02:00
val requestedScalaVersion = System . getProperty ( "akka.scalaVersion" , "2.10.2" )
2011-07-08 18:01:19 +12:00
lazy val buildSettings = Seq (
2011-10-06 15:44:15 +02:00
organization : = "com.typesafe.akka" ,
2013-07-09 10:59:36 +02:00
version : = "2.3-SNAPSHOT" ,
2012-12-05 13:35:09 +01:00
// Also change ScalaVersion in akka-sbt-plugin/sample/project/Build.scala
2013-06-08 01:42:50 +02:00
scalaVersion : = requestedScalaVersion ,
2013-05-22 11:49:52 +02:00
scalaBinaryVersion <<= ( scalaVersion , scalaBinaryVersion ) ( ( v , bv ) => System . getProperty ( "akka.scalaBinaryVersion" , if ( v contains "-" ) v else bv ) )
2011-07-08 18:01:19 +12:00
)
2011-07-04 19:16:43 +12:00
lazy val akka = Project (
id = "akka" ,
base = file ( "." ) ,
2012-09-26 18:21:52 +12:00
settings = parentSettings ++ Release . settings ++ Unidoc . settings ++ Publish . versionSettings ++
2013-08-21 09:22:46 +02:00
SphinxSupport . settings ++ Dist . settings ++ s3Settings ++ mimaSettings ++ unidocScaladocSettings ++
2013-03-06 09:44:34 +01:00
inConfig ( JavaDoc ) ( Defaults . configSettings ) ++ Seq (
2012-02-26 19:57:05 +01:00
testMailbox in GlobalScope : = System . getProperty ( "akka.testMailbox" , "false" ) . toBoolean ,
2012-01-01 11:33:20 +01:00
parallelExecution in GlobalScope : = System . getProperty ( "akka.parallelExecution" , "false" ) . toBoolean ,
2011-12-09 21:55:49 +13:00
Publish . defaultPublishTo in ThisBuild <<= crossTarget / "repository" ,
2013-05-22 17:58:38 +02:00
unidocExclude : = Seq ( samples . id , channelsTests . id , remoteTests . id , akkaSbtPlugin . id ) ,
2013-03-06 09:44:34 +01:00
sources in JavaDoc <<= junidocSources ,
javacOptions in JavaDoc : = Seq ( ) ,
artifactName in packageDoc in JavaDoc : = ( ( sv , mod , art ) => "" + mod . name + "_" + sv . binary + "-" + mod . revision + "-javadoc.jar" ) ,
packageDoc in Compile <<= packageDoc in JavaDoc ,
2013-02-01 21:22:41 +01:00
Dist . distExclude : = Seq ( actorTests . id , akkaSbtPlugin . id , docs . id , samples . id , osgi . id , osgiAries . id , channelsTests . id ) ,
2012-09-26 18:21:52 +12:00
// generate online version of docs
sphinxInputs in Sphinx <<= sphinxInputs in Sphinx in LocalProject ( docs . id ) map { inputs => inputs . copy ( tags = inputs . tags : + " online " ) } ,
// don't regenerate the pdf, just reuse the akka-docs version
2013-01-24 22:39:55 +01:00
generatedPdf in Sphinx <<= generatedPdf in Sphinx in LocalProject ( docs . id ) map identity ,
2013-08-21 09:22:46 +02:00
generatedEpub in Sphinx <<= generatedEpub in Sphinx in LocalProject ( docs . id ) map identity ,
S3 . host in S3 . upload : = "downloads.typesafe.com.s3.amazonaws.com" ,
S3 . progress in S3 . upload : = true ,
mappings in S3 . upload <<= ( Release . releaseDirectory , version ) map { ( d , v ) =>
def distMapping ( extension : String ) : ( File , String ) = {
val file = d / "downloads" / ( "akka-" + v + "." + extension )
file -> ( "akka/" + file . getName )
}
Seq ( distMapping ( "zip" ) , distMapping ( "tgz" ) )
}
2011-07-08 10:20:10 +12:00
) ,
2013-02-22 14:52:40 +01:00
aggregate = Seq ( actor , testkit , actorTests , dataflow , remote , remoteTests , camel , cluster , slf4j , agent , transactor ,
2013-09-14 14:19:18 +02:00
persistence , mailboxes , zeroMQ , kernel , akkaSbtPlugin , osgi , osgiAries , docs , contrib , samples , channels , channelsTests ,
2013-02-22 14:52:40 +01:00
multiNodeTestkit )
2011-07-04 19:16:43 +12:00
)
2013-02-14 15:49:21 +01:00
// this detached pseudo-project is used for running the tests against a different Scala version than the one used for compilation
// usage:
// all-tests/test (or test-only)
// customizing (on the SBT command line):
// set scalaVersion in allTests := "2.11.0"
2013-06-19 19:13:06 +12:00
lazy val multiJvmProjects = Seq ( remoteTests , cluster )
2013-02-14 15:49:21 +01:00
lazy val allTests = Project (
id = "all-tests" ,
base = file ( "all-tests" ) ,
2013-06-19 19:13:06 +12:00
dependencies = (
( ( akka . aggregate : Seq [ ProjectReference ] ) map ( _ % "test->test" ) ) ++
( multiJvmProjects map ( _ % "multi-jvm->multi-jvm" ) )
) ,
settings = defaultSettings ++ multiJvmSettings ++ Seq (
2013-06-08 01:42:50 +02:00
scalaVersion : = requestedScalaVersion ,
2013-02-14 15:49:21 +01:00
publishArtifact : = false ,
definedTests in Test : = Nil
2013-02-14 16:04:36 +01:00
) ++ (
( akka . aggregate : Seq [ ProjectReference ] )
filterNot {
case LocalProject ( name ) => name contains "slf4j"
case _ => false
} map {
pr => definedTests in Test <++= definedTests in ( pr , Test )
}
2013-06-19 19:13:06 +12:00
) ++ (
multiJvmProjects map {
pr => definedTests in MultiJvm <++= definedTests in ( pr , MultiJvm )
}
) ++ Seq (
scalatestOptions in MultiJvm : = defaultMultiJvmScalatestOptions
)
) configs ( MultiJvm )
lazy val atmos = Project (
id = "atmos" ,
base = file ( "atmos" ) ,
dependencies = Seq ( allTests % "test->test;multi-jvm->multi-jvm" ) ,
settings = defaultSettings ++ multiJvmSettings ++ Seq (
fork in Test : = true ,
definedTests in Test <<= definedTests in allTests in Test ,
libraryDependencies += "org.aspectj" % "aspectjweaver" % "1.7.2" ,
libraryDependencies += "com.typesafe.atmos" % "trace-akka-2.2.0-RC1_2.10" % "1.2.0-M5" excludeAll ( ExclusionRule ( organization = "com.typesafe.akka" ) ) ,
resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/" ,
javaOptions in Test <++= ( update ) map { ( u ) =>
val f = u . matching ( configurationFilter ( "compile" ) && moduleFilter ( name = "aspectjweaver" ) ) . head
Seq ( "-javaagent:" + f . getAbsolutePath , "-Dorg.aspectj.tracing.factory=default" )
} ,
definedTests in MultiJvm <++= definedTests in ( allTests , MultiJvm ) ,
scalatestOptions in MultiJvm <<= scalatestOptions in ( allTests , MultiJvm ) ,
multiTestOptions in MultiJvm <<= ( multiTestOptions in MultiJvm , javaOptions in Test ) map { ( multiOptions , testOptions ) =>
multiOptions . copy ( jvm = multiOptions . jvm ++ testOptions )
}
)
) configs ( MultiJvm )
2013-02-14 15:49:21 +01:00
2011-07-04 19:16:43 +12:00
lazy val actor = Project (
id = "akka-actor" ,
base = file ( "akka-actor" ) ,
2013-03-05 19:10:45 +01:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ Seq (
2011-10-06 15:44:15 +02:00
// to fix scaladoc generation
2012-05-29 02:13:25 +02:00
fullClasspath in doc in Compile <<= fullClasspath in Compile ,
2012-05-25 10:02:35 +02:00
libraryDependencies ++= Dependencies . actor ,
previousArtifact : = akkaPreviousArtifact ( "akka-actor" )
2011-07-04 19:16:43 +12:00
)
2013-03-05 19:10:45 +01:00
)
2011-07-04 19:16:43 +12:00
2013-03-04 23:40:29 +01:00
val cpsPlugin = Seq (
2012-09-24 22:37:06 +02:00
libraryDependencies <+= scalaVersion { v => compilerPlugin ( "org.scala-lang.plugins" % "continuations" % v ) } ,
scalacOptions += "-P:continuations:enable"
)
2012-08-07 14:30:16 +02:00
lazy val dataflow = Project (
id = "akka-dataflow" ,
base = file ( "akka-dataflow" ) ,
2013-02-10 16:25:01 -05:00
dependencies = Seq ( testkit % "test->test" ) ,
2013-02-10 16:04:59 -05:00
settings = defaultSettings ++ scaladocSettings ++ OSGi . dataflow ++ cpsPlugin ++ Seq (
previousArtifact : = akkaPreviousArtifact ( "akka-dataflow" )
)
2012-08-07 14:30:16 +02:00
)
2011-07-04 19:16:43 +12:00
lazy val testkit = Project (
id = "akka-testkit" ,
base = file ( "akka-testkit" ) ,
dependencies = Seq ( actor ) ,
2013-03-05 19:10:45 +01:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ OSGi . testkit ++ Seq (
2012-05-25 10:02:35 +02:00
libraryDependencies ++= Dependencies . testkit ,
2012-07-04 11:30:02 +02:00
initialCommands += "import akka.testkit._" ,
2012-05-25 10:02:35 +02:00
previousArtifact : = akkaPreviousArtifact ( "akka-testkit" )
2011-07-04 19:16:43 +12:00
)
)
lazy val actorTests = Project (
id = "akka-actor-tests" ,
base = file ( "akka-actor-tests" ) ,
2011-10-10 15:45:55 +02:00
dependencies = Seq ( testkit % "compile;test->test" ) ,
2013-01-30 14:46:23 +01:00
settings = defaultSettings ++ scaladocSettings ++ Seq (
2013-02-10 16:04:59 -05:00
publishArtifact in Compile : = false ,
2013-05-28 10:39:38 +02:00
libraryDependencies ++= Dependencies . actorTests ,
2013-08-27 16:17:22 +02:00
testOptions += Tests . Argument ( TestFrameworks . JUnit , "-v" , "-a" ) ,
reportBinaryIssues : = ( ) // disable bin comp check
2011-07-04 19:16:43 +12:00
)
)
2011-09-09 13:46:36 +02:00
lazy val remote = Project (
id = "akka-remote" ,
base = file ( "akka-remote" ) ,
2011-12-14 12:39:27 +01:00
dependencies = Seq ( actor , actorTests % "test->test" , testkit % "test->test" ) ,
2013-09-11 12:52:52 +02:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ OSGi . remote ++ Protobuf . settings ++ Seq (
2012-01-16 14:31:41 +01:00
libraryDependencies ++= Dependencies . remote ,
2011-12-19 16:30:15 +01:00
// disable parallel tests
2013-02-10 16:04:59 -05:00
parallelExecution in Test : = false ,
previousArtifact : = akkaPreviousArtifact ( "akka-remote" )
)
)
2013-02-22 14:52:40 +01:00
lazy val multiNodeTestkit = Project (
2013-02-10 16:04:59 -05:00
id = "akka-multi-node-testkit" ,
base = file ( "akka-multi-node-testkit" ) ,
dependencies = Seq ( remote , testkit ) ,
2013-09-11 12:52:52 +02:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ Protobuf . settings ++ Seq (
2013-02-10 16:04:59 -05:00
previousArtifact : = akkaPreviousArtifact ( "akka-multi-node-testkit" )
2011-09-09 13:46:36 +02:00
)
2012-05-29 08:28:54 +02:00
)
2011-09-09 13:46:36 +02:00
2012-05-10 10:24:05 +02:00
lazy val remoteTests = Project (
2013-02-10 16:04:59 -05:00
id = "akka-remote-tests" ,
2012-05-10 10:24:05 +02:00
base = file ( "akka-remote-tests" ) ,
2013-02-22 14:52:40 +01:00
dependencies = Seq ( actorTests % "test->test" , multiNodeTestkit ) ,
2013-02-10 16:04:59 -05:00
settings = defaultSettings ++ scaladocSettings ++ multiJvmSettings ++ Seq (
2012-09-06 15:35:59 +02:00
libraryDependencies ++= Dependencies . remoteTests ,
2012-05-10 10:24:05 +02:00
// disable parallel tests
parallelExecution in Test : = false ,
extraOptions in MultiJvm <<= ( sourceDirectory in MultiJvm ) { src =>
( name : String ) => ( src ** ( name + ".conf" ) ) . get . headOption . map ( "-Dakka.config=" + _ . absolutePath ) . toSeq
} ,
2012-05-27 19:20:30 +02:00
scalatestOptions in MultiJvm : = defaultMultiJvmScalatestOptions ,
2013-02-10 16:04:59 -05:00
publishArtifact in Compile : = false ,
2013-08-27 16:17:22 +02:00
reportBinaryIssues : = ( ) // disable bin comp check
2012-05-10 10:24:05 +02:00
)
) configs ( MultiJvm )
2012-02-06 17:29:17 +01:00
lazy val cluster = Project (
2013-05-23 15:18:00 +02:00
id = "akka-cluster" ,
2012-01-31 13:33:04 +01:00
base = file ( "akka-cluster" ) ,
2012-09-12 15:12:13 +02:00
dependencies = Seq ( remote , remoteTests % "test->test" , testkit % "test->test" ) ,
2013-09-10 16:40:05 +02:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ multiJvmSettings ++ OSGi . cluster ++
2013-04-04 17:56:29 +02:00
scalabuffSettings ++ Seq (
2013-05-29 16:47:20 +02:00
// this version needs to be reflected in the OSGi.scalabuffImport and dining hackers pom.xml
2013-09-11 12:52:52 +02:00
scalabuffVersion in ScalaBuff : = "1.3.6" ,
2012-01-31 13:33:04 +01:00
libraryDependencies ++= Dependencies . cluster ,
// disable parallel tests
parallelExecution in Test : = false ,
extraOptions in MultiJvm <<= ( sourceDirectory in MultiJvm ) { src =>
( name : String ) => ( src ** ( name + ".conf" ) ) . get . headOption . map ( "-Dakka.config=" + _ . absolutePath ) . toSeq
} ,
2012-05-27 19:20:30 +02:00
scalatestOptions in MultiJvm : = defaultMultiJvmScalatestOptions ,
2013-05-23 15:18:00 +02:00
previousArtifact : = akkaPreviousArtifact ( "akka-cluster" )
2012-01-31 13:33:04 +01:00
)
2013-04-04 17:56:29 +02:00
) configs ( MultiJvm , ScalaBuff )
2012-01-31 13:33:04 +01:00
2011-07-04 19:16:43 +12:00
lazy val slf4j = Project (
id = "akka-slf4j" ,
base = file ( "akka-slf4j" ) ,
2011-10-12 11:34:35 +02:00
dependencies = Seq ( actor , testkit % "test->test" ) ,
2013-03-05 19:10:45 +01:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ OSGi . slf4j ++ Seq (
2013-02-10 16:04:59 -05:00
libraryDependencies ++= Dependencies . slf4j ,
previousArtifact : = akkaPreviousArtifact ( "akka-slf4j" )
2011-07-04 19:16:43 +12:00
)
)
2011-12-19 15:46:06 +13:00
lazy val agent = Project (
id = "akka-agent" ,
base = file ( "akka-agent" ) ,
dependencies = Seq ( actor , testkit % "test->test" ) ,
2013-03-05 19:10:45 +01:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ OSGi . agent ++ Seq (
2012-05-25 10:02:35 +02:00
libraryDependencies ++= Dependencies . agent ,
previousArtifact : = akkaPreviousArtifact ( "akka-agent" )
2011-12-19 15:46:06 +13:00
)
)
2011-12-21 13:40:32 +13:00
lazy val transactor = Project (
id = "akka-transactor" ,
base = file ( "akka-transactor" ) ,
dependencies = Seq ( actor , testkit % "test->test" ) ,
2013-03-05 19:10:45 +01:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ OSGi . transactor ++ Seq (
2012-05-25 10:02:35 +02:00
libraryDependencies ++= Dependencies . transactor ,
previousArtifact : = akkaPreviousArtifact ( "akka-transactor" )
2011-12-21 13:40:32 +13:00
)
)
2013-09-14 14:19:18 +02:00
lazy val persistence = Project (
id = "akka-persistence-experimental" ,
base = file ( "akka-persistence" ) ,
dependencies = Seq ( actor , testkit % "test->test" ) ,
settings = defaultSettings ++ scaladocSettings ++ experimentalSettings ++ javadocSettings ++ OSGi . persistence ++ Seq (
libraryDependencies ++= Dependencies . persistence ,
previousArtifact : = akkaPreviousArtifact ( "akka-persistence" )
)
)
2012-02-23 17:13:40 +01:00
val testMailbox = SettingKey [ Boolean ] ( "test-mailbox" )
2011-11-01 09:45:57 +01:00
lazy val mailboxes = Project (
id = "akka-durable-mailboxes" ,
base = file ( "akka-durable-mailboxes" ) ,
settings = parentSettings ,
2012-05-08 15:07:05 +02:00
aggregate = Seq ( mailboxesCommon , fileMailbox )
2011-11-01 09:45:57 +01:00
)
2011-07-04 19:16:43 +12:00
2011-11-01 09:45:57 +01:00
lazy val mailboxesCommon = Project (
id = "akka-mailboxes-common" ,
base = file ( "akka-durable-mailboxes/akka-mailboxes-common" ) ,
dependencies = Seq ( remote , testkit % "compile;test->test" ) ,
2013-03-05 19:10:45 +01:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ OSGi . mailboxesCommon ++ Seq (
2012-05-15 16:01:32 +02:00
libraryDependencies ++= Dependencies . mailboxes ,
2012-05-25 10:02:35 +02:00
previousArtifact : = akkaPreviousArtifact ( "akka-mailboxes-common" ) ,
2012-05-15 16:01:32 +02:00
publishArtifact in Test : = true
2011-11-01 09:45:57 +01:00
)
)
2011-07-04 19:16:43 +12:00
2011-11-01 09:45:57 +01:00
lazy val fileMailbox = Project (
id = "akka-file-mailbox" ,
base = file ( "akka-durable-mailboxes/akka-file-mailbox" ) ,
dependencies = Seq ( mailboxesCommon % "compile;test->test" , testkit % "test" ) ,
2013-03-05 19:10:45 +01:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ OSGi . fileMailbox ++ Seq (
2012-05-25 10:02:35 +02:00
libraryDependencies ++= Dependencies . fileMailbox ,
previousArtifact : = akkaPreviousArtifact ( "akka-file-mailbox" )
2011-11-01 09:45:57 +01:00
)
)
2011-07-04 19:16:43 +12:00
2012-01-14 03:16:39 +01:00
lazy val zeroMQ = Project (
id = "akka-zeromq" ,
base = file ( "akka-zeromq" ) ,
dependencies = Seq ( actor , testkit % "test;test->test" ) ,
2013-03-05 19:10:45 +01:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ OSGi . zeroMQ ++ Seq (
2012-05-25 10:02:35 +02:00
libraryDependencies ++= Dependencies . zeroMQ ,
previousArtifact : = akkaPreviousArtifact ( "akka-zeromq" )
2012-01-14 03:16:39 +01:00
)
)
2011-12-14 16:19:16 +13:00
lazy val kernel = Project (
id = "akka-kernel" ,
base = file ( "akka-kernel" ) ,
2011-12-14 17:15:06 +13:00
dependencies = Seq ( actor , testkit % "test->test" ) ,
2013-03-05 19:10:45 +01:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ Seq (
2012-05-25 10:02:35 +02:00
libraryDependencies ++= Dependencies . kernel ,
previousArtifact : = akkaPreviousArtifact ( "akka-kernel" )
2011-12-14 16:19:16 +13:00
)
)
2012-04-24 10:19:36 +02:00
2012-01-19 14:38:44 +00:00
lazy val camel = Project (
2013-05-08 09:42:25 +02:00
id = "akka-camel" ,
base = file ( "akka-camel" ) ,
dependencies = Seq ( actor , slf4j , testkit % "test->test" ) ,
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ OSGi . camel ++ Seq (
libraryDependencies ++= Dependencies . camel ,
2013-08-27 16:17:22 +02:00
testOptions += Tests . Argument ( TestFrameworks . JUnit , "-v" , "-a" ) ,
previousArtifact : = akkaPreviousArtifact ( "akka-camel" )
2013-05-08 09:42:25 +02:00
)
2012-01-19 14:38:44 +00:00
)
2011-07-04 19:16:43 +12:00
2013-01-10 11:28:08 +01:00
2013-07-15 09:48:28 -04:00
val ActorMakeOsgiConfiguration = TaskKey [ Seq [ File ] ] ( "actor-make-osgi-configuration" , "Copy reference.conf from akka modules for akka-osgi" )
val ActorOsgiConfigurationReference = TaskKey [ Seq [ ( File , String ) ] ] ( "actor-osgi-configuration-reference" , "The list of all configuration files to be bundled in an osgi bundle, as well as project name." )
import Project.Initialize
/* * This method uses a bit of advanced sbt initailizers to grab the normalized names and resource directories
* from a set of projects , and then use this to create a mapping of ( reference . conf to project name ) .
*/
def ActorOsgiConfigurationReferenceAction ( projects : Seq [ Project ] ) : Initialize [ Task [ Seq [ ( File , String ) ] ] ] = {
val directories : Initialize [ Seq [ File ] ] = projects . map ( resourceDirectory in Compile in _ ) . join
val names : Initialize [ Seq [ String ] ] = projects . map ( normalizedName in _ ) . join
directories zip names map { case ( dirs , ns ) =>
for {
( dir , project ) <- dirs zip ns
val conf = dir / "reference.conf"
if conf . exists
} yield conf -> project
}
}
/* * This method is repsonsible for genreating a new typeasafe config reference.conf file for OSGi.
* it copies all the files in the `includes` parameter , using the associated project name . Then
* it generates a new resource . conf file which includes these files .
*
* @param target The location where we write the new files
* @param includes A sequnece of ( < reference . conf > , < project name > ) pairs .
*/
def makeOsgiConfigurationFiles ( includes : Seq [ ( File , String ) ] , target : File , streams : TaskStreams ) : Seq [ File ] = {
// First we copy all the files to their destination
val toCopy =
for {
( file , project ) <- includes
val toFile = target / ( project + ".conf" )
} yield file -> toFile
IO . copy ( toCopy )
val copiedResourceFileLocations = toCopy . map ( _ . _2 )
streams . log . debug ( "Copied OSGi resources: " + copiedResourceFileLocations . mkString ( "\n\t" , "\n\t" , "\n" ) )
// Now we generate the new including conf file
val newConf = target / "resource.conf"
val confIncludes =
for {
( file , project ) <- includes
} yield "include \"" + project + ".conf\""
val writer = new PrintWriter ( newConf )
try writer . write ( confIncludes mkString "\n" )
finally writer . close ( )
streams . log . info ( "Copied OSGi resources." )
newConf +: copiedResourceFileLocations
}
2013-01-10 11:28:08 +01:00
2012-05-29 12:41:09 +02:00
lazy val osgi = Project (
id = "akka-osgi" ,
base = file ( "akka-osgi" ) ,
dependencies = Seq ( actor ) ,
2013-03-05 19:10:45 +01:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ OSGi . osgi ++ Seq (
2012-07-03 11:43:59 +02:00
libraryDependencies ++= Dependencies . osgi ,
2013-01-10 11:28:08 +01:00
cleanFiles <+= baseDirectory { base => base / "src/main/resources" } ,
2013-07-15 09:48:28 -04:00
ActorOsgiConfigurationReference <<= ActorOsgiConfigurationReferenceAction ( projects . filter ( p => ! p . id . contains ( "test" ) && ! p . id . contains ( "sample" ) ) ) ,
ActorMakeOsgiConfiguration <<= ( ActorOsgiConfigurationReference , resourceManaged in Compile , streams ) map makeOsgiConfigurationFiles ,
resourceGenerators in Compile <+= ActorMakeOsgiConfiguration ,
2013-08-27 16:17:22 +02:00
parallelExecution in Test : = false ,
reportBinaryIssues : = ( ) // disable bin comp check
2012-05-29 12:41:09 +02:00
)
)
2012-06-26 22:07:57 +02:00
lazy val osgiAries = Project (
id = "akka-osgi-aries" ,
base = file ( "akka-osgi-aries" ) ,
dependencies = Seq ( osgi % "compile;test->test" ) ,
2013-03-05 19:10:45 +01:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ OSGi . osgiAries ++ Seq (
2012-07-03 11:43:59 +02:00
libraryDependencies ++= Dependencies . osgiAries ,
2013-08-27 16:17:22 +02:00
parallelExecution in Test : = false ,
reportBinaryIssues : = ( ) // disable bin comp check
2012-06-26 22:07:57 +02:00
)
)
2011-10-21 08:53:00 +02:00
lazy val akkaSbtPlugin = Project (
id = "akka-sbt-plugin" ,
base = file ( "akka-sbt-plugin" ) ,
settings = defaultSettings ++ Seq (
2012-03-19 13:10:11 +13:00
sbtPlugin : = true ,
2012-09-10 02:05:04 +02:00
publishMavenStyle : = false , // SBT Plugins should be published as Ivy
2012-09-18 15:49:02 +02:00
publishTo <<= Publish . akkaPluginPublishTo ,
2012-07-30 16:19:26 +02:00
scalacOptions in Compile : = Seq ( "-encoding" , "UTF-8" , "-deprecation" , "-unchecked" ) ,
2012-11-06 12:30:31 +13:00
scalaVersion : = "2.9.2" ,
2013-08-27 16:17:22 +02:00
scalaBinaryVersion <<= scalaVersion ,
reportBinaryIssues : = ( ) // disable bin comp check
2011-10-21 08:53:00 +02:00
)
)
2011-07-04 19:16:43 +12:00
lazy val samples = Project (
id = "akka-samples" ,
base = file ( "akka-samples" ) ,
2011-07-08 18:01:19 +12:00
settings = parentSettings ,
2013-09-14 14:19:18 +02:00
aggregate = Seq ( camelSample , fsmSample , helloSample , helloKernelSample , remoteSample , persistenceSample , clusterSample , multiNodeSample , osgiDiningHakkersSample )
2012-08-09 19:30:32 +02:00
)
lazy val camelSample = Project (
id = "akka-sample-camel" ,
base = file ( "akka-samples/akka-sample-camel" ) ,
dependencies = Seq ( actor , camel ) ,
2012-09-20 21:50:35 +02:00
settings = sampleSettings ++ Seq ( libraryDependencies ++= Dependencies . camelSample )
2011-07-04 19:16:43 +12:00
)
lazy val fsmSample = Project (
id = "akka-sample-fsm" ,
base = file ( "akka-samples/akka-sample-fsm" ) ,
dependencies = Seq ( actor ) ,
2012-09-20 21:50:35 +02:00
settings = sampleSettings
2011-07-04 19:16:43 +12:00
)
2011-12-08 17:05:01 +13:00
2011-11-25 14:49:09 +01:00
lazy val helloSample = Project (
id = "akka-sample-hello" ,
base = file ( "akka-samples/akka-sample-hello" ) ,
dependencies = Seq ( actor ) ,
2012-09-20 21:50:35 +02:00
settings = sampleSettings
2011-11-25 14:49:09 +01:00
)
2011-12-08 17:05:01 +13:00
2011-12-14 16:19:16 +13:00
lazy val helloKernelSample = Project (
id = "akka-sample-hello-kernel" ,
base = file ( "akka-samples/akka-sample-hello-kernel" ) ,
dependencies = Seq ( kernel ) ,
2012-09-20 21:50:35 +02:00
settings = sampleSettings
2011-12-14 16:19:16 +13:00
)
2011-12-22 15:12:41 +01:00
lazy val remoteSample = Project (
id = "akka-sample-remote" ,
base = file ( "akka-samples/akka-sample-remote" ) ,
dependencies = Seq ( actor , remote , kernel ) ,
2012-09-20 21:50:35 +02:00
settings = sampleSettings
2011-12-22 15:12:41 +01:00
)
2013-09-14 14:19:18 +02:00
lazy val persistenceSample = Project (
id = "akka-sample-persistence" ,
base = file ( "akka-samples/akka-sample-persistence" ) ,
dependencies = Seq ( actor , persistence ) ,
settings = sampleSettings
)
2012-08-16 14:48:15 +02:00
lazy val clusterSample = Project (
2013-05-23 15:18:00 +02:00
id = "akka-sample-cluster" ,
2012-08-16 14:48:15 +02:00
base = file ( "akka-samples/akka-sample-cluster" ) ,
2013-01-14 14:09:53 +01:00
dependencies = Seq ( cluster , contrib , remoteTests % "test" , testkit % "test" ) ,
2013-09-10 16:40:05 +02:00
settings = sampleSettings ++ multiJvmSettings ++ Seq (
2012-09-21 11:47:50 +02:00
libraryDependencies ++= Dependencies . clusterSample ,
2012-11-08 18:49:54 +01:00
javaOptions in run ++= Seq (
"-Djava.library.path=./sigar" ,
"-Xms128m" , "-Xmx1024m" ) ,
Keys . fork in run : = true ,
2012-09-13 10:54:14 +02:00
// disable parallel tests
parallelExecution in Test : = false ,
extraOptions in MultiJvm <<= ( sourceDirectory in MultiJvm ) { src =>
( name : String ) => ( src ** ( name + ".conf" ) ) . get . headOption . map ( "-Dakka.config=" + _ . absolutePath ) . toSeq
2012-09-27 15:57:46 +02:00
}
2012-09-20 21:50:35 +02:00
)
) configs ( MultiJvm )
lazy val multiNodeSample = Project (
2013-02-22 14:52:40 +01:00
id = "akka-sample-multi-node" ,
2012-09-20 21:50:35 +02:00
base = file ( "akka-samples/akka-sample-multi-node" ) ,
2013-02-22 14:52:40 +01:00
dependencies = Seq ( multiNodeTestkit % "test" , testkit % "test" ) ,
2012-09-27 15:57:46 +02:00
settings = sampleSettings ++ multiJvmSettings ++ experimentalSettings ++ Seq (
2012-09-20 21:50:35 +02:00
libraryDependencies ++= Dependencies . multiNodeSample ,
// disable parallel tests
parallelExecution in Test : = false ,
extraOptions in MultiJvm <<= ( sourceDirectory in MultiJvm ) { src =>
( name : String ) => ( src ** ( name + ".conf" ) ) . get . headOption . map ( "-Dakka.config=" + _ . absolutePath ) . toSeq
2012-09-27 15:57:46 +02:00
}
2012-09-13 10:54:14 +02:00
)
) configs ( MultiJvm )
2012-08-16 14:48:15 +02:00
2013-02-06 15:54:58 +01:00
lazy val osgiDiningHakkersSample = Project ( id = "akka-sample-osgi-dining-hakkers" ,
base = file ( "akka-samples/akka-sample-osgi-dining-hakkers" ) ,
2013-04-11 08:39:09 +02:00
settings = parentSettings
) aggregate ( osgiDiningHakkersSampleApi , osgiDiningHakkersSampleCommand , osgiDiningHakkersSampleCore ,
2013-05-29 16:47:20 +02:00
osgiDiningHakkersSampleIntegrationTest , uncommons , scalaBuff )
2013-02-06 15:54:58 +01:00
lazy val osgiDiningHakkersSampleApi = Project ( id = "akka-sample-osgi-dining-hakkers-api" ,
base = file ( "akka-samples/akka-sample-osgi-dining-hakkers/api" ) ,
settings = sampleSettings ++ OSGi . osgiDiningHakkersSampleApi
) dependsOn ( actor )
lazy val osgiDiningHakkersSampleCommand = Project ( id = "akka-sample-osgi-dining-hakkers-command" ,
base = file ( "akka-samples/akka-sample-osgi-dining-hakkers/command" ) ,
settings = sampleSettings ++ OSGi . osgiDiningHakkersSampleCommand ++ Seq (
libraryDependencies ++= Dependencies . osgiDiningHakkerSampleCommand
)
) dependsOn ( osgiDiningHakkersSampleApi , actor )
lazy val osgiDiningHakkersSampleCore = Project ( id = "akka-sample-osgi-dining-hakkers-core" ,
base = file ( "akka-samples/akka-sample-osgi-dining-hakkers/core" ) ,
settings = sampleSettings ++ OSGi . osgiDiningHakkersSampleCore ++ Seq (
libraryDependencies ++= Dependencies . osgiDiningHakkerSampleCore
)
) dependsOn ( osgiDiningHakkersSampleApi , actor , remote , cluster , osgi )
//TODO to remove it as soon as the uncommons gets OSGified, see ticket #2990
lazy val uncommons = Project ( id = "akka-sample-osgi-dining-hakkers-uncommons" ,
2013-05-29 16:47:20 +02:00
base = file ( "akka-samples/akka-sample-osgi-dining-hakkers/uncommons" ) ,
2013-02-06 15:54:58 +01:00
settings = sampleSettings ++ OSGi . osgiDiningHakkersSampleUncommons ++ Seq (
libraryDependencies ++= Dependencies . uncommons ,
2013-05-29 16:47:20 +02:00
version : = "1.2.0"
)
)
//TODO to remove it as soon as the scalabuff gets OSGified, see ticket #3416
lazy val scalaBuff = Project ( id = "akka-sample-osgi-dining-hakkers-scalaBuff" ,
base = file ( "akka-samples/akka-sample-osgi-dining-hakkers/scalabuff" ) ,
settings = sampleSettings ++ OSGi . osgiDiningHakkersSampleScalaBuff ++ Seq (
libraryDependencies ++= Dependencies . scalaBuff ,
version : = "1.2.0"
2013-02-06 15:54:58 +01:00
)
)
2013-04-11 08:39:09 +02:00
def executeMvnCommands ( failureMessage : String , commands : String * ) = {
2013-05-29 16:47:20 +02:00
if ( { List ( "sh" , "-c" , commands . mkString ( "cd akka-samples/akka-sample-osgi-dining-hakkers; mvn -U " , " " , "" ) ) ! } != 0 )
2013-04-11 08:39:09 +02:00
throw new Exception ( failureMessage )
}
lazy val osgiDiningHakkersSampleIntegrationTest = Project ( id = "akka-sample-osgi-dining-hakkers-integration" ,
base = file ( "akka-samples/akka-sample-osgi-dining-hakkers-integration" ) ,
settings = sampleSettings ++ (
if ( System . getProperty ( "akka.osgi.sample.test" , "false" ) . toBoolean ) Seq (
test in Test ~= { x => {
executeMvnCommands ( "Osgi sample Dining hakkers test failed" , "clean" , "install" )
} } )
else Seq . empty
)
2013-05-29 16:47:20 +02:00
) dependsOn ( osgiDiningHakkersSampleApi , osgiDiningHakkersSampleCommand , osgiDiningHakkersSampleCore , uncommons , scalaBuff )
2013-04-11 08:39:09 +02:00
2011-10-05 17:41:00 +02:00
lazy val docs = Project (
id = "akka-docs" ,
base = file ( "akka-docs" ) ,
2013-01-29 22:35:45 +01:00
dependencies = Seq ( actor , testkit % "test->test" , mailboxesCommon % "compile;test->test" , channels ,
2013-09-14 14:19:18 +02:00
remote % "compile;test->test" , cluster , slf4j , agent , dataflow , transactor , fileMailbox , zeroMQ , camel , osgi , osgiAries ,
persistence % "compile;test->test" ) ,
2012-09-28 14:47:20 +12:00
settings = defaultSettings ++ site . settings ++ site . sphinxSupport ( ) ++ site . publishSite ++ sphinxPreprocessing ++ cpsPlugin ++ Seq (
2012-09-26 18:21:52 +12:00
sourceDirectory in Sphinx <<= baseDirectory / "rst" ,
sphinxPackages in Sphinx <+= baseDirectory { _ / "_sphinx" / "pygments" } ,
2012-09-27 17:05:27 +02:00
// copy akka-contrib/docs into our rst_preprocess/contrib (and apply substitutions)
preprocess in Sphinx <<= ( preprocess in Sphinx ,
2012-09-28 13:10:58 +02:00
baseDirectory in contrib ,
2012-09-27 17:05:27 +02:00
target in preprocess in Sphinx ,
cacheDirectory ,
preprocessExts in Sphinx ,
preprocessVars in Sphinx ,
streams ) map { ( orig , src , target , cacheDir , exts , vars , s ) =>
val contribSrc = Map ( "contribSrc" -> "../../../akka-contrib" )
2012-09-28 13:10:58 +02:00
simplePreprocess ( src / "docs" , target / "contrib" , cacheDir / "sphinx" / "preprocessed-contrib" , exts , vars ++ contribSrc , s . log )
2012-09-27 17:05:27 +02:00
orig
} ,
2012-09-27 16:00:25 +12:00
enableOutput in generatePdf in Sphinx : = true ,
2013-01-24 15:06:14 +01:00
enableOutput in generateEpub in Sphinx : = true ,
2012-09-26 18:21:52 +12:00
unmanagedSourceDirectories in Test <<= sourceDirectory in Sphinx apply { _ ** "code" get } ,
2011-10-05 17:41:00 +02:00
libraryDependencies ++= Dependencies . docs ,
2013-02-10 16:04:59 -05:00
publishArtifact in Compile : = false ,
2012-06-25 19:30:13 +02:00
unmanagedSourceDirectories in ScalariformKeys . format in Test <<= unmanagedSourceDirectories in Test ,
2013-08-27 16:17:22 +02:00
testOptions += Tests . Argument ( TestFrameworks . JUnit , "-v" , "-a" ) ,
reportBinaryIssues : = ( ) // disable bin comp check
2011-10-05 17:41:00 +02:00
)
)
2012-09-25 16:09:44 +02:00
lazy val contrib = Project (
id = "akka-contrib" ,
base = file ( "akka-contrib" ) ,
2013-06-06 10:52:03 +02:00
dependencies = Seq ( remote , remoteTests % "test->test" , cluster ) ,
2013-03-05 19:10:45 +01:00
settings = defaultSettings ++ scaladocSettings ++ javadocSettings ++ multiJvmSettings ++ Seq (
2012-09-27 15:57:46 +02:00
libraryDependencies ++= Dependencies . contrib ,
testOptions += Tests . Argument ( TestFrameworks . JUnit , "-v" ) ,
2013-08-27 16:17:22 +02:00
reportBinaryIssues : = ( ) , // disable bin comp check
2012-09-25 16:09:44 +02:00
description : = "" " |
| This subproject provides a home to modules contributed by external
| developers which may or may not move into the officially supported code
| base over time . A module in this subproject doesn 't have to obey the rule
| of staying binary compatible between minor releases . Breaking API changes
| may be introduced in minor releases without notice as we refine and
| simplify based on your feedback . A module may be dropped in any release
| without prior deprecation . The Typesafe subscription does not cover
| support for these modules .
| "" " . stripMargin
)
2012-09-27 15:57:46 +02:00
) configs ( MultiJvm )
2012-09-25 16:09:44 +02:00
2013-01-22 22:50:09 +01:00
lazy val channels = Project (
2013-02-01 15:32:56 +01:00
id = "akka-channels-experimental" ,
2013-01-22 22:50:09 +01:00
base = file ( "akka-channels" ) ,
2012-12-31 16:37:58 +01:00
dependencies = Seq ( actor ) ,
2013-02-01 21:22:41 +01:00
settings = defaultSettings ++ scaladocSettings ++ experimentalSettings ++ Seq (
2013-08-27 16:17:22 +02:00
libraryDependencies <+= ( scalaVersion ) ( "org.scala-lang" % "scala-reflect" % _ ) ,
reportBinaryIssues : = ( ) // disable bin comp check
2012-12-31 16:37:58 +01:00
)
)
2013-01-22 22:50:09 +01:00
lazy val channelsTests = Project (
id = "akka-channels-tests" ,
base = file ( "akka-channels-tests" ) ,
dependencies = Seq ( channels , testkit % "compile;test->test" ) ,
2013-02-04 10:18:52 +01:00
settings = defaultSettings ++ experimentalSettings ++ Seq (
2013-02-10 16:04:59 -05:00
publishArtifact in Compile : = false ,
2013-08-27 16:17:22 +02:00
libraryDependencies <+= ( scalaVersion ) ( "org.scala-lang" % "scala-compiler" % _ ) ,
reportBinaryIssues : = ( ) // disable bin comp check
2012-12-31 16:37:58 +01:00
)
)
2011-07-04 19:16:43 +12:00
// Settings
2012-09-19 15:04:27 +02:00
override lazy val settings =
super . settings ++
buildSettings ++
Seq (
2012-10-15 20:26:13 +02:00
shellPrompt : = { s => Project . extract ( s ) . currentProject . id + " > " }
2012-02-24 11:50:23 +01:00
)
2011-07-08 18:01:19 +12:00
2012-11-09 08:00:30 +01:00
lazy val baseSettings = Defaults . defaultSettings ++ Publish . settings
2011-07-08 18:01:19 +12:00
lazy val parentSettings = baseSettings ++ Seq (
2013-08-27 16:17:22 +02:00
publishArtifact : = false ,
reportBinaryIssues : = ( ) // disable bin comp check
2011-07-04 19:16:43 +12:00
)
2012-09-20 21:50:35 +02:00
lazy val sampleSettings = defaultSettings ++ Seq (
2013-08-27 16:17:22 +02:00
publishArtifact in ( Compile , packageBin ) : = false ,
reportBinaryIssues : = ( ) // disable bin comp check
2012-09-20 21:50:35 +02:00
)
2012-09-27 15:57:46 +02:00
lazy val experimentalSettings = Seq (
description : = "" " | This module of Akka is marked as
| experimental , which means that it is in early
| access mode , which also means that it is not covered
| by commercial support . An experimental module doesn 't
| have to obey the rule of staying binary compatible
| between minor releases . Breaking API changes may be
| introduced in minor releases without notice as we
| refine and simplify based on your feedback . An
| experimental module may be dropped in major releases
| without prior deprecation .
| "" " . stripMargin
)
2011-11-28 13:02:11 +13:00
val excludeTestNames = SettingKey [ Seq [ String ] ] ( "exclude-test-names" )
2012-05-29 09:05:46 +02:00
val excludeTestTags = SettingKey [ Set [ String ] ] ( "exclude-test-tags" )
val onlyTestTags = SettingKey [ Set [ String ] ] ( "only-test-tags" )
2011-07-14 14:10:37 +12:00
2012-05-27 19:20:30 +02:00
lazy val defaultMultiJvmOptions : Seq [ String ] = {
2012-06-28 11:32:11 +02:00
import scala.collection.JavaConverters._
2013-01-21 12:14:46 -08:00
// multinode.D= and multinode.X= makes it possible to pass arbitrary
2012-10-15 15:15:40 +02:00
// -D or -X arguments to the forked jvm, e.g.
// -Dmultinode.Djava.net.preferIPv4Stack=true -Dmultinode.Xmx512m -Dmultinode.XX:MaxPermSize=256M
2013-04-23 15:05:27 +02:00
// -DMultiJvm.akka.cluster.Stress.nrOfNodes=15
2012-10-15 17:27:02 +02:00
val MultinodeJvmArgs = "multinode\\.(D|X)(.*)" . r
2013-04-23 15:05:27 +02:00
val knownPrefix = Set ( "multnode." , "akka." , "MultiJvm." )
2012-06-28 11:32:11 +02:00
val akkaProperties = System . getProperties . propertyNames . asScala . toList . collect {
2013-01-21 12:14:46 -08:00
case MultinodeJvmArgs ( a , b ) =>
2012-10-15 15:15:40 +02:00
val value = System . getProperty ( "multinode." + a + b )
"-" + a + b + ( if ( value == "" ) "" else "=" + value )
2013-04-23 15:05:27 +02:00
case key : String if knownPrefix . exists ( pre => key . startsWith ( pre ) ) => "-D" + key + "=" + System . getProperty ( key )
2012-06-28 11:32:11 +02:00
}
2012-11-23 15:37:44 +01:00
2013-01-21 12:14:46 -08:00
"-Xmx256m" : : akkaProperties :::
2012-11-23 15:37:44 +01:00
( if ( getBoolean ( "sbt.log.noformat" ) ) List ( "-Dakka.test.nocolor=true" ) else Nil )
2012-05-24 10:00:35 +02:00
}
2012-05-28 18:37:41 +02:00
// for excluding tests by name use system property: -Dakka.test.names.exclude=TimingSpec
// not supported by multi-jvm tests
lazy val useExcludeTestNames : Seq [ String ] = systemPropertyAsSeq ( "akka.test.names.exclude" )
// for excluding tests by tag use system property: -Dakka.test.tags.exclude=<tag name>
// note that it will not be used if you specify -Dakka.test.tags.only
2012-05-29 09:05:46 +02:00
lazy val useExcludeTestTags : Set [ String ] = {
2012-10-08 13:27:34 +02:00
if ( useOnlyTestTags . isEmpty ) systemPropertyAsSeq ( "akka.test.tags.exclude" ) . toSet
2012-05-29 09:05:46 +02:00
else Set . empty
2012-05-27 19:20:30 +02:00
}
2012-05-28 18:37:41 +02:00
// for running only tests by tag use system property: -Dakka.test.tags.only=<tag name>
2012-05-29 09:05:46 +02:00
lazy val useOnlyTestTags : Set [ String ] = systemPropertyAsSeq ( "akka.test.tags.only" ) . toSet
2012-05-28 18:37:41 +02:00
2012-06-07 13:32:12 +02:00
def executeMultiJvmTests : Boolean = {
2012-10-08 13:27:34 +02:00
useOnlyTestTags . contains ( "long-running" ) || ! useExcludeTestTags . contains ( "long-running" )
2012-06-07 13:32:12 +02:00
}
2012-05-29 09:05:46 +02:00
def systemPropertyAsSeq ( name : String ) : Seq [ String ] = {
2012-05-28 18:37:41 +02:00
val prop = System . getProperty ( name , "" )
2012-05-29 09:05:46 +02:00
if ( prop . isEmpty ) Seq . empty else prop . split ( "," ) . toSeq
2012-05-27 19:20:30 +02:00
}
2012-05-29 17:16:28 +02:00
val multiNodeEnabled = java . lang . Boolean . getBoolean ( "akka.test.multi-node" )
2012-05-27 19:20:30 +02:00
lazy val defaultMultiJvmScalatestOptions : Seq [ String ] = {
2012-10-08 13:27:34 +02:00
val excludeTags = useExcludeTestTags . toSeq
2012-08-13 11:29:42 +02:00
Seq ( "-C" , "org.scalatest.akka.QuietReporter" ) ++
2012-05-29 17:16:28 +02:00
( if ( excludeTags . isEmpty ) Seq . empty else Seq ( "-l" , if ( multiNodeEnabled ) excludeTags . mkString ( "\"" , " " , "\"" ) else excludeTags . mkString ( " " ) ) ) ++
( if ( useOnlyTestTags . isEmpty ) Seq . empty else Seq ( "-n" , if ( multiNodeEnabled ) useOnlyTestTags . mkString ( "\"" , " " , "\"" ) else useOnlyTestTags . mkString ( " " ) ) )
2012-05-27 19:20:30 +02:00
}
2012-09-24 11:52:02 +02:00
lazy val defaultSettings = baseSettings ++ formatSettings ++ mimaSettings ++ lsSettings ++ Seq (
2011-07-04 19:16:43 +12:00
// compile options
2013-03-28 23:45:48 +01:00
scalacOptions in Compile ++= Seq ( "-encoding" , "UTF-8" , "-target:jvm-1.6" , "-deprecation" , "-feature" , "-unchecked" , "-Xlog-reflective-calls" , "-Xlint" ) ,
2013-05-10 02:30:45 +02:00
javacOptions in Compile ++= Seq ( "-encoding" , "UTF-8" , "-source" , "1.6" , "-target" , "1.6" , "-Xlint:unchecked" , "-Xlint:deprecation" ) ,
2011-07-04 19:16:43 +12:00
2012-12-21 14:53:05 +01:00
// if changing this between binary and full, also change at the bottom of akka-sbt-plugin/sample/project/Build.scala
crossVersion : = CrossVersion . binary ,
2012-08-22 15:52:32 +02:00
2012-01-12 13:45:53 +01:00
ivyLoggingLevel in ThisBuild : = UpdateLogging . Quiet ,
2012-09-24 14:36:20 +02:00
description in lsync : = "Akka is the platform for the next generation of event-driven, scalable and fault-tolerant architectures on the JVM." ,
homepage in lsync : = Some ( url ( "http://akka.io" ) ) ,
lsTags in lsync : = Seq ( "actors" , "stm" , "concurrency" , "distributed" , "fault-tolerance" , "scala" , "java" , "futures" , "dataflow" , "remoting" ) ,
lsDocsUrl in lsync : = Some ( url ( "http://akka.io/docs" ) ) ,
licenses in lsync : = Seq ( ( "Apache 2" , url ( "http://www.apache.org/licenses/LICENSE-2.0.html" ) ) ) ,
externalResolvers in lsync : = Seq ( "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases" ) ,
2012-09-24 11:52:02 +02:00
2013-03-06 09:44:34 +01:00
initialCommands : =
"" " | import language.postfixOps
| import akka.actor._
| import ActorDSL._
| import scala.concurrent._
| import com.typesafe.config.ConfigFactory
| import scala.concurrent.duration._
| import akka.util.Timeout
2013-03-07 19:59:59 +01:00
| var config = ConfigFactory . parseString ( "akka.stdout-loglevel=INFO,akka.loglevel=DEBUG,pinned{type=PinnedDispatcher,executor=thread-pool-executor,throughput=1000}" )
| var remoteConfig = ConfigFactory . parseString ( "akka.remote.netty{port=0,use-dispatcher-for-io=akka.actor.default-dispatcher,execution-pool-size=0},akka.actor.provider=akka.remote.RemoteActorRefProvider" ) . withFallback ( config )
2013-03-06 09:44:34 +01:00
| var system : ActorSystem = null
| implicit def _system = system
| def startSystem ( remoting : Boolean = false ) { system = ActorSystem ( "repl" , if ( remoting ) remoteConfig else config ) ; println ( "don’ t forget to system.shutdown()!" ) }
| implicit def ec = system . dispatcher
| implicit val timeout = Timeout ( 5 seconds )
| "" " . stripMargin ,
2012-09-24 11:52:02 +02:00
/* *
* Test settings
*/
2012-01-01 11:33:20 +01:00
parallelExecution in Test : = System . getProperty ( "akka.parallelExecution" , "false" ) . toBoolean ,
2012-07-03 11:19:40 +02:00
logBuffered in Test : = System . getProperty ( "akka.logBufferedTests" , "false" ) . toBoolean ,
2011-07-14 14:10:37 +12:00
2012-05-28 18:37:41 +02:00
excludeTestNames : = useExcludeTestNames ,
excludeTestTags : = useExcludeTestTags ,
onlyTestTags : = useOnlyTestTags ,
2011-11-28 13:02:11 +13:00
// add filters for tests excluded by name
testOptions in Test <++= excludeTestNames map { _ . map ( exclude => Tests . Filter ( test => ! test . contains ( exclude ) ) ) } ,
2012-10-08 13:27:34 +02:00
// add arguments for tests excluded by tag
testOptions in Test <++= excludeTestTags map { tags =>
2012-05-29 15:31:57 +02:00
if ( tags . isEmpty ) Seq . empty else Seq ( Tests . Argument ( "-l" , tags . mkString ( " " ) ) )
2011-11-28 13:02:11 +13:00
} ,
2012-05-28 18:37:41 +02:00
// add arguments for running only tests by tag
testOptions in Test <++= onlyTestTags map { tags =>
2012-05-29 15:31:57 +02:00
if ( tags . isEmpty ) Seq . empty else Seq ( Tests . Argument ( "-n" , tags . mkString ( " " ) ) )
2011-11-28 13:02:11 +13:00
} ,
2011-09-16 13:54:50 +02:00
2012-06-26 11:58:04 +02:00
// show full stack traces and test case durations
2013-08-27 16:17:22 +02:00
testOptions in Test += Tests . Argument ( "-oDF" ) ,
validatePullRequestTask ,
validatePullRequest <<= validatePullRequest . dependsOn ( /* reportBinaryIssues */ )
2011-07-04 19:16:43 +12:00
)
2011-07-08 12:53:36 +12:00
2013-08-27 16:17:22 +02:00
val validatePullRequest = TaskKey [ Unit ] ( "validate-pull-request" , "Additional tasks for pull request validation" )
// the tasks that to run for validation is defined in defaultSettings
val validatePullRequestTask = validatePullRequest : = ( )
2012-09-26 18:21:52 +12:00
// preprocessing settings for sphinx
lazy val sphinxPreprocessing = inConfig ( Sphinx ) ( Seq (
target in preprocess <<= baseDirectory / "rst_preprocessed" ,
preprocessExts : = Set ( "rst" , "py" ) ,
// customization of sphinx @<key>@ replacements, add to all sphinx-using projects
// add additional replacements here
preprocessVars <<= ( scalaVersion , version ) { ( s , v ) =>
2012-10-22 11:14:22 +02:00
val isSnapshot = v . endsWith ( "SNAPSHOT" )
2012-09-21 10:47:58 +02:00
val BinVer = """(\d+\.\d+)\.\d+""" . r
Map (
"version" -> v ,
"scalaVersion" -> s ,
"crossString" -> ( s match {
case BinVer ( _ ) => ""
case _ => "cross CrossVersion.full"
} ) ,
"jarName" -> ( s match {
case BinVer ( bv ) => "akka-actor_" + bv + "-" + v + ".jar"
case _ => "akka-actor_" + s + "-" + v + ".jar"
} ) ,
"binVersion" -> ( s match {
case BinVer ( bv ) => bv
case _ => s
2012-10-22 11:14:22 +02:00
} ) ,
2012-11-15 12:48:13 +01:00
"sigarVersion" -> Dependencies . Compile . sigar . revision ,
2012-10-22 11:14:22 +02:00
"github" -> "http://github.com/akka/akka/tree/%s" . format ( ( if ( isSnapshot ) "master" else "v" + v ) )
2012-09-21 10:47:58 +02:00
)
} ,
2012-09-26 18:21:52 +12:00
preprocess <<= ( sourceDirectory , target in preprocess , cacheDirectory , preprocessExts , preprocessVars , streams ) map {
( src , target , cacheDir , exts , vars , s ) => simplePreprocess ( src , target , cacheDir / "sphinx" / "preprocessed" , exts , vars , s . log )
} ,
sphinxInputs <<= ( sphinxInputs , preprocess ) map { ( inputs , preprocessed ) => inputs . copy ( src = preprocessed ) }
) ) ++ Seq (
cleanFiles <+= target in preprocess in Sphinx
2012-09-21 10:47:58 +02:00
)
2012-10-05 02:42:09 +02:00
lazy val formatSettings = SbtScalariform . scalariformSettings ++ Seq (
2011-12-08 17:05:01 +13:00
ScalariformKeys . preferences in Compile : = formattingPreferences ,
ScalariformKeys . preferences in Test : = formattingPreferences
2011-07-26 17:49:08 +12:00
)
def formattingPreferences = {
import scalariform.formatter.preferences._
FormattingPreferences ( )
. setPreference ( RewriteArrowSymbols , true )
. setPreference ( AlignParameters , true )
. setPreference ( AlignSingleLineCaseStatements , true )
}
2012-10-05 02:42:09 +02:00
lazy val multiJvmSettings = SbtMultiJvm . multiJvmSettings ++ inConfig ( MultiJvm ) ( SbtScalariform . scalariformSettings ) ++ Seq (
2012-09-27 15:57:46 +02:00
jvmOptions in MultiJvm : = defaultMultiJvmOptions ,
2011-12-08 17:05:01 +13:00
compileInputs in MultiJvm <<= ( compileInputs in MultiJvm ) dependsOn ( ScalariformKeys . format in MultiJvm ) ,
2012-08-30 13:16:36 +02:00
compile in MultiJvm <<= ( compile in MultiJvm ) triggeredBy ( compile in Test ) ,
2012-06-07 13:32:12 +02:00
ScalariformKeys . preferences in MultiJvm : = formattingPreferences ) ++
2012-10-01 14:38:46 +02:00
Option ( System . getProperty ( "akka.test.multi-node.hostsFileName" ) ) . map ( x => Seq ( multiNodeHostsFileName in MultiJvm : = x ) ) . getOrElse ( Seq . empty ) ++
2012-08-30 16:16:29 +02:00
Option ( System . getProperty ( "akka.test.multi-node.java" ) ) . map ( x => Seq ( multiNodeJavaName in MultiJvm : = x ) ) . getOrElse ( Seq . empty ) ++
2012-10-01 14:38:46 +02:00
Option ( System . getProperty ( "akka.test.multi-node.targetDirName" ) ) . map ( x => Seq ( multiNodeTargetDirName in MultiJvm : = x ) ) . getOrElse ( Seq . empty ) ++
2012-06-07 14:12:13 +02:00
( ( executeMultiJvmTests , multiNodeEnabled ) match {
case ( true , true ) =>
executeTests in Test <<= ( ( executeTests in Test ) , ( multiNodeExecuteTests in MultiJvm ) ) map {
case ( ( _ , testResults ) , ( _ , multiNodeResults ) ) =>
val results = testResults ++ multiNodeResults
( Tests . overall ( results . values ) , results )
}
case ( true , false ) =>
executeTests in Test <<= ( ( executeTests in Test ) , ( executeTests in MultiJvm ) ) map {
case ( ( _ , testResults ) , ( _ , multiNodeResults ) ) =>
val results = testResults ++ multiNodeResults
( Tests . overall ( results . values ) , results )
}
case ( false , _ ) => Seq . empty
} )
2012-05-25 10:02:35 +02:00
2013-01-30 14:46:23 +01:00
lazy val scaladocDiagramsEnabled = System . getProperty ( "akka.scaladoc.diagrams" , "true" ) . toBoolean
lazy val scaladocOptions = List ( "-implicits" ) : :: ( if ( scaladocDiagramsEnabled ) List ( " - diagrams " ) else Nil )
lazy val scaladocSettings : Seq [ sbt . Setting [ _ ] ] = {
Seq ( scalacOptions in ( Compile , doc ) ++= scaladocOptions ) ++
( if ( scaladocDiagramsEnabled )
Seq ( doc in Compile ~= scaladocVerifier )
else Seq . empty )
}
lazy val unidocScaladocSettings : Seq [ sbt . Setting [ _ ] ] = {
Seq ( scalacOptions in doc ++= scaladocOptions ) ++
( if ( scaladocDiagramsEnabled )
2013-03-18 11:44:54 +01:00
Seq ( sunidoc ~= scaladocVerifier )
2013-01-30 14:46:23 +01:00
else Seq . empty )
}
def scaladocVerifier ( file : File ) : File = {
@tailrec
def findHTMLFileWithDiagram ( dirs : Seq [ File ] ) : Boolean = {
if ( dirs . isEmpty ) false
else {
val curr = dirs . head
val ( newDirs , files ) = curr . listFiles . partition ( _ . isDirectory )
val rest = dirs . tail ++ newDirs
val hasDiagram = files exists { f =>
val name = f . getName
if ( name . endsWith ( ".html" ) && ! name . startsWith ( "index-" ) &&
! ( name . compare ( "index.html" ) == 0 ) && ! ( name . compare ( "package.html" ) == 0 ) ) {
val source = scala . io . Source . fromFile ( f )
val hd = source . getLines ( ) . exists ( _ . contains ( "<div class=\"toggleContainer block diagram-container\" id=\"inheritance-diagram-container\">" ) )
source . close ( )
hd
}
else false
}
hasDiagram || findHTMLFileWithDiagram ( rest )
}
}
// if we have generated scaladoc and none of the files have a diagram then fail
if ( file . exists ( ) && ! findHTMLFileWithDiagram ( List ( file ) ) )
sys . error ( "ScalaDoc diagrams not generated!" )
else
file
}
2012-08-30 16:16:29 +02:00
2012-05-25 10:02:35 +02:00
lazy val mimaSettings = mimaDefaultSettings ++ Seq (
// MiMa
previousArtifact : = None
)
2013-08-27 16:17:22 +02:00
def akkaPreviousArtifact ( id : String , organization : String = "com.typesafe.akka" , version : String = "2.2.0" ,
crossVersion : String = "2.10" ) : Option [ sbt . ModuleID ] =
if ( enableMiMa ) {
val fullId = if ( crossVersion . isEmpty ) id else id + "_" + crossVersion
Some ( organization % fullId % version ) // the artifact to compare binary compatibility with
}
2012-07-27 13:15:51 +02:00
else None
2012-08-13 19:23:43 +02:00
2012-12-18 12:10:59 +01:00
def loadSystemProperties ( fileName : String ) : Unit = {
import scala.collection.JavaConverters._
val file = new File ( fileName )
if ( file . exists ( ) ) {
println ( "Loading system properties from file `" + fileName + "`" )
val in = new InputStreamReader ( new FileInputStream ( file ) , "UTF-8" )
val props = new Properties
props . load ( in )
in . close ( )
sys . props ++ props . asScala
}
}
2013-01-10 11:28:08 +01:00
def copyFile ( source : String , sink : String ) {
val src = new java . io . File ( source )
val dest = new java . io . File ( sink )
new java . io . FileOutputStream ( dest ) getChannel ( ) transferFrom (
new java . io . FileInputStream ( src ) getChannel , 0 , Long . MaxValue )
}
2012-08-13 19:23:43 +02:00
// OSGi settings
object OSGi {
2013-01-10 11:28:08 +01:00
//akka-actor is wrapped into akka-osgi to simplify OSGi deployement.
2012-08-13 19:23:43 +02:00
val agent = exports ( Seq ( "akka.agent.*" ) )
val camel = exports ( Seq ( "akka.camel.*" ) )
2013-05-29 16:47:20 +02:00
val cluster = exports ( Seq ( "akka.cluster.*" ) , imports = Seq ( scalabuffImport ( ) , protobufImport ( ) ) )
2012-08-13 19:23:43 +02:00
2012-09-17 13:47:23 +02:00
val fileMailbox = exports ( Seq ( "akka.actor.mailbox.filebased.*" ) )
2012-08-13 19:23:43 +02:00
2012-11-21 10:10:58 +01:00
val mailboxesCommon = exports ( Seq ( "akka.actor.mailbox.*" ) , imports = Seq ( protobufImport ( ) ) )
2012-08-13 19:23:43 +02:00
2013-01-10 11:28:08 +01:00
val osgi = osgiSettings ++ Seq (
2013-01-29 16:09:41 +01:00
OsgiKeys . exportPackage : = Seq ( "akka*" ) , //exporting akka packages enforces bnd to aggregate akka-actor packages in the bundle
2013-01-10 11:28:08 +01:00
OsgiKeys . privatePackage : = Seq ( "akka.osgi.impl" ) ,
2013-01-29 16:09:41 +01:00
//akka-actor packages are not imported, as contained in the CP
OsgiKeys . importPackage : = ( osgiOptionalImports map optionalResolution ) ++ Seq ( "!sun.misc" , scalaImport ( ) , configImport ( ) , "*" )
2013-01-10 11:28:08 +01:00
)
2012-08-13 19:23:43 +02:00
2013-02-06 15:54:58 +01:00
val osgiDiningHakkersSampleApi = exports ( Seq ( "akka.sample.osgi.api" ) )
val osgiDiningHakkersSampleCommand = osgiSettings ++ Seq ( OsgiKeys . bundleActivator : = Option ( "akka.sample.osgi.command.Activator" ) , OsgiKeys . privatePackage : = Seq ( "akka.sample.osgi.command" ) )
val osgiDiningHakkersSampleCore = exports ( Seq ( "" ) ) ++ Seq ( OsgiKeys . bundleActivator : = Option ( "akka.sample.osgi.activation.Activator" ) , OsgiKeys . privatePackage : = Seq ( "akka.sample.osgi.internal" , "akka.sample.osgi.activation" , "akka.sample.osgi.service" ) )
val osgiDiningHakkersSampleUncommons = exports ( Seq ( "org.uncommons.maths.random" ) ) ++ Seq ( OsgiKeys . privatePackage : = Seq ( "org.uncommons.maths.binary" , "org.uncommons.maths" , "org.uncommons.maths.number" ) )
2013-05-29 16:47:20 +02:00
val osgiDiningHakkersSampleScalaBuff = exports ( Seq ( "net.sandrogrzicic.scalabuff" ) )
2012-08-13 19:23:43 +02:00
val osgiAries = exports ( ) ++ Seq ( OsgiKeys . privatePackage : = Seq ( "akka.osgi.aries.*" ) )
2012-11-21 10:10:58 +01:00
val remote = exports ( Seq ( "akka.remote.*" ) , imports = Seq ( protobufImport ( ) ) )
2012-08-13 19:23:43 +02:00
val slf4j = exports ( Seq ( "akka.event.slf4j.*" ) )
val dataflow = exports ( Seq ( "akka.dataflow.*" ) )
val transactor = exports ( Seq ( "akka.transactor.*" ) )
2013-09-14 14:19:18 +02:00
val persistence = exports ( Seq ( "akka.persistence.*" ) )
2012-11-21 20:22:10 +01:00
val testkit = exports ( Seq ( "akka.testkit.*" ) )
2012-11-21 10:10:58 +01:00
val zeroMQ = exports ( Seq ( "akka.zeromq.*" ) , imports = Seq ( protobufImport ( ) ) )
2012-08-13 19:23:43 +02:00
2013-01-10 11:28:08 +01:00
val osgiOptionalImports = Seq ( "akka.remote" ,
"akka.remote.transport.netty" ,
"akka.remote.security.provider" ,
"akka.remote.netty" ,
"akka.remote.routing" ,
"akka.remote.transport" ,
"akka.remote.serialization" ,
"akka.cluster" ,
"akka.cluster.routing" ,
2013-05-29 16:47:20 +02:00
"akka.cluster.protobuf" ,
2013-01-10 11:28:08 +01:00
"akka.transactor" ,
"akka.agent" ,
"akka.dataflow" ,
"akka.actor.mailbox" ,
"akka.camel.internal" ,
"akka.camel.javaapi" ,
"akka.camel" ,
"akka.camel.internal.component" ,
"akka.zeromq" ,
2013-05-29 16:47:20 +02:00
"com.google.protobuf" ,
"net.sandrogrzicic.scalabuff" )
2013-01-10 11:28:08 +01:00
2012-11-21 10:10:58 +01:00
def exports ( packages : Seq [ String ] = Seq ( ) , imports : Seq [ String ] = Nil ) = osgiSettings ++ Seq (
OsgiKeys . importPackage : = imports ++ defaultImports ,
2012-09-15 07:24:24 +02:00
OsgiKeys . exportPackage : = packages
2012-08-13 19:23:43 +02:00
)
def defaultImports = Seq ( "!sun.misc" , akkaImport ( ) , configImport ( ) , scalaImport ( ) , "*" )
2013-01-10 11:28:08 +01:00
def akkaImport ( packageName : String = "akka.*" ) = "%s;version=\"[2.2,2.3)\"" . format ( packageName )
2012-10-18 15:36:25 +02:00
def configImport ( packageName : String = "com.typesafe.config.*" ) = "%s;version=\"[0.4.1,1.1.0)\"" . format ( packageName )
2013-09-11 12:52:52 +02:00
def protobufImport ( packageName : String = "com.google.protobuf.*" ) = "%s;version=\"[2.5.0,2.6.0)\"" . format ( packageName )
def scalabuffImport ( packageName : String = "net.sandrogrzicic.scalabuff.*" ) = "%s;version=\"[1.3.6,1.4.0)\"" . format ( packageName )
2012-08-13 19:23:43 +02:00
def scalaImport ( packageName : String = "scala.*" ) = "%s;version=\"[2.10,2.11)\"" . format ( packageName )
2013-01-10 11:28:08 +01:00
def optionalResolution ( packageName : String ) = "%s;resolution:=optional" . format ( packageName )
2012-08-13 19:23:43 +02:00
}
2011-07-04 19:16:43 +12:00
}
// Dependencies
object Dependencies {
2012-10-15 14:04:20 +02:00
object Compile {
// Compile
2013-01-28 02:01:02 +01:00
val camelCore = "org.apache.camel" % "camel-core" % "2.10.3" exclude ( "org.slf4j" , "slf4j-api" ) // ApacheV2
2012-10-15 14:04:20 +02:00
2013-07-09 08:17:51 +02:00
val config = "com.typesafe" % "config" % "1.0.2" // ApacheV2
2013-05-17 12:14:21 +02:00
val netty = "io.netty" % "netty" % "3.6.6.Final" // ApacheV2
2013-09-11 12:52:52 +02:00
val protobuf = "com.google.protobuf" % "protobuf-java" % "2.5.0" // New BSD
2012-12-22 09:25:31 +01:00
val scalaStm = "org.scala-stm" %% "scala-stm" % "0.7" // Modified BSD (Scala)
2013-05-29 16:47:20 +02:00
val scalaBuffRuntime = "net.sandrogrzicic" %% "scalabuff-runtime" % "1.2.0" // ApacheV2
2012-10-15 14:04:20 +02:00
val slf4jApi = "org.slf4j" % "slf4j-api" % "1.7.2" // MIT
2012-12-22 09:25:31 +01:00
val zeroMQClient = "org.zeromq" %% "zeromq-scala-binding" % "0.0.7" // ApacheV2
2012-10-18 13:18:09 +02:00
val uncommonsMath = "org.uncommons.maths" % "uncommons-maths" % "1.2.2a" exclude ( "jfree" , "jcommon" ) exclude ( "jfree" , "jfreechart" ) // ApacheV2
2013-09-10 11:38:16 +02:00
val ariesBlueprint = "org.apache.aries.blueprint" % "org.apache.aries.blueprint" % "1.1.0" // ApacheV2
2012-10-15 14:04:20 +02:00
val osgiCore = "org.osgi" % "org.osgi.core" % "4.2.0" // ApacheV2
2013-01-10 11:28:08 +01:00
val osgiCompendium = "org.osgi" % "org.osgi.compendium" % "4.2.0" // ApacheV2
2013-09-14 14:19:18 +02:00
val levelDB = "org.iq80.leveldb" % "leveldb" % "0.5" // ApacheV2
2012-10-15 14:04:20 +02:00
// Camel Sample
2013-01-29 22:35:45 +01:00
val camelJetty = "org.apache.camel" % "camel-jetty" % camelCore . revision // ApacheV2
2012-10-15 14:04:20 +02:00
2012-11-08 18:49:54 +01:00
// Cluster Sample
2013-03-01 21:29:22 +01:00
val sigar = "org.fusesource" % "sigar" % "1.6.4" // ApacheV2
2012-11-08 18:49:54 +01:00
2013-03-06 09:44:34 +01:00
// Compiler plugins
2013-05-09 09:41:35 +02:00
val genjavadoc = compilerPlugin ( "com.typesafe.genjavadoc" %% "genjavadoc-plugin" % "0.5" cross CrossVersion . full ) // ApacheV2
2013-03-06 09:44:34 +01:00
2012-10-15 14:04:20 +02:00
// Test
object Test {
2013-01-25 14:24:23 +13:00
val commonsMath = "org.apache.commons" % "commons-math" % "2.1" % "test" // ApacheV2
val commonsIo = "commons-io" % "commons-io" % "2.0.1" % "test" // ApacheV2
val commonsCodec = "commons-codec" % "commons-codec" % "1.7" % "test" // ApacheV2
val junit = "junit" % "junit" % "4.10" % "test" // Common Public License 1.0
val logback = "ch.qos.logback" % "logback-classic" % "1.0.7" % "test" // EPL 1.0 / LGPL 2.1
val mockito = "org.mockito" % "mockito-all" % "1.8.1" % "test" // MIT
2012-12-22 09:25:31 +01:00
// changing the scalatest dependency must be reflected in akka-docs/rst/dev/multi-jvm-testing.rst
2013-08-19 12:06:17 +02:00
val scalatest = "org.scalatest" %% "scalatest" % "1.9.2-SNAP2" % "test" // ApacheV2
2013-01-25 14:24:23 +13:00
val scalacheck = "org.scalacheck" %% "scalacheck" % "1.10.0" % "test" // New BSD
2013-09-10 11:38:16 +02:00
val ariesProxy = "org.apache.aries.proxy" % "org.apache.aries.proxy.impl" % "1.0.1" % "test" // ApacheV2
2013-01-25 14:24:23 +13:00
val pojosr = "com.googlecode.pojosr" % "de.kalpatec.pojosr.framework" % "0.1.4" % "test" // ApacheV2
val tinybundles = "org.ops4j.pax.tinybundles" % "tinybundles" % "1.0.0" % "test" // ApacheV2
val log4j = "log4j" % "log4j" % "1.2.14" % "test" // ApacheV2
val junitIntf = "com.novocode" % "junit-interface" % "0.8" % "test" // MIT
2012-10-15 14:04:20 +02:00
}
}
import Compile._
2011-07-04 19:16:43 +12:00
2012-06-28 15:33:49 +02:00
val actor = Seq ( config )
2012-05-29 02:13:25 +02:00
2012-09-12 15:12:13 +02:00
val testkit = Seq ( Test . junit , Test . scalatest )
2011-07-04 19:16:43 +12:00
2013-05-28 10:39:38 +02:00
val actorTests = Seq ( Test . junit , Test . scalatest , Test . commonsCodec , Test . commonsMath , Test . mockito , Test . scalacheck , protobuf , Test . junitIntf )
2011-07-04 19:16:43 +12:00
2012-06-20 11:28:40 +02:00
val remote = Seq ( netty , protobuf , uncommonsMath , Test . junit , Test . scalatest )
2011-07-04 19:16:43 +12:00
2012-09-12 15:12:13 +02:00
val remoteTests = Seq ( Test . junit , Test . scalatest )
2012-09-06 15:35:59 +02:00
2012-04-24 10:19:36 +02:00
val cluster = Seq ( Test . junit , Test . scalatest )
2012-01-16 14:31:41 +01:00
2012-02-07 11:21:49 +01:00
val slf4j = Seq ( slf4jApi , Test . logback )
2011-07-04 19:16:43 +12:00
2012-07-27 19:17:06 +02:00
val agent = Seq ( scalaStm , Test . scalatest , Test . junit )
2011-12-19 15:46:06 +13:00
2012-07-27 19:17:06 +02:00
val transactor = Seq ( scalaStm , Test . scalatest , Test . junit )
2011-12-21 13:40:32 +13:00
2013-09-14 14:19:18 +02:00
val persistence = Seq ( levelDB , Test . scalatest , Test . junit , Test . commonsIo )
2011-11-01 09:45:57 +01:00
val mailboxes = Seq ( Test . scalatest , Test . junit )
2011-11-25 11:01:03 +01:00
2012-05-08 15:07:05 +02:00
val fileMailbox = Seq ( Test . commonsIo , Test . scalatest , Test . junit )
2011-07-04 19:16:43 +12:00
2012-05-18 16:46:31 +02:00
val kernel = Seq ( Test . scalatest , Test . junit )
2011-07-16 10:38:17 +02:00
2013-05-08 09:42:25 +02:00
val camel = Seq ( camelCore , Test . scalatest , Test . junit , Test . mockito , Test . logback , Test . commonsIo , Test . junitIntf )
2012-01-19 14:38:44 +00:00
2012-09-28 00:31:27 +02:00
val camelSample = Seq ( camelJetty )
2012-08-09 19:30:32 +02:00
2013-01-10 11:28:08 +01:00
val osgi = Seq ( osgiCore , osgiCompendium , Test . logback , Test . commonsIo , Test . pojosr , Test . tinybundles , Test . scalatest , Test . junit )
2012-06-26 22:07:57 +02:00
2013-02-06 15:54:58 +01:00
val osgiDiningHakkerSampleCore = Seq ( config , osgiCore , osgiCompendium )
val osgiDiningHakkerSampleCommand = Seq ( osgiCore , osgiCompendium )
val uncommons = Seq ( uncommonsMath )
2013-05-29 16:47:20 +02:00
val scalaBuff = Seq ( scalaBuffRuntime )
2013-02-06 15:54:58 +01:00
val osgiAries = Seq ( osgiCore , osgiCompendium , ariesBlueprint , Test . ariesProxy )
2012-05-29 12:41:09 +02:00
2012-07-21 18:09:20 +02:00
val docs = Seq ( Test . scalatest , Test . junit , Test . junitIntf )
2012-01-14 03:16:39 +01:00
2012-07-27 13:15:51 +02:00
val zeroMQ = Seq ( protobuf , zeroMQClient , Test . scalatest , Test . junit )
2012-09-21 11:47:50 +02:00
2012-11-08 18:49:54 +01:00
val clusterSample = Seq ( Test . scalatest , sigar )
2012-09-22 09:16:05 +02:00
2012-09-27 15:57:46 +02:00
val contrib = Seq ( Test . junitIntf )
2012-09-20 21:50:35 +02:00
val multiNodeSample = Seq ( Test . scalatest )
2011-07-04 19:16:43 +12:00
}