Merge branch 'master' of git@github.com:jboner/akka
This commit is contained in:
commit
09ef57761a
1 changed files with 26 additions and 16 deletions
|
|
@ -5,7 +5,7 @@
|
||||||
import sbt._
|
import sbt._
|
||||||
import sbt.CompileOrder._
|
import sbt.CompileOrder._
|
||||||
import spde._
|
import spde._
|
||||||
|
|
||||||
import java.util.jar.Attributes
|
import java.util.jar.Attributes
|
||||||
import java.util.jar.Attributes.Name._
|
import java.util.jar.Attributes.Name._
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
@ -135,6 +135,24 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
||||||
<distribution>repo</distribution>
|
<distribution>repo</distribution>
|
||||||
</license>
|
</license>
|
||||||
</licenses>
|
</licenses>
|
||||||
|
|
||||||
|
// publish to local mvn
|
||||||
|
import Process._
|
||||||
|
lazy val publishLocalMvn = runMvnInstall
|
||||||
|
def runMvnInstall = task {
|
||||||
|
for(absPath <- akkaArtifacts.getPaths) {
|
||||||
|
val artifactRE = """(.*)/dist/(.*)_(.*).jar""".r
|
||||||
|
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.")
|
||||||
|
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
// subprojects
|
// subprojects
|
||||||
|
|
@ -254,9 +272,8 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
||||||
//val atomikos_transactions_util = "com.atomikos" % "transactions-util" % "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"
|
val jta_spec = "org.apache.geronimo.specs" % "geronimo-jta_1.1_spec" % "1.1.1" % "compile"
|
||||||
}
|
}
|
||||||
|
|
||||||
// ================= TESTS ==================
|
|
||||||
|
|
||||||
|
// examples
|
||||||
class AkkaFunTestProject(info: ProjectInfo) extends DefaultProject(info) {
|
class AkkaFunTestProject(info: ProjectInfo) extends DefaultProject(info) {
|
||||||
val jackson_core_asl = "org.codehaus.jackson" % "jackson-core-asl" % "1.2.1" % "compile"
|
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"
|
val stax_api = "javax.xml.stream" % "stax-api" % "1.0-2" % "compile"
|
||||||
|
|
@ -270,15 +287,7 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
||||||
val jmock = "org.jmock" % "jmock" % "2.4.0" % "test"
|
val jmock = "org.jmock" % "jmock" % "2.4.0" % "test"
|
||||||
}
|
}
|
||||||
|
|
||||||
// ================= EXAMPLES ==================
|
|
||||||
|
|
||||||
class AkkaSampleAntsProject(info: ProjectInfo) extends DefaultSpdeProject(info) {
|
|
||||||
val scalaToolsSnapshots = ScalaToolsSnapshots
|
|
||||||
override def spdeSourcePath = mainSourcePath / "spde"
|
|
||||||
}
|
|
||||||
|
|
||||||
class AkkaSampleChatProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath)
|
class AkkaSampleChatProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath)
|
||||||
|
|
||||||
class AkkaSamplePubSubProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath)
|
class AkkaSamplePubSubProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath)
|
||||||
|
|
||||||
class AkkaSampleLiftProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath) {
|
class AkkaSampleLiftProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath) {
|
||||||
|
|
@ -314,8 +323,6 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
||||||
}
|
}
|
||||||
|
|
||||||
class AkkaSamplesParentProject(info: ProjectInfo) extends ParentProject(info) {
|
class AkkaSamplesParentProject(info: ProjectInfo) extends ParentProject(info) {
|
||||||
lazy val akka_sample_ants = project("akka-sample-ants", "akka-sample-ants",
|
|
||||||
new AkkaSampleAntsProject(_), akka_core)
|
|
||||||
lazy val akka_sample_chat = project("akka-sample-chat", "akka-sample-chat",
|
lazy val akka_sample_chat = project("akka-sample-chat", "akka-sample-chat",
|
||||||
new AkkaSampleChatProject(_), akka_kernel)
|
new AkkaSampleChatProject(_), akka_kernel)
|
||||||
lazy val akka_sample_pubsub = project("akka-sample-pubsub", "akka-sample-pubsub",
|
lazy val akka_sample_pubsub = project("akka-sample-pubsub", "akka-sample-pubsub",
|
||||||
|
|
@ -359,6 +366,12 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
||||||
!jar.toString.endsWith("scala-library-2.7.7.jar")
|
!jar.toString.endsWith("scala-library-2.7.7.jar")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def akkaArtifacts = {
|
||||||
|
descendents(info.projectPath / "dist", "*" + buildScalaVersion + "-" + version + ".jar")
|
||||||
|
}
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
class AkkaDefaultProject(info: ProjectInfo, val deployPath: Path) extends DefaultProject(info) with DeployProject
|
class AkkaDefaultProject(info: ProjectInfo, val deployPath: Path) extends DefaultProject(info) with DeployProject
|
||||||
|
|
||||||
|
|
@ -367,17 +380,14 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
||||||
def deployPath: Path
|
def deployPath: Path
|
||||||
|
|
||||||
lazy val dist = distAction
|
lazy val dist = distAction
|
||||||
|
|
||||||
def distAction = deployTask(jarPath, packageDocsJar, packageSrcJar, deployPath, true, true, true) dependsOn(
|
def distAction = deployTask(jarPath, packageDocsJar, packageSrcJar, deployPath, true, true, true) dependsOn(
|
||||||
`package`, packageDocs, packageSrc) describedAs("Deploying")
|
`package`, packageDocs, packageSrc) describedAs("Deploying")
|
||||||
|
|
||||||
def deployTask(jar: Path, docs: Path, src: Path, toDir: Path,
|
def deployTask(jar: Path, docs: Path, src: Path, toDir: Path,
|
||||||
genJar: Boolean, genDocs: Boolean, genSource: Boolean) = task {
|
genJar: Boolean, genDocs: Boolean, genSource: Boolean) = task {
|
||||||
gen(jar, toDir, genJar, "Deploying bits") orElse
|
gen(jar, toDir, genJar, "Deploying bits") orElse
|
||||||
gen(docs, toDir, genDocs, "Deploying docs") orElse
|
gen(docs, toDir, genDocs, "Deploying docs") orElse
|
||||||
gen(src, toDir, genSource, "Deploying sources")
|
gen(src, toDir, genSource, "Deploying sources")
|
||||||
}
|
}
|
||||||
|
|
||||||
private def gen(jar: Path, toDir: Path, flag: Boolean, msg: String): Option[String] =
|
private def gen(jar: Path, toDir: Path, flag: Boolean, msg: String): Option[String] =
|
||||||
if (flag) {
|
if (flag) {
|
||||||
log.info(msg + " " + jar)
|
log.info(msg + " " + jar)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue