2010-04-09 14:24:33 +02:00
|
|
|
/*---------------------------------------------------------------------------\
|
|
|
|
|
| Copyright (C) 2009-2010 Scalable Solutions AB <http://scalablesolutions.se> |
|
|
|
|
|
\---------------------------------------------------------------------------*/
|
2010-03-07 08:14:48 +01:00
|
|
|
|
2010-03-02 00:34:14 -05:00
|
|
|
import sbt._
|
2010-03-30 18:56:34 +02:00
|
|
|
import sbt.CompileOrder._
|
2010-05-24 15:53:17 +02:00
|
|
|
import spde._
|
2010-05-25 12:17:54 +02:00
|
|
|
|
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._
|
|
|
|
|
import java.io.File
|
2010-03-09 22:07:14 +01:00
|
|
|
|
2010-04-01 10:06:43 +02:00
|
|
|
class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
2010-03-02 00:34:14 -05:00
|
|
|
|
2010-03-10 17:16:10 +01:00
|
|
|
// ------------------------------------------------------------
|
2010-04-01 23:02:13 +02:00
|
|
|
// project versions
|
|
|
|
|
val JERSEY_VERSION = "1.1.5"
|
2010-05-30 21:40:20 +02:00
|
|
|
val ATMO_VERSION = "0.6-SNAPSHOT"
|
2010-05-25 12:24:15 +02:00
|
|
|
val CASSANDRA_VERSION = "0.6.1"
|
2010-04-01 23:02:13 +02:00
|
|
|
val LIFT_VERSION = "2.0-scala280-SNAPSHOT"
|
2010-05-30 13:04:22 +02:00
|
|
|
val SCALATEST_VERSION = "1.2-for-scala-2.8.0.RC3-SNAPSHOT"
|
2010-05-27 09:12:17 +12:00
|
|
|
val MULTIVERSE_VERSION = "0.5.2"
|
2010-04-06 12:45:09 +02:00
|
|
|
|
2010-04-09 14:24:33 +02:00
|
|
|
// ------------------------------------------------------------
|
|
|
|
|
lazy val deployPath = info.projectPath / "deploy"
|
|
|
|
|
lazy val distPath = info.projectPath / "dist"
|
2010-03-30 18:56:34 +02:00
|
|
|
|
2010-04-16 09:23:24 +02:00
|
|
|
override def compileOptions = super.compileOptions ++
|
2010-05-25 12:24:15 +02:00
|
|
|
Seq("-deprecation",
|
|
|
|
|
"-Xmigration",
|
|
|
|
|
"-Xcheckinit",
|
|
|
|
|
"-Xstrict-warnings",
|
|
|
|
|
"-Xwarninit",
|
|
|
|
|
"-encoding", "utf8")
|
2010-05-04 22:15:33 +02:00
|
|
|
.map(x => CompileOption(x))
|
2010-03-10 17:16:10 +01:00
|
|
|
|
2010-03-30 18:56:34 +02:00
|
|
|
override def javaCompileOptions = JavaCompileOption("-Xlint:unchecked") :: super.javaCompileOptions.toList
|
2010-03-10 17:16:10 +01:00
|
|
|
|
2010-03-25 01:28:55 +01:00
|
|
|
def distName = "%s_%s-%s.zip".format(name, buildScalaVersion, version)
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2010-04-01 10:06:43 +02:00
|
|
|
lazy val dist = zipTask(allArtifacts, "dist", distName) dependsOn (`package`) describedAs("Zips up the distribution.")
|
|
|
|
|
|
2010-05-28 20:24:00 +02:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// Repositories
|
|
|
|
|
// 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
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
val embeddedRepo = "Embedded Repo" at (info.projectPath / "embedded-repo").asURL.toString // Fast enough => No need for a module configuration here!
|
|
|
|
|
val scalaTestModuleConfig = ModuleConfiguration("org.scalatest", ScalaToolsSnapshots)
|
|
|
|
|
def guiceyFruitRepo = "GuiceyFruit Repo" at "http://guiceyfruit.googlecode.com/svn/repo/releases/"
|
|
|
|
|
val guiceyFruitModuleConfig = ModuleConfiguration("org.guiceyfruit", guiceyFruitRepo)
|
|
|
|
|
def jbossRepo = "JBoss Repo" at "https://repository.jboss.org/nexus/content/groups/public/"
|
|
|
|
|
val jbossModuleConfig = ModuleConfiguration("org.jboss", jbossRepo)
|
|
|
|
|
val nettyModuleConfig = ModuleConfiguration("org.jboss.netty", jbossRepo)
|
|
|
|
|
val jgroupsModuleConfig = ModuleConfiguration("jgroups", jbossRepo)
|
2010-05-29 07:28:42 +02:00
|
|
|
def sunjdmkRepo = "Sun JDMK Repo" at "http://wp5.e-taxonomy.eu/cdmlib/mavenrepo"
|
2010-05-28 20:52:09 +02:00
|
|
|
val jmsModuleConfig = ModuleConfiguration("javax.jms", sunjdmkRepo)
|
|
|
|
|
val jdmkModuleConfig = ModuleConfiguration("com.sun.jdmk", sunjdmkRepo)
|
|
|
|
|
val jmxModuleConfig = ModuleConfiguration("com.sun.jmx", sunjdmkRepo)
|
2010-05-29 07:28:42 +02:00
|
|
|
def javaNetRepo = "java.net Repo" at "http://download.java.net/maven/2"
|
2010-05-30 21:40:20 +02:00
|
|
|
def sonatypeSnapshotRepo = "Sonatype OSS Repo" at "http://oss.sonatype.org/content/repositories/snapshots"
|
2010-05-29 07:28:42 +02:00
|
|
|
val jerseyModuleConfig = ModuleConfiguration("com.sun.jersey", javaNetRepo)
|
|
|
|
|
val jerseyContrModuleConfig = ModuleConfiguration("com.sun.jersey.contribs", javaNetRepo)
|
|
|
|
|
val grizzlyModuleConfig = ModuleConfiguration("com.sun.grizzly", javaNetRepo)
|
2010-05-30 21:40:20 +02:00
|
|
|
val atmosphereModuleConfig = ModuleConfiguration("org.atmosphere", sonatypeSnapshotRepo)
|
2010-05-29 07:28:42 +02:00
|
|
|
val liftModuleConfig = ModuleConfiguration("net.liftweb", ScalaToolsSnapshots)
|
|
|
|
|
|
2010-04-01 23:02:13 +02:00
|
|
|
// ------------------------------------------------------------
|
|
|
|
|
// project defintions
|
2010-05-06 20:59:04 +02:00
|
|
|
lazy val akka_core = project("akka-core", "akka-core", new AkkaCoreProject(_))
|
2010-04-01 23:02:13 +02:00
|
|
|
lazy val akka_amqp = project("akka-amqp", "akka-amqp", new AkkaAMQPProject(_), akka_core)
|
2010-04-29 11:03:25 +02:00
|
|
|
lazy val akka_http = project("akka-http", "akka-http", new AkkaHttpProject(_), akka_core, akka_camel)
|
2010-04-01 23:02:13 +02:00
|
|
|
lazy val akka_camel = project("akka-camel", "akka-camel", new AkkaCamelProject(_), akka_core)
|
|
|
|
|
lazy val akka_persistence = project("akka-persistence", "akka-persistence", new AkkaPersistenceParentProject(_))
|
|
|
|
|
lazy val akka_spring = project("akka-spring", "akka-spring", new AkkaSpringProject(_), akka_core)
|
2010-04-08 17:02:01 +02:00
|
|
|
lazy val akka_jta = project("akka-jta", "akka-jta", new AkkaJTAProject(_), akka_core)
|
2010-04-06 12:45:09 +02:00
|
|
|
lazy val akka_kernel = project("akka-kernel", "akka-kernel", new AkkaKernelProject(_),
|
2010-05-21 14:48:24 +02:00
|
|
|
akka_core, akka_http, akka_spring, akka_camel, akka_persistence, akka_amqp)
|
2010-03-02 00:34:14 -05:00
|
|
|
|
2010-04-01 23:02:13 +02:00
|
|
|
// functional tests in java
|
|
|
|
|
lazy val akka_fun_test = project("akka-fun-test-java", "akka-fun-test-java", new AkkaFunTestProject(_), akka_kernel)
|
2010-03-30 18:56:34 +02:00
|
|
|
|
2010-04-01 23:02:13 +02:00
|
|
|
// examples
|
|
|
|
|
lazy val akka_samples = project("akka-samples", "akka-samples", new AkkaSamplesParentProject(_))
|
2010-03-09 22:07:14 +01:00
|
|
|
|
2010-03-10 17:16:10 +01:00
|
|
|
// ------------------------------------------------------------
|
2010-05-16 10:59:06 +02:00
|
|
|
// Run Akka microkernel using 'sbt run' + use for packaging executable JAR
|
2010-03-11 09:50:15 +01:00
|
|
|
override def mainClass = Some("se.scalablesolutions.akka.kernel.Main")
|
2010-03-09 22:07:14 +01:00
|
|
|
|
2010-04-06 12:45:09 +02:00
|
|
|
override def packageOptions =
|
2010-03-30 18:56:34 +02:00
|
|
|
manifestClassPath.map(cp => ManifestAttributes(
|
2010-04-06 12:45:09 +02:00
|
|
|
(Attributes.Name.CLASS_PATH, cp),
|
|
|
|
|
(IMPLEMENTATION_TITLE, "Akka"),
|
|
|
|
|
(IMPLEMENTATION_URL, "http://akkasource.org"),
|
2010-03-30 19:37:48 +02:00
|
|
|
(IMPLEMENTATION_VENDOR, "The Akka Project")
|
|
|
|
|
)).toList :::
|
2010-03-09 22:07:14 +01:00
|
|
|
getMainClass(false).map(MainClass(_)).toList
|
2010-03-10 17:16:10 +01:00
|
|
|
|
|
|
|
|
// create a manifest with all akka jars and dependency jars on classpath
|
2010-03-09 22:07:14 +01:00
|
|
|
override def manifestClassPath = Some(allArtifacts.getFiles
|
|
|
|
|
.filter(_.getName.endsWith(".jar"))
|
2010-06-01 18:10:48 +02:00
|
|
|
.filter(!_.getName.contains("servlet_2.4"))
|
2010-05-21 14:48:24 +02:00
|
|
|
.filter(!_.getName.contains("scala-library"))
|
2010-03-25 01:28:55 +01:00
|
|
|
.map("lib_managed/scala_%s/compile/".format(buildScalaVersion) + _.getName)
|
2010-04-06 12:45:09 +02:00
|
|
|
.mkString(" ") +
|
2010-03-31 07:33:55 +02:00
|
|
|
" scala-library.jar" +
|
2010-03-25 01:28:55 +01:00
|
|
|
" dist/akka-core_%s-%s.jar".format(buildScalaVersion, version) +
|
2010-04-29 11:03:25 +02:00
|
|
|
" dist/akka-http_%s-%s.jar".format(buildScalaVersion, version) +
|
2010-03-25 01:28:55 +01:00
|
|
|
" dist/akka-camel_%s-%s.jar".format(buildScalaVersion, version) +
|
|
|
|
|
" dist/akka-amqp_%s-%s.jar".format(buildScalaVersion, version) +
|
|
|
|
|
" dist/akka-persistence-common_%s-%s.jar".format(buildScalaVersion, version) +
|
|
|
|
|
" dist/akka-persistence-redis_%s-%s.jar".format(buildScalaVersion, version) +
|
|
|
|
|
" dist/akka-persistence-mongo_%s-%s.jar".format(buildScalaVersion, version) +
|
|
|
|
|
" dist/akka-persistence-cassandra_%s-%s.jar".format(buildScalaVersion, version) +
|
|
|
|
|
" dist/akka-kernel_%s-%s.jar".format(buildScalaVersion, version) +
|
2010-04-08 17:02:01 +02:00
|
|
|
" dist/akka-spring_%s-%s.jar".format(buildScalaVersion, version) +
|
|
|
|
|
" dist/akka-jta_%s-%s.jar".format(buildScalaVersion, version)
|
2010-04-06 12:45:09 +02:00
|
|
|
)
|
2010-03-09 22:07:14 +01:00
|
|
|
|
2010-05-28 22:05:44 +02:00
|
|
|
//Exclude slf4j1.5.11 from the classpath, it's conflicting...
|
|
|
|
|
override def runClasspath = super.runClasspath --- (super.runClasspath ** "slf4j*1.5.11.jar")
|
|
|
|
|
|
2010-03-30 18:56:34 +02:00
|
|
|
// ------------------------------------------------------------
|
2010-04-01 23:02:13 +02:00
|
|
|
// publishing
|
|
|
|
|
override def managedStyle = ManagedStyle.Maven
|
|
|
|
|
//override def defaultPublishRepository = Some(Resolver.file("maven-local", Path.userHome / ".m2" / "repository" asFile))
|
|
|
|
|
val publishTo = Resolver.file("maven-local", Path.userHome / ".m2" / "repository" asFile)
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2010-05-04 22:15:33 +02:00
|
|
|
val sourceArtifact = Artifact(artifactID, "source", "jar", Some("source"), Nil, None)
|
|
|
|
|
val docsArtifact = Artifact(artifactID, "docs", "jar", Some("docs"), Nil, None)
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2010-04-01 23:02:13 +02:00
|
|
|
// Credentials(Path.userHome / ".akka_publish_credentials", log)
|
|
|
|
|
|
2010-04-06 12:45:09 +02:00
|
|
|
//override def documentOptions = encodingUtf8.map(SimpleDocOption(_))
|
2010-05-04 22:15:33 +02:00
|
|
|
override def packageDocsJar = defaultJarPath("-docs.jar")
|
|
|
|
|
override def packageSrcJar= defaultJarPath("-source.jar")
|
2010-04-01 23:02:13 +02:00
|
|
|
override def packageToPublishActions = super.packageToPublishActions ++ Seq(packageDocs, packageSrc)
|
|
|
|
|
|
|
|
|
|
override def pomExtra =
|
|
|
|
|
<inceptionYear>2009</inceptionYear>
|
|
|
|
|
<url>http://akkasource.org</url>
|
|
|
|
|
<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>
|
2010-05-25 11:17:18 +02:00
|
|
|
|
|
|
|
|
// publish to local mvn
|
|
|
|
|
import Process._
|
|
|
|
|
lazy val publishLocalMvn = runMvnInstall
|
|
|
|
|
def runMvnInstall = task {
|
2010-06-01 18:33:37 +02:00
|
|
|
for (absPath <- akkaArtifacts.getPaths) {
|
2010-05-27 09:01:56 +02:00
|
|
|
val artifactRE = """(.*)/dist/(.*)-(.*).jar""".r
|
2010-05-25 11:17:18 +02:00
|
|
|
val artifactRE(path, artifactId, artifactVersion) = absPath
|
|
|
|
|
val command = "mvn install:install-file" +
|
|
|
|
|
" -Dfile=" + absPath +
|
|
|
|
|
" -DgroupId=se.scalablesolutions.akka" +
|
|
|
|
|
" -DartifactId=" + artifactId +
|
|
|
|
|
" -Dversion=" + version +
|
|
|
|
|
" -Dpackaging=jar -DgeneratePom=true"
|
|
|
|
|
command ! log
|
|
|
|
|
}
|
|
|
|
|
None
|
|
|
|
|
} dependsOn(dist) describedAs("Run mvn install for artifacts in dist.")
|
2010-03-02 00:34:14 -05:00
|
|
|
|
2010-03-17 15:10:22 +01:00
|
|
|
// ------------------------------------------------------------
|
2010-03-02 00:34:14 -05:00
|
|
|
// subprojects
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaCoreProject(info: ProjectInfo) extends AkkaDefaultProject(info, distPath) {
|
2010-05-10 22:18:12 +02:00
|
|
|
val netty = "org.jboss.netty" % "netty" % "3.2.0.CR1" % "compile"
|
2010-03-05 09:17:15 +01:00
|
|
|
val commons_io = "commons-io" % "commons-io" % "1.4" % "compile"
|
2010-05-28 17:24:41 +02:00
|
|
|
val dispatch_json = "net.databinder" % "dispatch-json_2.8.0.RC3" % "0.7.4" % "compile"
|
|
|
|
|
val dispatch_htdisttp = "net.databinder" % "dispatch-http_2.8.0.RC3" % "0.7.4" % "compile"
|
2010-05-28 23:25:40 +05:30
|
|
|
val sjson = "sjson.json" % "sjson" % "0.6-SNAPSHOT-2.8.RC3" % "compile"
|
2010-05-28 17:24:41 +02:00
|
|
|
val sbinary = "sbinary" % "sbinary" % "2.8.0.RC3-0.3.1-SNAPSHOT" % "compile"
|
2010-03-05 09:17:15 +01:00
|
|
|
val jackson = "org.codehaus.jackson" % "jackson-mapper-asl" % "1.2.1" % "compile"
|
|
|
|
|
val jackson_core = "org.codehaus.jackson" % "jackson-core-asl" % "1.2.1" % "compile"
|
2010-04-17 19:28:14 +02:00
|
|
|
val h2_lzf = "voldemort.store.compress" % "h2-lzf" % "1.0" % "compile"
|
2010-03-31 14:36:42 +02:00
|
|
|
val jsr166x = "jsr166x" % "jsr166x" % "1.0" % "compile"
|
2010-04-17 19:28:14 +02:00
|
|
|
val jta_1_1 = "org.apache.geronimo.specs" % "geronimo-jta_1.1_spec" % "1.1.1" % "compile"
|
2010-03-05 09:17:15 +01:00
|
|
|
val werkz = "org.codehaus.aspectwerkz" % "aspectwerkz-nodeps-jdk5" % "2.1" % "compile"
|
|
|
|
|
val werkz_core = "org.codehaus.aspectwerkz" % "aspectwerkz-jdk5" % "2.1" % "compile"
|
2010-05-29 00:02:36 +02:00
|
|
|
val configgy = "net.lag" % "configgy" % "2.8.0.RC3-1.5.2-SNAPSHOT" % "compile"
|
2010-05-12 12:27:16 +02:00
|
|
|
val guicey = "org.guiceyfruit" % "guice-all" % "2.0" % "compile"
|
|
|
|
|
val aopalliance = "aopalliance" % "aopalliance" % "1.0" % "compile"
|
2010-05-29 00:53:52 +02:00
|
|
|
val protobuf = "com.google.protobuf" % "protobuf-java" % "2.3.0" % "compile"
|
2010-05-27 09:12:17 +12:00
|
|
|
val multiverse = "org.multiverse" % "multiverse-alpha" % MULTIVERSE_VERSION % "compile"
|
2010-05-24 12:30:37 +02:00
|
|
|
val jgroups = "jgroups" % "jgroups" % "2.9.0.GA" % "compile"
|
2010-05-06 20:59:04 +02:00
|
|
|
|
|
|
|
|
// testing
|
|
|
|
|
val scalatest = "org.scalatest" % "scalatest" % SCALATEST_VERSION % "test"
|
|
|
|
|
val junit = "junit" % "junit" % "4.5" % "test"
|
2010-03-02 00:34:14 -05:00
|
|
|
}
|
|
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaAMQPProject(info: ProjectInfo) extends AkkaDefaultProject(info, distPath) {
|
2010-03-22 07:42:15 +01:00
|
|
|
val commons_io = "commons-io" % "commons-io" % "1.4" % "compile"
|
2010-03-31 07:33:55 +02:00
|
|
|
val rabbit = "com.rabbitmq" % "amqp-client" % "1.7.2" % "compile"
|
2010-03-02 00:34:14 -05:00
|
|
|
}
|
|
|
|
|
|
2010-04-29 11:03:25 +02:00
|
|
|
class AkkaHttpProject(info: ProjectInfo) extends AkkaDefaultProject(info, distPath) {
|
2010-03-22 07:42:15 +01:00
|
|
|
val jackson_core_asl = "org.codehaus.jackson" % "jackson-core-asl" % "1.2.1" % "compile"
|
|
|
|
|
val stax_api = "javax.xml.stream" % "stax-api" % "1.0-2" % "compile"
|
2010-03-09 22:07:14 +01:00
|
|
|
val servlet = "javax.servlet" % "servlet-api" % "2.5" % "compile"
|
2010-03-05 09:17:15 +01:00
|
|
|
val jersey = "com.sun.jersey" % "jersey-core" % JERSEY_VERSION % "compile"
|
|
|
|
|
val jersey_server = "com.sun.jersey" % "jersey-server" % JERSEY_VERSION % "compile"
|
|
|
|
|
val jersey_json = "com.sun.jersey" % "jersey-json" % JERSEY_VERSION % "compile"
|
|
|
|
|
val jersey_contrib = "com.sun.jersey.contribs" % "jersey-scala" % JERSEY_VERSION % "compile"
|
|
|
|
|
val jsr311 = "javax.ws.rs" % "jsr311-api" % "1.1" % "compile"
|
2010-03-02 00:34:14 -05:00
|
|
|
val grizzly = "com.sun.grizzly" % "grizzly-comet-webserver" % "1.9.18-i" % "compile"
|
2010-03-05 09:17:15 +01:00
|
|
|
val atmo = "org.atmosphere" % "atmosphere-annotations" % ATMO_VERSION % "compile"
|
|
|
|
|
val atmo_jersey = "org.atmosphere" % "atmosphere-jersey" % ATMO_VERSION % "compile"
|
|
|
|
|
val atmo_runtime = "org.atmosphere" % "atmosphere-runtime" % ATMO_VERSION % "compile"
|
2010-03-22 07:42:15 +01:00
|
|
|
val commons_logging = "commons-logging" % "commons-logging" % "1.1.1" % "compile"
|
2010-03-31 07:33:55 +02:00
|
|
|
val annotation = "javax.annotation" % "jsr250-api" % "1.0" % "compile"
|
2010-03-25 01:28:55 +01:00
|
|
|
val lift_common = "net.liftweb" % "lift-common" % LIFT_VERSION % "compile"
|
2010-03-23 00:29:18 +01:00
|
|
|
val lift_util = "net.liftweb" % "lift-util" % LIFT_VERSION % "compile"
|
2010-04-29 11:03:25 +02:00
|
|
|
|
2010-03-05 09:17:15 +01:00
|
|
|
// testing
|
2010-03-23 00:29:18 +01:00
|
|
|
val scalatest = "org.scalatest" % "scalatest" % SCALATEST_VERSION % "test"
|
2010-03-02 00:34:14 -05:00
|
|
|
val junit = "junit" % "junit" % "4.5" % "test"
|
|
|
|
|
val mockito = "org.mockito" % "mockito-all" % "1.8.1" % "test"
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaCamelProject(info: ProjectInfo) extends AkkaDefaultProject(info, distPath) {
|
2010-05-30 08:22:23 +02:00
|
|
|
val camel_core = "org.apache.camel" % "camel-core" % "2.3.0" % "compile"
|
2010-03-16 06:45:04 +01:00
|
|
|
}
|
2010-03-02 00:34:14 -05:00
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaPersistenceCommonProject(info: ProjectInfo) extends AkkaDefaultProject(info, distPath) {
|
2010-05-25 12:24:15 +02:00
|
|
|
val thrift = "com.facebook" % "thrift" % "r917130" % "compile"
|
2010-03-29 10:15:10 +02:00
|
|
|
val commons_pool = "commons-pool" % "commons-pool" % "1.5.4" % "compile"
|
2010-03-02 00:34:14 -05:00
|
|
|
}
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaRedisProject(info: ProjectInfo) extends AkkaDefaultProject(info, distPath) {
|
2010-05-28 23:35:17 +05:30
|
|
|
val redis = "com.redis" % "redisclient" % "2.8.0.RC3-1.4-SNAPSHOT" % "compile"
|
2010-05-28 19:32:32 +02:00
|
|
|
override def testOptions = TestFilter((name: String) => name.endsWith("Test")) :: Nil
|
2010-03-02 00:34:14 -05:00
|
|
|
}
|
|
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaMongoProject(info: ProjectInfo) extends AkkaDefaultProject(info, distPath) {
|
2010-05-25 18:44:17 +05:30
|
|
|
val mongo = "org.mongodb" % "mongo-java-driver" % "1.4" % "compile"
|
2010-03-05 14:33:14 +01:00
|
|
|
override def testOptions = TestFilter((name: String) => name.endsWith("Test")) :: Nil
|
2010-03-02 00:34:14 -05:00
|
|
|
}
|
|
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaCassandraProject(info: ProjectInfo) extends AkkaDefaultProject(info, distPath) {
|
2010-03-05 09:17:15 +01:00
|
|
|
val cassandra = "org.apache.cassandra" % "cassandra" % CASSANDRA_VERSION % "compile"
|
2010-05-11 19:00:26 +02:00
|
|
|
val slf4j = "org.slf4j" % "slf4j-api" % "1.6.0" % "compile"
|
|
|
|
|
val slf4j_log4j = "org.slf4j" % "slf4j-log4j12" % "1.6.0" % "compile"
|
2010-04-16 09:23:24 +02:00
|
|
|
val log4j = "log4j" % "log4j" % "1.2.15" % "compile"
|
|
|
|
|
// testing
|
2010-03-05 09:17:15 +01:00
|
|
|
val high_scale = "org.apache.cassandra" % "high-scale-lib" % CASSANDRA_VERSION % "test"
|
|
|
|
|
val cassandra_clhm = "org.apache.cassandra" % "clhm-production" % CASSANDRA_VERSION % "test"
|
|
|
|
|
val commons_coll = "commons-collections" % "commons-collections" % "3.2.1" % "test"
|
|
|
|
|
val google_coll = "com.google.collections" % "google-collections" % "1.0" % "test"
|
2010-05-25 12:52:02 +02:00
|
|
|
override def testOptions = TestFilter((name: String) => name.endsWith("Test")) :: Nil
|
2010-03-02 00:34:14 -05:00
|
|
|
}
|
|
|
|
|
|
2010-03-05 14:33:14 +01:00
|
|
|
class AkkaPersistenceParentProject(info: ProjectInfo) extends ParentProject(info) {
|
2010-04-06 12:45:09 +02:00
|
|
|
lazy val akka_persistence_common = project("akka-persistence-common", "akka-persistence-common",
|
2010-03-20 10:54:52 +01:00
|
|
|
new AkkaPersistenceCommonProject(_), akka_core)
|
2010-04-06 12:45:09 +02:00
|
|
|
lazy val akka_persistence_redis = project("akka-persistence-redis", "akka-persistence-redis",
|
2010-03-20 10:54:52 +01:00
|
|
|
new AkkaRedisProject(_), akka_persistence_common)
|
2010-04-06 12:45:09 +02:00
|
|
|
lazy val akka_persistence_mongo = project("akka-persistence-mongo", "akka-persistence-mongo",
|
2010-03-20 10:54:52 +01:00
|
|
|
new AkkaMongoProject(_), akka_persistence_common)
|
2010-04-06 12:45:09 +02:00
|
|
|
lazy val akka_persistence_cassandra = project("akka-persistence-cassandra", "akka-persistence-cassandra",
|
2010-03-20 10:54:52 +01:00
|
|
|
new AkkaCassandraProject(_), akka_persistence_common)
|
2010-03-02 00:34:14 -05:00
|
|
|
}
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaKernelProject(info: ProjectInfo) extends AkkaDefaultProject(info, distPath)
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaSpringProject(info: ProjectInfo) extends AkkaDefaultProject(info, distPath) {
|
2010-03-31 07:33:55 +02:00
|
|
|
val spring_beans = "org.springframework" % "spring-beans" % "3.0.1.RELEASE" % "compile"
|
|
|
|
|
val spring_context = "org.springframework" % "spring-context" % "3.0.1.RELEASE" % "compile"
|
|
|
|
|
|
2010-03-17 10:06:28 +01:00
|
|
|
// testing
|
2010-03-23 00:29:18 +01:00
|
|
|
val scalatest = "org.scalatest" % "scalatest" % SCALATEST_VERSION % "test"
|
2010-03-17 10:06:28 +01:00
|
|
|
val junit = "junit" % "junit" % "4.5" % "test"
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-08 17:02:01 +02:00
|
|
|
class AkkaJTAProject(info: ProjectInfo) extends AkkaDefaultProject(info, distPath) {
|
|
|
|
|
val atomikos_transactions = "com.atomikos" % "transactions" % "3.2.3" % "compile"
|
|
|
|
|
val atomikos_transactions_jta = "com.atomikos" % "transactions-jta" % "3.2.3" % "compile"
|
|
|
|
|
val atomikos_transactions_api = "com.atomikos" % "transactions-api" % "3.2.3" % "compile"
|
|
|
|
|
//val atomikos_transactions_util = "com.atomikos" % "transactions-util" % "3.2.3" % "compile"
|
|
|
|
|
val jta_spec = "org.apache.geronimo.specs" % "geronimo-jta_1.1_spec" % "1.1.1" % "compile"
|
|
|
|
|
}
|
|
|
|
|
|
2010-05-25 13:07:49 +02:00
|
|
|
// ================= TEST ==================
|
2010-04-01 10:06:43 +02:00
|
|
|
class AkkaFunTestProject(info: ProjectInfo) extends DefaultProject(info) {
|
2010-03-22 07:42:15 +01:00
|
|
|
val jackson_core_asl = "org.codehaus.jackson" % "jackson-core-asl" % "1.2.1" % "compile"
|
|
|
|
|
val stax_api = "javax.xml.stream" % "stax-api" % "1.0-2" % "compile"
|
2010-03-31 07:33:55 +02:00
|
|
|
val protobuf = "com.google.protobuf" % "protobuf-java" % "2.2.0" % "compile"
|
2010-03-02 23:44:16 -05:00
|
|
|
val grizzly = "com.sun.grizzly" % "grizzly-comet-webserver" % "1.9.18-i" % "compile"
|
2010-03-05 09:17:15 +01:00
|
|
|
val jersey_server = "com.sun.jersey" % "jersey-server" % JERSEY_VERSION % "compile"
|
|
|
|
|
val jersey_json = "com.sun.jersey" % "jersey-json" % JERSEY_VERSION % "compile"
|
|
|
|
|
val jersey_atom = "com.sun.jersey" % "jersey-atom" % JERSEY_VERSION % "compile"
|
|
|
|
|
// testing
|
2010-03-02 23:44:16 -05:00
|
|
|
val junit = "junit" % "junit" % "4.5" % "test"
|
|
|
|
|
val jmock = "org.jmock" % "jmock" % "2.4.0" % "test"
|
|
|
|
|
}
|
2010-05-25 13:07:49 +02:00
|
|
|
|
|
|
|
|
// ================= EXAMPLES ==================
|
|
|
|
|
class AkkaSampleAntsProject(info: ProjectInfo) extends DefaultSpdeProject(info) {
|
|
|
|
|
val scalaToolsSnapshots = ScalaToolsSnapshots
|
|
|
|
|
override def spdeSourcePath = mainSourcePath / "spde"
|
|
|
|
|
}
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaSampleChatProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath)
|
2010-04-14 23:50:26 +05:30
|
|
|
class AkkaSamplePubSubProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath)
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaSampleLiftProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath) {
|
2010-03-22 07:42:15 +01:00
|
|
|
val commons_logging = "commons-logging" % "commons-logging" % "1.1.1" % "compile"
|
2010-03-23 00:29:18 +01:00
|
|
|
val lift = "net.liftweb" % "lift-webkit" % LIFT_VERSION % "compile"
|
|
|
|
|
val lift_util = "net.liftweb" % "lift-util" % LIFT_VERSION % "compile"
|
2010-03-09 22:07:14 +01:00
|
|
|
val servlet = "javax.servlet" % "servlet-api" % "2.5" % "compile"
|
2010-03-05 09:17:15 +01:00
|
|
|
// testing
|
2010-03-19 08:14:00 +01:00
|
|
|
val jetty = "org.mortbay.jetty" % "jetty" % "6.1.22" % "test"
|
2010-03-02 23:44:16 -05:00
|
|
|
val junit = "junit" % "junit" % "4.5" % "test"
|
|
|
|
|
}
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaSampleRestJavaProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath)
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2010-05-04 10:40:58 +02:00
|
|
|
class AkkaSampleRemoteProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath)
|
|
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaSampleRestScalaProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath) {
|
2010-03-22 07:42:15 +01:00
|
|
|
val jsr311 = "javax.ws.rs" % "jsr311-api" % "1.1.1" % "compile"
|
2010-03-02 23:44:16 -05:00
|
|
|
}
|
2010-03-05 14:33:14 +01:00
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaSampleCamelProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath) {
|
2010-03-31 07:33:55 +02:00
|
|
|
val spring_jms = "org.springframework" % "spring-jms" % "3.0.1.RELEASE" % "compile"
|
2010-05-30 08:22:23 +02:00
|
|
|
val camel_jetty = "org.apache.camel" % "camel-jetty" % "2.3.0" % "compile"
|
|
|
|
|
val camel_jms = "org.apache.camel" % "camel-jms" % "2.3.0" % "compile"
|
|
|
|
|
val activemq_core = "org.apache.activemq" % "activemq-core" % "5.3.2" % "compile"
|
2010-03-16 06:45:04 +01:00
|
|
|
}
|
|
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaSampleSecurityProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath) {
|
2010-03-22 07:42:15 +01:00
|
|
|
val jsr311 = "javax.ws.rs" % "jsr311-api" % "1.1.1" % "compile"
|
2010-03-31 07:33:55 +02:00
|
|
|
val jsr250 = "javax.annotation" % "jsr250-api" % "1.0" % "compile"
|
2010-03-30 21:20:01 +02:00
|
|
|
val commons_codec = "commons-codec" % "commons-codec" % "1.3" % "compile"
|
2010-03-02 23:44:16 -05:00
|
|
|
}
|
|
|
|
|
|
2010-03-05 14:33:14 +01:00
|
|
|
class AkkaSamplesParentProject(info: ProjectInfo) extends ParentProject(info) {
|
2010-05-25 13:07:49 +02:00
|
|
|
lazy val akka_sample_ants = project("akka-sample-ants", "akka-sample-ants",
|
|
|
|
|
new AkkaSampleAntsProject(_), akka_core)
|
2010-04-06 12:45:09 +02:00
|
|
|
lazy val akka_sample_chat = project("akka-sample-chat", "akka-sample-chat",
|
2010-03-20 10:54:52 +01:00
|
|
|
new AkkaSampleChatProject(_), akka_kernel)
|
2010-04-14 23:50:26 +05:30
|
|
|
lazy val akka_sample_pubsub = project("akka-sample-pubsub", "akka-sample-pubsub",
|
|
|
|
|
new AkkaSamplePubSubProject(_), akka_kernel)
|
2010-04-06 12:45:09 +02:00
|
|
|
lazy val akka_sample_lift = project("akka-sample-lift", "akka-sample-lift",
|
2010-03-20 10:54:52 +01:00
|
|
|
new AkkaSampleLiftProject(_), akka_kernel)
|
2010-04-06 12:45:09 +02:00
|
|
|
lazy val akka_sample_rest_java = project("akka-sample-rest-java", "akka-sample-rest-java",
|
2010-03-20 10:54:52 +01:00
|
|
|
new AkkaSampleRestJavaProject(_), akka_kernel)
|
2010-04-06 12:45:09 +02:00
|
|
|
lazy val akka_sample_rest_scala = project("akka-sample-rest-scala", "akka-sample-rest-scala",
|
2010-03-20 10:54:52 +01:00
|
|
|
new AkkaSampleRestScalaProject(_), akka_kernel)
|
2010-04-06 12:45:09 +02:00
|
|
|
lazy val akka_sample_camel = project("akka-sample-camel", "akka-sample-camel",
|
2010-03-20 10:54:52 +01:00
|
|
|
new AkkaSampleCamelProject(_), akka_kernel)
|
2010-04-06 12:45:09 +02:00
|
|
|
lazy val akka_sample_security = project("akka-sample-security", "akka-sample-security",
|
|
|
|
|
new AkkaSampleSecurityProject(_), akka_kernel)
|
2010-05-04 10:40:58 +02:00
|
|
|
lazy val akka_sample_remote = project("akka-sample-remote", "akka-sample-remote",
|
|
|
|
|
new AkkaSampleRemoteProject(_), akka_kernel)
|
2010-03-10 17:16:10 +01:00
|
|
|
}
|
2010-04-01 10:06:43 +02:00
|
|
|
|
|
|
|
|
// ------------------------------------------------------------
|
|
|
|
|
// helper functions
|
|
|
|
|
def removeDupEntries(paths: PathFinder) =
|
|
|
|
|
Path.lazyPathFinder {
|
|
|
|
|
val mapped = paths.get map { p => (p.relativePath, p) }
|
|
|
|
|
(Map() ++ mapped).values.toList
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def allArtifacts = {
|
|
|
|
|
Path.fromFile(buildScalaInstance.libraryJar) +++
|
|
|
|
|
(removeDupEntries(runClasspath filter ClasspathUtilities.isArchive) +++
|
|
|
|
|
((outputPath ##) / defaultJarName) +++
|
|
|
|
|
mainResources +++
|
|
|
|
|
mainDependencies.scalaJars +++
|
|
|
|
|
descendents(info.projectPath, "*.conf") +++
|
2010-05-08 00:26:05 +02:00
|
|
|
descendents(info.projectPath / "scripts", "run_akka.sh") +++
|
2010-04-01 10:06:43 +02:00
|
|
|
descendents(info.projectPath / "dist", "*.jar") +++
|
|
|
|
|
descendents(info.projectPath / "deploy", "*.jar") +++
|
|
|
|
|
descendents(path("lib") ##, "*.jar") +++
|
|
|
|
|
descendents(configurationPath(Configurations.Compile) ##, "*.jar"))
|
|
|
|
|
.filter(jar => // remove redundant libs
|
2010-04-06 12:45:09 +02:00
|
|
|
!jar.toString.endsWith("stax-api-1.0.1.jar") ||
|
2010-04-01 10:06:43 +02:00
|
|
|
!jar.toString.endsWith("scala-library-2.7.7.jar")
|
2010-04-06 12:45:09 +02:00
|
|
|
)
|
2010-04-01 10:06:43 +02:00
|
|
|
}
|
2010-05-25 11:17:18 +02:00
|
|
|
|
2010-06-01 18:33:37 +02:00
|
|
|
def akkaArtifacts = descendents(info.projectPath / "dist", "*" + buildScalaVersion + "-" + version + ".jar")
|
|
|
|
|
|
2010-05-25 11:17:18 +02:00
|
|
|
// ------------------------------------------------------------
|
2010-04-07 21:09:15 +02:00
|
|
|
class AkkaDefaultProject(info: ProjectInfo, val deployPath: Path) extends DefaultProject(info) with DeployProject
|
2010-04-01 10:06:43 +02:00
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
trait DeployProject extends DefaultProject {
|
|
|
|
|
// defines where the deployTask copies jars to
|
|
|
|
|
def deployPath: Path
|
2010-04-06 12:45:09 +02:00
|
|
|
|
2010-04-07 21:09:15 +02:00
|
|
|
lazy val dist = distAction
|
2010-05-04 22:15:33 +02:00
|
|
|
def distAction = deployTask(jarPath, packageDocsJar, packageSrcJar, deployPath, true, true, true) dependsOn(
|
|
|
|
|
`package`, packageDocs, packageSrc) describedAs("Deploying")
|
|
|
|
|
def deployTask(jar: Path, docs: Path, src: Path, toDir: Path,
|
|
|
|
|
genJar: Boolean, genDocs: Boolean, genSource: Boolean) = task {
|
2010-04-07 21:09:15 +02:00
|
|
|
gen(jar, toDir, genJar, "Deploying bits") orElse
|
|
|
|
|
gen(docs, toDir, genDocs, "Deploying docs") orElse
|
|
|
|
|
gen(src, toDir, genSource, "Deploying sources")
|
2010-04-01 10:06:43 +02:00
|
|
|
}
|
2010-04-07 21:09:15 +02:00
|
|
|
private def gen(jar: Path, toDir: Path, flag: Boolean, msg: String): Option[String] =
|
|
|
|
|
if (flag) {
|
|
|
|
|
log.info(msg + " " + jar)
|
|
|
|
|
FileUtilities.copyFile(jar, toDir / jar.name, log)
|
|
|
|
|
} else None
|
2010-04-01 10:06:43 +02:00
|
|
|
}
|
2010-03-02 00:34:14 -05:00
|
|
|
}
|