2010-11-05 16:11:34 +13:00
|
|
|
/**
|
2010-12-22 15:35:50 +01:00
|
|
|
* Copyright (C) 2009-2011 Scalable Solutions AB <http://scalablesolutions.se>
|
2010-11-05 16:11:34 +13:00
|
|
|
*/
|
2010-03-07 08:14:48 +01:00
|
|
|
|
2010-07-20 11:26:34 +02:00
|
|
|
import com.weiglewilczek.bnd4sbt.BNDPlugin
|
|
|
|
|
import java.io.File
|
2010-03-09 22:07:14 +01:00
|
|
|
import java.util.jar.Attributes
|
2010-03-30 18:56:34 +02:00
|
|
|
import java.util.jar.Attributes.Name._
|
2010-07-20 11:26:34 +02:00
|
|
|
import sbt._
|
|
|
|
|
import sbt.CompileOrder._
|
|
|
|
|
import spde._
|
2010-06-07 15:59:47 +02:00
|
|
|
|
2011-05-09 21:26:17 +12:00
|
|
|
class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with ExecProject with DocParentProject { akkaParent =>
|
2010-03-30 18:56:34 +02:00
|
|
|
|
2010-07-20 08:39:18 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// Compile settings
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2010-07-20 12:01:02 +02:00
|
|
|
|
2011-02-01 17:46:45 +13:00
|
|
|
val scalaCompileSettings =
|
2010-06-01 18:41:39 +02:00
|
|
|
Seq("-deprecation",
|
2011-04-08 16:05:03 +02:00
|
|
|
//"-Xmigration",
|
2011-05-20 22:25:46 +02:00
|
|
|
//"-optimise",
|
2010-05-25 12:24:15 +02:00
|
|
|
"-encoding", "utf8")
|
2011-02-01 17:46:45 +13:00
|
|
|
|
|
|
|
|
val javaCompileSettings = Seq("-Xlint:unchecked")
|
|
|
|
|
|
2010-05-28 20:24:00 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2010-07-31 12:37:08 +02:00
|
|
|
// All repositories *must* go here! See ModuleConigurations below.
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
object Repositories {
|
2011-03-22 16:30:49 +01:00
|
|
|
lazy val AkkaRepo = MavenRepository("Akka Repository", "http://akka.io/repository")
|
|
|
|
|
lazy val CodehausRepo = MavenRepository("Codehaus Repo", "http://repository.codehaus.org")
|
|
|
|
|
lazy val GuiceyFruitRepo = MavenRepository("GuiceyFruit Repo", "http://guiceyfruit.googlecode.com/svn/repo/releases/")
|
|
|
|
|
lazy val JBossRepo = MavenRepository("JBoss Repo", "http://repository.jboss.org/nexus/content/groups/public/")
|
|
|
|
|
lazy val JavaNetRepo = MavenRepository("java.net Repo", "http://download.java.net/maven/2")
|
|
|
|
|
lazy val SonatypeSnapshotRepo = MavenRepository("Sonatype OSS Repo", "http://oss.sonatype.org/content/repositories/releases")
|
|
|
|
|
lazy val GlassfishRepo = MavenRepository("Glassfish Repo", "http://download.java.net/maven/glassfish")
|
|
|
|
|
lazy val ScalaToolsRelRepo = MavenRepository("Scala Tools Releases Repo", "http://scala-tools.org/repo-releases")
|
|
|
|
|
lazy val DatabinderRepo = MavenRepository("Databinder Repo", "http://databinder.net/repo")
|
2011-02-26 13:18:19 +05:30
|
|
|
lazy val ScalaToolsSnapshotRepo = MavenRepository("Scala-Tools Snapshot Repo", "http://scala-tools.org/repo-snapshots")
|
2011-05-17 14:48:06 +02:00
|
|
|
lazy val SunJDMKRepo = MavenRepository("WP5 Repository", "http://wp5.e-taxonomy.eu/cdmlib/mavenrepo")
|
2010-07-31 12:37:08 +02:00
|
|
|
}
|
2010-07-20 08:39:18 +02:00
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// ModuleConfigurations
|
2010-05-28 20:24:00 +02:00
|
|
|
// Every dependency that cannot be resolved from the built-in repositories (Maven Central and Scala Tools Releases)
|
|
|
|
|
// must be resolved from a ModuleConfiguration. This will result in a significant acceleration of the update action.
|
2010-05-29 07:28:42 +02:00
|
|
|
// Therefore, if repositories are defined, this must happen as def, not as val.
|
2010-05-28 20:24:00 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2010-07-20 12:01:02 +02:00
|
|
|
|
2010-07-31 12:37:08 +02:00
|
|
|
import Repositories._
|
2010-08-31 16:43:47 +02:00
|
|
|
lazy val jettyModuleConfig = ModuleConfiguration("org.eclipse.jetty", sbt.DefaultMavenRepository)
|
2010-08-09 10:42:00 +02:00
|
|
|
lazy val guiceyFruitModuleConfig = ModuleConfiguration("org.guiceyfruit", GuiceyFruitRepo)
|
2010-11-23 15:59:37 +01:00
|
|
|
lazy val glassfishModuleConfig = ModuleConfiguration("org.glassfish", GlassfishRepo)
|
2010-08-09 10:42:00 +02:00
|
|
|
lazy val jbossModuleConfig = ModuleConfiguration("org.jboss", JBossRepo)
|
|
|
|
|
lazy val jerseyModuleConfig = ModuleConfiguration("com.sun.jersey", JavaNetRepo)
|
2010-08-21 21:17:54 +12:00
|
|
|
lazy val multiverseModuleConfig = ModuleConfiguration("org.multiverse", CodehausRepo)
|
2010-08-09 10:42:00 +02:00
|
|
|
lazy val nettyModuleConfig = ModuleConfiguration("org.jboss.netty", JBossRepo)
|
2011-05-05 11:02:41 +12:00
|
|
|
lazy val scalaTestModuleConfig = ModuleConfiguration("org.scalatest", ScalaToolsRelRepo)
|
2010-11-25 15:08:04 +01:00
|
|
|
lazy val spdeModuleConfig = ModuleConfiguration("us.technically.spde", DatabinderRepo)
|
|
|
|
|
lazy val processingModuleConfig = ModuleConfiguration("org.processing", DatabinderRepo)
|
2011-03-08 15:33:39 +01:00
|
|
|
lazy val sjsonModuleConfig = ModuleConfiguration("net.debasishg", ScalaToolsRelRepo)
|
2011-05-17 14:48:06 +02:00
|
|
|
lazy val redisModuleConfig = ModuleConfiguration("net.debasishg", ScalaToolsRelRepo)
|
|
|
|
|
lazy val beanstalkModuleConfig = ModuleConfiguration("beanstalk", AkkaRepo)
|
2011-03-08 16:13:09 +01:00
|
|
|
lazy val lzfModuleConfig = ModuleConfiguration("voldemort.store.compress", "h2-lzf", AkkaRepo)
|
|
|
|
|
lazy val vscaladocModuleConfig = ModuleConfiguration("org.scala-tools", "vscaladoc", "1.1-md-3", AkkaRepo)
|
|
|
|
|
lazy val aspectWerkzModuleConfig = ModuleConfiguration("org.codehaus.aspectwerkz", "aspectwerkz", "2.2.3", AkkaRepo)
|
2011-04-04 08:50:20 +12:00
|
|
|
lazy val objenesisModuleConfig = ModuleConfiguration("org.objenesis", sbt.DefaultMavenRepository)
|
2011-05-17 09:56:49 +02:00
|
|
|
lazy val jdmkModuleConfig = ModuleConfiguration("com.sun.jdmk", SunJDMKRepo)
|
|
|
|
|
lazy val jmxModuleConfig = ModuleConfiguration("com.sun.jmx", SunJDMKRepo)
|
|
|
|
|
lazy val jmsModuleConfig = ModuleConfiguration("javax.jms", JBossRepo)
|
2011-05-17 13:21:28 +02:00
|
|
|
lazy val jsr311ModuleConfig = ModuleConfiguration("javax.ws.rs", "jsr311-api", sbt.DefaultMavenRepository)
|
2011-05-18 18:08:20 +12:00
|
|
|
lazy val zookeeperModuleConfig = ModuleConfiguration("org.apache.hadoop.zookeeper", AkkaRepo)
|
|
|
|
|
lazy val zkclientModuleConfig = ModuleConfiguration("zkclient", AkkaRepo)
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2010-07-20 08:39:18 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// Versions
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2010-07-20 12:01:02 +02:00
|
|
|
|
2011-05-11 12:28:19 +02:00
|
|
|
lazy val JACKSON_VERSION = "1.8.0"
|
2010-09-22 22:14:07 +02:00
|
|
|
lazy val JERSEY_VERSION = "1.3"
|
2011-02-16 11:19:15 +13:00
|
|
|
lazy val MULTIVERSE_VERSION = "0.6.2"
|
2011-05-13 02:41:28 +12:00
|
|
|
lazy val SCALATEST_VERSION = "1.4.1"
|
2011-04-24 11:24:29 -06:00
|
|
|
lazy val JETTY_VERSION = "7.4.0.v20110414"
|
2010-11-21 07:21:17 -08:00
|
|
|
lazy val JAVAX_SERVLET_VERSION = "3.0"
|
2011-03-22 16:30:49 +01:00
|
|
|
lazy val SLF4J_VERSION = "1.6.0"
|
2011-04-26 14:00:18 +02:00
|
|
|
lazy val ZOOKEEPER_VERSION = "3.4.0"
|
2010-11-24 21:05:12 +01:00
|
|
|
|
2010-07-20 08:39:18 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// Dependencies
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2010-07-20 12:01:02 +02:00
|
|
|
|
2010-07-20 08:39:18 +02:00
|
|
|
object Dependencies {
|
|
|
|
|
|
|
|
|
|
// Compile
|
2011-05-17 14:48:06 +02:00
|
|
|
lazy val aopalliance = "aopalliance" % "aopalliance" % "1.0" % "compile" //Public domain
|
|
|
|
|
lazy val aspectwerkz = "org.codehaus.aspectwerkz" % "aspectwerkz" % "2.2.3" % "compile" //ApacheV2
|
|
|
|
|
lazy val beanstalk = "beanstalk" % "beanstalk_client" % "1.4.5" //New BSD
|
|
|
|
|
lazy val bookkeeper = "org.apache.hadoop.zookeeper" % "bookkeeper" % ZOOKEEPER_VERSION //ApacheV2
|
|
|
|
|
lazy val commons_codec = "commons-codec" % "commons-codec" % "1.4" % "compile" //ApacheV2
|
|
|
|
|
lazy val commons_io = "commons-io" % "commons-io" % "2.0.1" % "compile" //ApacheV2
|
|
|
|
|
lazy val javax_servlet_30 = "org.glassfish" % "javax.servlet" % JAVAX_SERVLET_VERSION % "provided" //CDDL v1
|
|
|
|
|
lazy val jetty = "org.eclipse.jetty" % "jetty-server" % JETTY_VERSION % "provided" //Eclipse license
|
|
|
|
|
lazy val guicey = "org.guiceyfruit" % "guice-all" % "2.0" % "compile" //ApacheV2
|
|
|
|
|
lazy val h2_lzf = "voldemort.store.compress" % "h2-lzf" % "1.0" % "compile" //ApacheV2
|
|
|
|
|
lazy val jackson = "org.codehaus.jackson" % "jackson-mapper-asl" % JACKSON_VERSION % "compile" //ApacheV2
|
|
|
|
|
lazy val jackson_core = "org.codehaus.jackson" % "jackson-core-asl" % JACKSON_VERSION % "compile" //ApacheV2
|
|
|
|
|
lazy val jersey_server = "com.sun.jersey" % "jersey-server" % JERSEY_VERSION % "provided" //CDDL v1
|
|
|
|
|
lazy val jsr250 = "javax.annotation" % "jsr250-api" % "1.0" % "compile" //CDDL v1
|
|
|
|
|
lazy val jsr311 = "javax.ws.rs" % "jsr311-api" % "1.1" % "compile" //CDDL v1
|
|
|
|
|
lazy val multiverse = "org.multiverse" % "multiverse-alpha" % MULTIVERSE_VERSION % "compile" //ApacheV2
|
|
|
|
|
lazy val netty = "org.jboss.netty" % "netty" % "3.2.4.Final" % "compile" //ApacheV2
|
|
|
|
|
lazy val osgi_core = "org.osgi" % "org.osgi.core" % "4.2.0" //ApacheV2
|
|
|
|
|
lazy val protobuf = "com.google.protobuf" % "protobuf-java" % "2.3.0" % "compile" //New BSD
|
|
|
|
|
lazy val redis = "net.debasishg" % "redisclient_2.9.0" % "2.3.1" //ApacheV2
|
|
|
|
|
lazy val sjson = "net.debasishg" %% "sjson" % "0.11" % "compile" //ApacheV2
|
|
|
|
|
lazy val sjson_test = "net.debasishg" %% "sjson" % "0.11" % "test" //ApacheV2
|
|
|
|
|
lazy val slf4j = "org.slf4j" % "slf4j-api" % SLF4J_VERSION // MIT
|
|
|
|
|
lazy val logback = "ch.qos.logback" % "logback-classic" % "0.9.28" % "runtime" //MIT
|
|
|
|
|
lazy val log4j = "log4j" % "log4j" % "1.2.15" //ApacheV2
|
|
|
|
|
lazy val zookeeper = "org.apache.hadoop.zookeeper" % "zookeeper" % ZOOKEEPER_VERSION //ApacheV2
|
|
|
|
|
lazy val zookeeper_lock = "org.apache.hadoop.zookeeper" % "zookeeper-recipes-lock" % ZOOKEEPER_VERSION //ApacheV2
|
|
|
|
|
lazy val zkClient = "zkclient" % "zkclient" % "0.2" //ApacheV2
|
2011-04-26 14:00:18 +02:00
|
|
|
|
2010-07-20 08:39:18 +02:00
|
|
|
// Test
|
2011-05-17 14:48:06 +02:00
|
|
|
lazy val multiverse_test = "org.multiverse" % "multiverse-alpha" % MULTIVERSE_VERSION % "test" //ApacheV2
|
|
|
|
|
lazy val commons_coll = "commons-collections" % "commons-collections" % "3.2.1" % "test" //ApacheV2
|
|
|
|
|
lazy val testJetty = "org.eclipse.jetty" % "jetty-server" % JETTY_VERSION % "test" //Eclipse license
|
|
|
|
|
lazy val testJettyWebApp = "org.eclipse.jetty" % "jetty-webapp" % JETTY_VERSION % "test" //Eclipse license
|
|
|
|
|
lazy val junit = "junit" % "junit" % "4.5" % "test" //Common Public License 1.0
|
|
|
|
|
lazy val mockito = "org.mockito" % "mockito-all" % "1.8.1" % "test" //MIT
|
|
|
|
|
lazy val scalatest = "org.scalatest" %% "scalatest" % SCALATEST_VERSION % "test" //ApacheV2
|
2010-07-20 08:39:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// Subprojects
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2010-07-20 12:01:02 +02:00
|
|
|
|
2011-05-17 14:48:06 +02:00
|
|
|
lazy val akka_actor = project("akka-actor", "akka-actor", new AkkaActorProject(_))
|
|
|
|
|
lazy val akka_testkit = project("akka-testkit", "akka-testkit", new AkkaTestkitProject(_), akka_actor)
|
|
|
|
|
lazy val akka_actor_tests = project("akka-actor-tests", "akka-actor-tests", new AkkaActorTestsProject(_), akka_testkit)
|
|
|
|
|
lazy val akka_stm = project("akka-stm", "akka-stm", new AkkaStmProject(_), akka_actor)
|
2011-05-19 14:29:21 +02:00
|
|
|
lazy val akka_remote = project("akka-remote", "akka-remote", new AkkaRemoteProject(_), akka_stm, akka_actor_tests)
|
2011-05-17 14:48:06 +02:00
|
|
|
lazy val akka_cluster = project("akka-cluster", "akka-cluster", new AkkaClusterProject(_), akka_remote)
|
|
|
|
|
lazy val akka_durable_mailboxes = project("akka-durable-mailboxes", "akka-durable-mailboxes", new AkkaDurableMailboxesParentProject(_), akka_remote)
|
2011-04-26 14:00:18 +02:00
|
|
|
|
2011-05-17 14:48:06 +02:00
|
|
|
lazy val akka_http = project("akka-http", "akka-http", new AkkaHttpProject(_), akka_actor)
|
|
|
|
|
lazy val akka_slf4j = project("akka-slf4j", "akka-slf4j", new AkkaSlf4jProject(_), akka_actor)
|
|
|
|
|
lazy val akka_tutorials = project("akka-tutorials", "akka-tutorials", new AkkaTutorialsParentProject(_), akka_actor)
|
|
|
|
|
lazy val akka_samples = project("akka-samples", "akka-samples", new AkkaSamplesParentProject(_))
|
2010-03-09 22:07:14 +01:00
|
|
|
|
2010-07-20 12:01:02 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// Miscellaneous
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2011-04-07 13:41:27 +12:00
|
|
|
|
2010-11-22 13:14:10 +13:00
|
|
|
override def disableCrossPaths = true
|
2010-07-20 12:01:02 +02:00
|
|
|
|
2011-05-06 08:12:20 +12:00
|
|
|
// add the sh action since it doesn't exist in ParentProject
|
|
|
|
|
lazy val sh = task { args => execOut { Process("sh" :: "-c" :: args.mkString(" ") :: Nil) } }
|
|
|
|
|
|
2011-05-05 14:51:36 +12:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// Scaladocs
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
2011-05-10 12:32:38 +12:00
|
|
|
override def apiProjectDependencies = dependencies.toList - akka_samples
|
2010-08-06 16:03:36 +02:00
|
|
|
|
2011-05-05 14:51:36 +12:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2011-04-07 13:41:27 +12:00
|
|
|
// Publishing
|
2011-05-05 14:51:36 +12:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2011-02-08 12:36:47 +13:00
|
|
|
|
2011-04-07 13:41:27 +12:00
|
|
|
override def managedStyle = ManagedStyle.Maven
|
2011-02-08 12:36:47 +13:00
|
|
|
|
2011-05-17 14:48:06 +02:00
|
|
|
lazy val akkaPublishRepository = systemOptional[String]("akka.publish.repository", "default")
|
2011-04-07 13:41:27 +12:00
|
|
|
lazy val akkaPublishCredentials = systemOptional[String]("akka.publish.credentials", "none")
|
2011-02-08 16:15:39 +13:00
|
|
|
|
2011-04-07 13:41:27 +12:00
|
|
|
if (akkaPublishCredentials.value != "none") Credentials(akkaPublishCredentials.value, log)
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2011-04-07 13:41:27 +12:00
|
|
|
def publishToRepository = {
|
|
|
|
|
val repoUrl = akkaPublishRepository.value
|
|
|
|
|
if (repoUrl != "default") Resolver.url("Akka Publish Repository", new java.net.URL(repoUrl))
|
|
|
|
|
else Resolver.file("Local Maven Repository", Path.userHome / ".m2" / "repository" asFile)
|
|
|
|
|
}
|
2010-04-01 23:02:13 +02:00
|
|
|
|
2011-04-07 13:41:27 +12:00
|
|
|
val publishTo = publishToRepository
|
2010-04-01 23:02:13 +02:00
|
|
|
|
2011-04-07 13:41:27 +12:00
|
|
|
override def pomExtra = {
|
2010-04-01 23:02:13 +02:00
|
|
|
<inceptionYear>2009</inceptionYear>
|
2010-11-21 13:31:07 +01:00
|
|
|
<url>http://akka.io</url>
|
2010-04-01 23:02:13 +02:00
|
|
|
<organization>
|
|
|
|
|
<name>Scalable Solutions AB</name>
|
|
|
|
|
<url>http://scalablesolutions.se</url>
|
|
|
|
|
</organization>
|
|
|
|
|
<licenses>
|
|
|
|
|
<license>
|
|
|
|
|
<name>Apache 2</name>
|
|
|
|
|
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
|
|
|
|
<distribution>repo</distribution>
|
|
|
|
|
</license>
|
|
|
|
|
</licenses>
|
2011-04-07 13:41:27 +12:00
|
|
|
}
|
2010-06-01 18:41:39 +02:00
|
|
|
|
2011-04-07 13:41:27 +12:00
|
|
|
override def artifacts = Set(Artifact(artifactID, "pom", "pom"))
|
2010-08-24 23:21:28 +02:00
|
|
|
|
2011-05-09 21:47:36 +12:00
|
|
|
override def deliverProjectDependencies = (super.deliverProjectDependencies.toList
|
|
|
|
|
- akka_samples.projectID
|
|
|
|
|
- akka_tutorials.projectID
|
|
|
|
|
- akkaDist.projectID)
|
2011-01-21 16:29:26 +13:00
|
|
|
|
2011-05-05 14:51:36 +12:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2011-01-21 16:29:26 +13:00
|
|
|
// Build release
|
2011-05-05 14:51:36 +12:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2011-01-21 16:29:26 +13:00
|
|
|
|
|
|
|
|
val localReleasePath = outputPath / "release" / version.toString
|
|
|
|
|
val localReleaseRepository = Resolver.file("Local Release", localReleasePath / "repository" asFile)
|
|
|
|
|
|
|
|
|
|
override def otherRepositories = super.otherRepositories ++ Seq(localReleaseRepository)
|
|
|
|
|
|
|
|
|
|
lazy val publishRelease = {
|
|
|
|
|
val releaseConfiguration = new DefaultPublishConfiguration(localReleaseRepository, "release", false)
|
|
|
|
|
publishTask(publishIvyModule, releaseConfiguration) dependsOn (deliver, publishLocal, makePom)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lazy val buildRelease = task {
|
2011-05-10 12:32:38 +12:00
|
|
|
log.info("Built release.")
|
|
|
|
|
None
|
2011-05-10 18:49:33 +12:00
|
|
|
} dependsOn (publishRelease, releaseApi, releaseDocs, releaseDownloads, releaseDist)
|
2011-05-10 12:32:38 +12:00
|
|
|
|
|
|
|
|
lazy val releaseApi = task {
|
|
|
|
|
val apiSources = ((apiOutputPath ##) ***)
|
|
|
|
|
val apiPath = localReleasePath / "api" / "akka" / version.toString
|
|
|
|
|
FileUtilities.copy(apiSources.get, apiPath, log).left.toOption
|
|
|
|
|
} dependsOn (api)
|
|
|
|
|
|
|
|
|
|
lazy val releaseDocs = task {
|
|
|
|
|
val docsBuildPath = docsPath / "_build"
|
|
|
|
|
val docsHtmlSources = ((docsBuildPath / "html" ##) ***)
|
|
|
|
|
val docsPdfSources = (docsBuildPath / "latex" ##) ** "*.pdf"
|
|
|
|
|
val docsOutputPath = localReleasePath / "docs" / "akka" / version.toString
|
|
|
|
|
FileUtilities.copy(docsHtmlSources.get, docsOutputPath, log).left.toOption orElse
|
|
|
|
|
FileUtilities.copy(docsPdfSources.get, docsOutputPath, log).left.toOption
|
|
|
|
|
} dependsOn (docs)
|
|
|
|
|
|
|
|
|
|
lazy val releaseDownloads = task {
|
2011-05-10 16:37:31 +12:00
|
|
|
val distArchives = akkaDist.akkaActorsDist.distArchive +++ akkaDist.akkaCoreDist.distArchive
|
2011-05-10 12:32:38 +12:00
|
|
|
val downloadsPath = localReleasePath / "downloads"
|
2011-05-10 16:37:31 +12:00
|
|
|
FileUtilities.copy(distArchives.get, downloadsPath, log).left.toOption
|
2011-05-10 12:32:38 +12:00
|
|
|
} dependsOn (dist)
|
|
|
|
|
|
2011-05-10 18:49:33 +12:00
|
|
|
lazy val releaseDist = task {
|
|
|
|
|
val distArchives = akkaDist.akkaActorsDist.distExclusiveArchive +++ akkaDist.akkaCoreDist.distExclusiveArchive
|
|
|
|
|
val distPath = localReleasePath / "dist"
|
|
|
|
|
FileUtilities.copy(distArchives.get, distPath, log).left.toOption
|
|
|
|
|
} dependsOn (dist)
|
|
|
|
|
|
2011-05-10 12:32:38 +12:00
|
|
|
lazy val dist = task { None } // dummy task
|
2011-01-21 16:29:26 +13:00
|
|
|
|
2010-08-24 23:21:28 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2010-08-28 16:48:27 +02:00
|
|
|
// akka-actor subproject
|
2010-08-24 23:21:28 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
2011-04-30 08:59:45 -06:00
|
|
|
class AkkaActorProject(info: ProjectInfo) extends AkkaDefaultProject(info) with OsgiProject with AutoCompilerPlugins {
|
2011-03-17 22:18:39 +01:00
|
|
|
override def bndExportPackage = super.bndExportPackage ++ Seq("com.eaio.*;version=3.2")
|
2011-05-03 21:29:32 -06:00
|
|
|
val cont = compilerPlugin("org.scala-lang.plugins" % "continuations" % buildScalaVersion)
|
2011-04-21 15:12:47 -06:00
|
|
|
override def compileOptions = super.compileOptions ++ compileOptions("-P:continuations:enable")
|
2010-11-05 16:11:34 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// akka-stm subproject
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
2011-04-27 17:06:37 +12:00
|
|
|
class AkkaStmProject(info: ProjectInfo) extends AkkaDefaultProject(info) {
|
2010-11-05 16:11:34 +13:00
|
|
|
val multiverse = Dependencies.multiverse
|
|
|
|
|
|
|
|
|
|
// testing
|
2010-12-22 15:35:50 +01:00
|
|
|
val junit = Dependencies.junit
|
|
|
|
|
val scalatest = Dependencies.scalatest
|
2010-08-24 23:21:28 +02:00
|
|
|
}
|
|
|
|
|
|
2010-07-31 12:37:08 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2010-08-28 16:48:27 +02:00
|
|
|
// akka-remote subproject
|
2010-07-31 12:37:08 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2010-07-20 12:01:02 +02:00
|
|
|
|
2011-04-27 17:06:37 +12:00
|
|
|
class AkkaRemoteProject(info: ProjectInfo) extends AkkaDefaultProject(info) {
|
2010-07-20 08:39:18 +02:00
|
|
|
val commons_codec = Dependencies.commons_codec
|
|
|
|
|
val commons_io = Dependencies.commons_io
|
2010-07-20 09:45:09 +02:00
|
|
|
val guicey = Dependencies.guicey
|
|
|
|
|
val h2_lzf = Dependencies.h2_lzf
|
2010-07-20 08:39:18 +02:00
|
|
|
val jackson = Dependencies.jackson
|
|
|
|
|
val jackson_core = Dependencies.jackson_core
|
2010-07-20 09:45:09 +02:00
|
|
|
val netty = Dependencies.netty
|
|
|
|
|
val protobuf = Dependencies.protobuf
|
|
|
|
|
val sjson = Dependencies.sjson
|
2010-06-01 18:41:39 +02:00
|
|
|
|
2010-05-06 20:59:04 +02:00
|
|
|
// testing
|
2010-07-20 08:39:18 +02:00
|
|
|
val junit = Dependencies.junit
|
2010-07-20 09:45:09 +02:00
|
|
|
val scalatest = Dependencies.scalatest
|
2010-08-03 16:13:19 +02:00
|
|
|
|
2011-03-28 14:13:58 +13:00
|
|
|
lazy val networkTestsEnabled = systemOptional[Boolean]("akka.test.network", false)
|
|
|
|
|
|
|
|
|
|
override def testOptions = super.testOptions ++ {
|
|
|
|
|
if (!networkTestsEnabled.value) Seq(TestFilter(test => !test.endsWith("NetworkTest")))
|
|
|
|
|
else Seq.empty
|
|
|
|
|
}
|
2010-03-02 00:34:14 -05:00
|
|
|
}
|
|
|
|
|
|
2011-04-26 14:00:18 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2011-04-28 20:12:37 +02:00
|
|
|
// akka-cluster sub project
|
2011-04-26 14:00:18 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
2011-05-16 12:32:00 +02:00
|
|
|
class AkkaClusterProject(info: ProjectInfo) extends AkkaDefaultProject(info) with MultiJvmTests {
|
2011-05-17 16:34:07 +02:00
|
|
|
val bookkeeper = Dependencies.bookkeeper
|
|
|
|
|
val zookeeper = Dependencies.zookeeper
|
2011-05-17 14:48:06 +02:00
|
|
|
val zookeeper_lock = Dependencies.zookeeper_lock
|
2011-05-17 16:34:07 +02:00
|
|
|
val zkClient = Dependencies.zkClient
|
|
|
|
|
val commons_io = Dependencies.commons_io
|
|
|
|
|
val log4j = Dependencies.log4j
|
2011-04-26 14:00:18 +02:00
|
|
|
|
|
|
|
|
// test dependencies
|
2011-05-17 16:34:07 +02:00
|
|
|
val scalatest = Dependencies.scalatest
|
|
|
|
|
val junit = Dependencies.junit
|
2011-04-26 14:00:18 +02:00
|
|
|
|
|
|
|
|
// multi jvm tests
|
|
|
|
|
lazy val clusterTest = multiJvmTest
|
|
|
|
|
lazy val clusterRun = multiJvmRun
|
|
|
|
|
|
|
|
|
|
override def multiJvmOptions = Seq("-Xmx256M")
|
2011-05-17 16:34:07 +02:00
|
|
|
|
|
|
|
|
lazy val replicationTestsEnabled = systemOptional[Boolean]("cluster.test.replication", false)
|
|
|
|
|
|
|
|
|
|
override def testOptions =
|
|
|
|
|
super.testOptions ++ (if (!replicationTestsEnabled.value) Seq(testFilter("Replication")) else Seq.empty)
|
2011-04-26 14:00:18 +02:00
|
|
|
}
|
|
|
|
|
|
2010-07-31 12:37:08 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// akka-http subproject
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2010-07-20 12:01:02 +02:00
|
|
|
|
2011-04-27 17:06:37 +12:00
|
|
|
class AkkaHttpProject(info: ProjectInfo) extends AkkaDefaultProject(info) {
|
2010-11-08 15:58:09 +01:00
|
|
|
val jsr250 = Dependencies.jsr250
|
2010-11-21 07:21:17 -08:00
|
|
|
val javax_servlet30 = Dependencies.javax_servlet_30
|
2010-08-31 16:43:47 +02:00
|
|
|
val jetty = Dependencies.jetty
|
2011-03-07 13:49:33 +01:00
|
|
|
val jersey = Dependencies.jersey_server
|
2010-07-20 09:45:09 +02:00
|
|
|
val jsr311 = Dependencies.jsr311
|
2011-03-23 15:44:20 +01:00
|
|
|
val commons_codec = Dependencies.commons_codec
|
2010-06-01 18:41:39 +02:00
|
|
|
|
2010-03-05 09:17:15 +01:00
|
|
|
// testing
|
2010-07-20 09:45:09 +02:00
|
|
|
val junit = Dependencies.junit
|
|
|
|
|
val mockito = Dependencies.mockito
|
|
|
|
|
val scalatest = Dependencies.scalatest
|
2010-03-02 00:34:14 -05:00
|
|
|
}
|
|
|
|
|
|
2011-05-17 14:48:06 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// The akka-durable-mailboxes subproject
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
class AkkaDurableMailboxesParentProject(info: ProjectInfo) extends ParentProject(info) {
|
|
|
|
|
lazy val akka_mailboxes_common =
|
|
|
|
|
project("akka-mailboxes-common", "akka-mailboxes-common", new AkkaMailboxesCommonProject(_), akka_remote)
|
|
|
|
|
lazy val akka_redis_mailbox =
|
|
|
|
|
project("akka-redis-mailbox", "akka-redis-mailbox", new AkkaRedisMailboxProject(_), akka_mailboxes_common)
|
|
|
|
|
lazy val akka_file_mailbox =
|
|
|
|
|
project("akka-file-mailbox", "akka-file-mailbox", new AkkaFileMailboxProject(_), akka_mailboxes_common)
|
|
|
|
|
lazy val akka_beanstalk_mailbox =
|
|
|
|
|
project("akka-beanstalk-mailbox", "akka-beanstalk-mailbox", new AkkaBeanstalkMailboxProject(_), akka_mailboxes_common)
|
|
|
|
|
lazy val akka_zookeeper_mailbox =
|
|
|
|
|
project("akka-zookeeper-mailbox", "akka-zookeeper-mailbox", new AkkaZooKeeperMailboxProject(_), akka_mailboxes_common, akka_cluster)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class AkkaMailboxesCommonProject(info: ProjectInfo) extends AkkaDefaultProject(info) {
|
|
|
|
|
// test dependencies
|
|
|
|
|
val scalatest = Dependencies.scalatest
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class AkkaRedisMailboxProject(info: ProjectInfo) extends AkkaDefaultProject(info) {
|
|
|
|
|
val redis = Dependencies.redis
|
|
|
|
|
|
|
|
|
|
lazy val redisTestsEnabled = systemOptional[Boolean]("mailbox.test.redis", false)
|
|
|
|
|
|
|
|
|
|
override def testOptions =
|
|
|
|
|
super.testOptions ++ (if (!redisTestsEnabled.value) Seq(testFilter("Redis")) else Seq.empty)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class AkkaFileMailboxProject(info: ProjectInfo) extends AkkaDefaultProject(info)
|
|
|
|
|
|
|
|
|
|
class AkkaBeanstalkMailboxProject(info: ProjectInfo) extends AkkaDefaultProject(info) {
|
|
|
|
|
val beanstalk = Dependencies.beanstalk
|
|
|
|
|
|
|
|
|
|
lazy val beanstalkTestsEnabled = systemOptional[Boolean]("mailbox.test.beanstalk", false)
|
|
|
|
|
|
|
|
|
|
override def testOptions =
|
|
|
|
|
super.testOptions ++ (if (!beanstalkTestsEnabled.value) Seq(testFilter("Beanstalk")) else Seq.empty)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class AkkaZooKeeperMailboxProject(info: ProjectInfo) extends AkkaDefaultProject(info)
|
|
|
|
|
|
2010-07-31 12:37:08 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2011-05-05 13:13:49 +12:00
|
|
|
// Samples
|
2010-07-31 12:37:08 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2010-07-20 12:01:02 +02:00
|
|
|
|
2010-08-18 15:15:22 +02:00
|
|
|
class AkkaSampleAntsProject(info: ProjectInfo) extends DefaultSpdeProject(info) {
|
2010-11-23 11:50:06 +13:00
|
|
|
override def disableCrossPaths = true
|
2010-05-25 13:07:49 +02:00
|
|
|
override def spdeSourcePath = mainSourcePath / "spde"
|
2011-02-08 12:36:47 +13:00
|
|
|
|
|
|
|
|
lazy val sourceArtifact = Artifact(this.artifactID, "src", "jar", Some("sources"), Nil, None)
|
|
|
|
|
lazy val docsArtifact = Artifact(this.artifactID, "doc", "jar", Some("docs"), Nil, None)
|
|
|
|
|
override def packageDocsJar = this.defaultJarPath("-docs.jar")
|
|
|
|
|
override def packageSrcJar = this.defaultJarPath("-sources.jar")
|
|
|
|
|
override def packageToPublishActions = super.packageToPublishActions ++ Seq(this.packageDocs, this.packageSrc)
|
|
|
|
|
|
|
|
|
|
lazy val publishRelease = {
|
|
|
|
|
val releaseConfiguration = new DefaultPublishConfiguration(localReleaseRepository, "release", false)
|
|
|
|
|
publishTask(publishIvyModule, releaseConfiguration) dependsOn (deliver, publishLocal, makePom)
|
|
|
|
|
}
|
2011-03-28 11:07:23 +13:00
|
|
|
}
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2011-04-27 17:06:37 +12:00
|
|
|
class AkkaSampleRemoteProject(info: ProjectInfo) extends AkkaDefaultProject(info)
|
2010-12-22 15:35:50 +01:00
|
|
|
|
2011-04-27 17:06:37 +12:00
|
|
|
class AkkaSampleChatProject(info: ProjectInfo) extends AkkaDefaultProject(info)
|
2011-04-08 13:09:19 +02:00
|
|
|
|
2011-04-27 17:06:37 +12:00
|
|
|
class AkkaSampleFSMProject(info: ProjectInfo) extends AkkaDefaultProject(info)
|
2010-05-04 10:40:58 +02:00
|
|
|
|
2011-04-27 17:06:37 +12:00
|
|
|
class AkkaSampleOsgiProject(info: ProjectInfo) extends AkkaDefaultProject(info) with BNDPlugin {
|
2011-04-21 11:22:31 +02:00
|
|
|
val osgiCore = Dependencies.osgi_core
|
|
|
|
|
override protected def bndPrivatePackage = List("sample.osgi.*")
|
|
|
|
|
override protected def bndBundleActivator = Some("sample.osgi.Activator")
|
|
|
|
|
}
|
|
|
|
|
|
2010-03-05 14:33:14 +01:00
|
|
|
class AkkaSamplesParentProject(info: ProjectInfo) extends ParentProject(info) {
|
2010-11-23 12:28:21 +13:00
|
|
|
override def disableCrossPaths = true
|
|
|
|
|
|
2011-03-28 11:07:23 +13:00
|
|
|
lazy val akka_sample_ants = project("akka-sample-ants", "akka-sample-ants",
|
|
|
|
|
new AkkaSampleAntsProject(_), akka_stm)
|
2010-11-24 15:44:42 +01:00
|
|
|
lazy val akka_sample_fsm = project("akka-sample-fsm", "akka-sample-fsm",
|
|
|
|
|
new AkkaSampleFSMProject(_), akka_actor)
|
2011-05-20 14:36:26 +02:00
|
|
|
// lazy val akka_sample_remote = project("akka-sample-remote", "akka-sample-remote",
|
|
|
|
|
// new AkkaSampleRemoteProject(_), akka_remote)
|
|
|
|
|
// lazy val akka_sample_chat = project("akka-sample-chat", "akka-sample-chat",
|
|
|
|
|
// new AkkaSampleChatProject(_), akka_remote)
|
2011-04-21 11:22:31 +02:00
|
|
|
lazy val akka_sample_osgi = project("akka-sample-osgi", "akka-sample-osgi",
|
|
|
|
|
new AkkaSampleOsgiProject(_), akka_actor)
|
2011-02-08 12:36:47 +13:00
|
|
|
|
|
|
|
|
lazy val publishRelease = {
|
|
|
|
|
val releaseConfiguration = new DefaultPublishConfiguration(localReleaseRepository, "release", false)
|
|
|
|
|
publishTask(publishIvyModule, releaseConfiguration) dependsOn (deliver, publishLocal, makePom)
|
|
|
|
|
}
|
2010-03-10 17:16:10 +01:00
|
|
|
}
|
2010-04-01 10:06:43 +02:00
|
|
|
|
2011-04-02 09:46:14 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// Tutorials
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
2011-05-11 14:41:58 +12:00
|
|
|
class AkkaTutorialFirstProject(info: ProjectInfo) extends AkkaTutorialProject(info)
|
2011-04-05 17:28:16 +02:00
|
|
|
|
2011-05-11 14:41:58 +12:00
|
|
|
class AkkaTutorialSecondProject(info: ProjectInfo) extends AkkaTutorialProject(info)
|
|
|
|
|
|
|
|
|
|
class AkkaTutorialProject(info: ProjectInfo) extends AkkaDefaultProject(info) {
|
|
|
|
|
def doNothing = task { None }
|
|
|
|
|
override def publishLocalAction = doNothing
|
|
|
|
|
override def deliverLocalAction = doNothing
|
|
|
|
|
override def publishAction = doNothing
|
|
|
|
|
override def deliverAction = doNothing
|
|
|
|
|
override lazy val publishRelease = doNothing
|
|
|
|
|
}
|
2011-04-02 09:46:14 +02:00
|
|
|
|
|
|
|
|
class AkkaTutorialsParentProject(info: ProjectInfo) extends ParentProject(info) {
|
|
|
|
|
override def disableCrossPaths = true
|
|
|
|
|
|
2011-04-05 17:28:16 +02:00
|
|
|
lazy val akka_tutorial_first = project("akka-tutorial-first", "akka-tutorial-first",
|
|
|
|
|
new AkkaTutorialFirstProject(_), akka_actor)
|
|
|
|
|
|
|
|
|
|
lazy val akka_tutorial_second = project("akka-tutorial-second", "akka-tutorial-second",
|
|
|
|
|
new AkkaTutorialSecondProject(_), akka_actor)
|
2011-04-02 09:46:14 +02:00
|
|
|
|
2011-05-11 14:41:58 +12:00
|
|
|
def doNothing = task { None }
|
|
|
|
|
override def publishLocalAction = doNothing
|
|
|
|
|
override def deliverLocalAction = doNothing
|
|
|
|
|
override def publishAction = doNothing
|
|
|
|
|
override def deliverAction = doNothing
|
|
|
|
|
lazy val publishRelease = doNothing
|
2011-04-02 09:46:14 +02:00
|
|
|
}
|
|
|
|
|
|
2011-03-22 16:30:49 +01:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// akka-testkit subproject
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
2011-04-27 17:06:37 +12:00
|
|
|
class AkkaTestkitProject(info: ProjectInfo) extends AkkaDefaultProject(info) {
|
2011-04-16 22:20:04 +02:00
|
|
|
val scalatest = Dependencies.scalatest
|
|
|
|
|
}
|
2011-03-22 16:30:49 +01:00
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2011-04-06 07:45:42 +02:00
|
|
|
// akka-actor-tests subproject
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
2011-04-30 08:59:45 -06:00
|
|
|
class AkkaActorTestsProject(info: ProjectInfo) extends AkkaDefaultProject(info) with AutoCompilerPlugins {
|
2011-04-06 07:45:42 +02:00
|
|
|
// testing
|
|
|
|
|
val junit = Dependencies.junit
|
|
|
|
|
val scalatest = Dependencies.scalatest
|
|
|
|
|
val multiverse_test = Dependencies.multiverse_test // StandardLatch
|
2011-04-21 15:12:47 -06:00
|
|
|
override def compileOptions = super.compileOptions ++ compileOptions("-P:continuations:enable")
|
2011-04-06 07:45:42 +02:00
|
|
|
}
|
2011-04-26 14:00:18 +02:00
|
|
|
|
2011-04-06 07:45:42 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2011-03-22 16:30:49 +01:00
|
|
|
// akka-slf4j subproject
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
2011-04-27 17:06:37 +12:00
|
|
|
class AkkaSlf4jProject(info: ProjectInfo) extends AkkaDefaultProject(info) {
|
2011-04-17 23:18:04 -07:00
|
|
|
val slf4j = Dependencies.slf4j
|
2011-03-22 16:30:49 +01:00
|
|
|
}
|
|
|
|
|
|
2010-07-31 12:37:08 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2011-04-27 17:06:37 +12:00
|
|
|
// Default project
|
2010-07-31 12:37:08 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
2010-07-20 12:01:02 +02:00
|
|
|
|
2011-05-18 17:25:30 +02:00
|
|
|
import com.github.olim7t.sbtscalariform._
|
|
|
|
|
class AkkaDefaultProject(info: ProjectInfo) extends DefaultProject(info) with McPom with ScalariformPlugin {
|
|
|
|
|
|
|
|
|
|
override def scalariformOptions = Seq(
|
2011-05-18 17:41:10 +02:00
|
|
|
//VerboseScalariform,
|
2011-05-18 17:25:30 +02:00
|
|
|
AlignParameters(true),
|
|
|
|
|
CompactStringConcatenation(false),
|
|
|
|
|
IndentPackageBlocks(true),
|
|
|
|
|
FormatXml(true),
|
|
|
|
|
PreserveSpaceBeforeArguments(false),
|
|
|
|
|
DoubleIndentClassDeclaration(false),
|
|
|
|
|
RewriteArrowSymbols(true),
|
|
|
|
|
AlignSingleLineCaseStatements(true),
|
|
|
|
|
SpaceBeforeColon(false),
|
|
|
|
|
PreserveDanglingCloseParenthesis(false),
|
|
|
|
|
IndentSpaces(2),
|
|
|
|
|
IndentLocalDefs(false)
|
|
|
|
|
// MaxArrowIndent(40),
|
|
|
|
|
// SpaceInsideBrackets(false),
|
|
|
|
|
// SpaceInsideParentheses(false),
|
|
|
|
|
//SpacesWithinPatternBinders(true)
|
|
|
|
|
)
|
2011-04-21 11:22:31 +02:00
|
|
|
|
2010-11-22 13:14:10 +13:00
|
|
|
override def disableCrossPaths = true
|
2011-02-01 17:46:45 +13:00
|
|
|
|
|
|
|
|
override def compileOptions = super.compileOptions ++ scalaCompileSettings.map(CompileOption)
|
|
|
|
|
override def javaCompileOptions = super.javaCompileOptions ++ javaCompileSettings.map(JavaCompileOption)
|
|
|
|
|
|
2011-01-21 12:10:06 +01:00
|
|
|
lazy val sourceArtifact = Artifact(this.artifactID, "src", "jar", Some("sources"), Nil, None)
|
2010-10-21 11:00:10 +02:00
|
|
|
lazy val docsArtifact = Artifact(this.artifactID, "doc", "jar", Some("docs"), Nil, None)
|
2010-08-27 21:27:37 +02:00
|
|
|
override def runClasspath = super.runClasspath +++ (AkkaParentProject.this.info.projectPath / "config")
|
|
|
|
|
override def testClasspath = super.testClasspath +++ (AkkaParentProject.this.info.projectPath / "config")
|
2010-08-26 16:30:28 +02:00
|
|
|
override def packageDocsJar = this.defaultJarPath("-docs.jar")
|
|
|
|
|
override def packageSrcJar = this.defaultJarPath("-sources.jar")
|
2010-08-31 18:11:13 +02:00
|
|
|
override def packageToPublishActions = super.packageToPublishActions ++ Seq(this.packageDocs, this.packageSrc)
|
2010-12-08 10:14:27 +01:00
|
|
|
override def pomPostProcess(node: scala.xml.Node): scala.xml.Node = mcPom(AkkaParentProject.this.moduleConfigurations)(super.pomPostProcess(node))
|
2010-09-23 21:30:20 +02:00
|
|
|
|
2011-03-31 11:36:49 +13:00
|
|
|
lazy val excludeTestsProperty = systemOptional[String]("akka.test.exclude", "")
|
|
|
|
|
|
|
|
|
|
def excludeTests = {
|
|
|
|
|
val exclude = excludeTestsProperty.value
|
|
|
|
|
if (exclude.isEmpty) Seq.empty else exclude.split(",").toSeq
|
2010-09-23 21:30:20 +02:00
|
|
|
}
|
2011-01-21 16:29:26 +13:00
|
|
|
|
2011-05-17 14:48:06 +02:00
|
|
|
def testFilter(containing: String) = TestFilter(test => !test.name.contains(containing))
|
|
|
|
|
|
2011-03-31 11:36:49 +13:00
|
|
|
override def testOptions = super.testOptions ++ excludeTests.map(exclude => TestFilter(test => !test.contains(exclude)))
|
|
|
|
|
|
2011-01-21 16:29:26 +13:00
|
|
|
lazy val publishRelease = {
|
|
|
|
|
val releaseConfiguration = new DefaultPublishConfiguration(localReleaseRepository, "release", false)
|
|
|
|
|
publishTask(publishIvyModule, releaseConfiguration) dependsOn (deliver, publishLocal, makePom)
|
|
|
|
|
}
|
2010-08-26 16:30:28 +02:00
|
|
|
}
|
2010-04-01 10:06:43 +02:00
|
|
|
|
2011-05-09 21:26:17 +12:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// Distribution
|
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
lazy val akkaDist = project("dist", "akka-dist", new AkkaDistParentProject(_))
|
|
|
|
|
|
|
|
|
|
class AkkaDistParentProject(info: ProjectInfo) extends ParentProject(info) {
|
|
|
|
|
lazy val akkaActorsDist = project("actors", "akka-dist-actors", new AkkaActorsDistProject(_), akka_actor)
|
|
|
|
|
|
|
|
|
|
lazy val akkaCoreDist = project("core", "akka-dist-core", new AkkaCoreDistProject(_),
|
|
|
|
|
akkaActorsDist, akka_remote, akka_http, akka_slf4j, akka_testkit, akka_actor_tests)
|
|
|
|
|
|
|
|
|
|
def doNothing = task { None }
|
|
|
|
|
override def publishLocalAction = doNothing
|
|
|
|
|
override def deliverLocalAction = doNothing
|
|
|
|
|
override def publishAction = doNothing
|
|
|
|
|
override def deliverAction = doNothing
|
|
|
|
|
|
2011-05-10 12:32:38 +12:00
|
|
|
class AkkaActorsDistProject(info: ProjectInfo) extends DefaultProject(info) with DistDocProject {
|
2011-05-09 21:26:17 +12:00
|
|
|
def distName = "akka-actors"
|
|
|
|
|
override def distDocName = "akka"
|
2010-08-09 10:09:26 +02:00
|
|
|
|
2011-05-10 18:49:33 +12:00
|
|
|
override def distConfigSources = (akkaParent.info.projectPath / "config" ##) * "*"
|
2010-11-23 15:59:37 +01:00
|
|
|
|
2011-05-10 16:37:31 +12:00
|
|
|
override def distAction = super.distAction dependsOn (distTutorials)
|
2010-08-09 10:09:26 +02:00
|
|
|
|
2011-05-10 16:37:31 +12:00
|
|
|
val distTutorialsPath = distDocPath / "tutorials"
|
|
|
|
|
|
|
|
|
|
lazy val distTutorials = task {
|
|
|
|
|
val tutorials = Set(akka_tutorials.akka_tutorial_first,
|
|
|
|
|
akka_tutorials.akka_tutorial_second)
|
|
|
|
|
|
|
|
|
|
tutorials.map { tutorial =>
|
|
|
|
|
val tutorialPath = (tutorial.info.projectPath ##)
|
|
|
|
|
val tutorialFilterOut = ((tutorial.outputPath ##) ***)
|
|
|
|
|
val tutorialSources = (tutorialPath ***) --- tutorialFilterOut
|
|
|
|
|
val tutorialOutputPath = distTutorialsPath / tutorial.name
|
|
|
|
|
copyPaths(tutorialSources, tutorialOutputPath)
|
|
|
|
|
}.foldLeft(None: Option[String])(_ orElse _)
|
|
|
|
|
} dependsOn (distBase)
|
2011-05-09 21:26:17 +12:00
|
|
|
}
|
|
|
|
|
|
2011-05-10 12:32:38 +12:00
|
|
|
class AkkaCoreDistProject(info: ProjectInfo)extends DefaultProject(info) with DistProject {
|
2011-05-09 21:26:17 +12:00
|
|
|
def distName = "akka-core"
|
|
|
|
|
}
|
2010-04-01 10:06:43 +02:00
|
|
|
}
|
2010-08-09 10:09:26 +02:00
|
|
|
}
|
2010-06-06 14:33:10 -04:00
|
|
|
|
2011-04-21 11:22:31 +02:00
|
|
|
trait OsgiProject extends BNDPlugin { self: DefaultProject =>
|
2010-10-26 12:49:25 +02:00
|
|
|
override def bndExportPackage = Seq("akka.*;version=%s".format(projectVersion.value))
|
2010-03-02 00:34:14 -05:00
|
|
|
}
|
2010-12-08 10:14:27 +01:00
|
|
|
|
|
|
|
|
trait McPom { self: DefaultProject =>
|
|
|
|
|
import scala.xml._
|
|
|
|
|
|
|
|
|
|
def mcPom(mcs: Set[ModuleConfiguration])(node: Node): Node = {
|
|
|
|
|
|
|
|
|
|
def cleanUrl(url: String) = url match {
|
2010-12-22 15:35:50 +01:00
|
|
|
case null => ""
|
|
|
|
|
case "" => ""
|
2010-12-08 10:14:27 +01:00
|
|
|
case u if u endsWith "/" => u
|
2010-12-22 15:35:50 +01:00
|
|
|
case u => u + "/"
|
|
|
|
|
}
|
|
|
|
|
|
2011-04-05 17:28:16 +02:00
|
|
|
val oldRepos =
|
|
|
|
|
(node \\ "project" \ "repositories" \ "repository").map { n =>
|
2010-12-22 15:35:50 +01:00
|
|
|
cleanUrl((n \ "url").text) -> (n \ "name").text
|
|
|
|
|
}.toList
|
|
|
|
|
|
2011-04-05 17:28:16 +02:00
|
|
|
val newRepos =
|
2010-12-22 15:35:50 +01:00
|
|
|
mcs.filter(_.resolver.isInstanceOf[MavenRepository]).map { m =>
|
|
|
|
|
val r = m.resolver.asInstanceOf[MavenRepository]
|
|
|
|
|
cleanUrl(r.root) -> r.name
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val repos = Map((oldRepos ++ newRepos): _*).map { pair =>
|
|
|
|
|
<repository>
|
|
|
|
|
<id>{pair._2.toSeq.filter(_.isLetterOrDigit).mkString}</id>
|
|
|
|
|
<name>{pair._2}</name>
|
|
|
|
|
<url>{pair._1}</url>
|
|
|
|
|
</repository>
|
2010-12-08 10:14:27 +01:00
|
|
|
}
|
|
|
|
|
|
2010-12-22 15:35:50 +01:00
|
|
|
def rewrite(pf: PartialFunction[Node, Node])(ns: Seq[Node]): Seq[Node] = for(subnode <- ns) yield subnode match {
|
|
|
|
|
case e: Elem =>
|
|
|
|
|
if (pf isDefinedAt e) pf(e)
|
|
|
|
|
else Elem(e.prefix, e.label, e.attributes, e.scope, rewrite(pf)(e.child):_*)
|
|
|
|
|
case other => other
|
2010-12-08 10:14:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val rule: PartialFunction[Node,Node] = if ((node \\ "project" \ "repositories" ).isEmpty) {
|
|
|
|
|
case Elem(prefix, "project", attribs, scope, children @ _*) =>
|
|
|
|
|
Elem(prefix, "project", attribs, scope, children ++ <repositories>{repos}</repositories>:_*)
|
|
|
|
|
} else {
|
|
|
|
|
case Elem(prefix, "repositories", attribs, scope, children @ _*) =>
|
2010-12-22 15:35:50 +01:00
|
|
|
Elem(prefix, "repositories", attribs, scope, repos.toList: _*)
|
2010-12-08 10:14:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rewrite(rule)(node.theSeq)(0)
|
|
|
|
|
}
|
2010-12-18 21:36:28 -07:00
|
|
|
}
|