Formatting

This commit is contained in:
Viktor Klang 2010-08-09 10:09:26 +02:00
parent bc7326e9d6
commit d41f64df2f

View file

@ -723,29 +723,28 @@ class AkkaParentProject(info: ProjectInfo) extends DefaultProject(info) {
// ------------------------------------------------------------
class AkkaDefaultProject(info: ProjectInfo, val deployPath: Path) extends DefaultProject(info) with DeployProject with OSGiProject
}
trait DeployProject { self: BasicScalaProject =>
// defines where the deployTask copies jars to
def deployPath: Path
trait DeployProject { self: BasicScalaProject =>
// defines where the deployTask copies jars to
def deployPath: Path
lazy val dist = 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 {
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
lazy val dist = 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 {
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
gen(jar, toDir, genJar, "Deploying bits") orElse
gen(docs, toDir, genDocs, "Deploying docs") orElse
gen(src, toDir, genSource, "Deploying sources")
}
gen(jar, toDir, genJar, "Deploying bits") orElse
gen(docs, toDir, genDocs, "Deploying docs") orElse
gen(src, toDir, genSource, "Deploying sources")
}
}
trait OSGiProject extends BNDPlugin { self: DefaultProject =>
override def bndExportPackage = Seq("se.scalablesolutions.akka.*;version=%s".format(projectVersion.value))
}
trait OSGiProject extends BNDPlugin { self: DefaultProject =>
override def bndExportPackage = Seq("se.scalablesolutions.akka.*;version=%s".format(projectVersion.value))
}