From b94b91c14b0cf5365b2c20d149a5cc1a9d546dbe Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Mon, 9 May 2011 09:25:18 +0200 Subject: [PATCH 01/15] Update gfx --- .../src/main/scala/akka/util/AkkaLoader.scala | 68 ++++++++++++------- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/akka-actor/src/main/scala/akka/util/AkkaLoader.scala b/akka-actor/src/main/scala/akka/util/AkkaLoader.scala index 164f2da095..e6ebc28c3d 100644 --- a/akka-actor/src/main/scala/akka/util/AkkaLoader.scala +++ b/akka-actor/src/main/scala/akka/util/AkkaLoader.scala @@ -43,30 +43,50 @@ class AkkaLoader { } private def printBanner() { - println("==================================================") - println(" t") - println(" t t t") - println(" t t tt t") - println(" tt t t tt t") - println(" t ttttttt t ttt t") - println(" t tt ttt t ttt t") - println(" t t ttt t ttt t t") - println(" tt t ttt ttt ttt t") - println(" t t ttt ttt t tt t") - println(" t ttt ttt t t") - println(" tt ttt ttt t") - println(" ttt ttt") - println(" tttttttt ttt ttt ttt ttt tttttttt") - println(" ttt tt ttt ttt ttt ttt ttt ttt") - println(" ttt ttt ttt ttt ttt ttt ttt ttt") - println(" ttt ttt ttt ttt ttt tt ttt ttt") - println(" tttt ttttttttt tttttttt tttt") - println(" ttttttttt ttt ttt ttt ttt ttttttttt") - println(" ttt ttt ttt ttt ttt ttt ttt ttt") - println(" ttt ttt ttt ttt ttt ttt ttt ttt") - println(" ttt tt ttt ttt ttt ttt ttt ttt") - println(" tttttttt ttt ttt ttt ttt tttttttt") - println("==================================================") + println(""" +============================================================================== + + ZZ: + ZZZZ + ZZZZZZ + ZZZ' ZZZ + ~7 7ZZ' ZZZ + :ZZZ: IZZ' ZZZ + ,OZZZZ.~ZZ? ZZZ + ZZZZ' 'ZZZ$ ZZZ + . $ZZZ ~ZZ$ ZZZ + .=Z?. .ZZZO ~ZZ7 OZZ + .ZZZZ7..:ZZZ~ 7ZZZ ZZZ~ + .$ZZZ$Z+.ZZZZ ZZZ: ZZZ$ + .,ZZZZ?' =ZZO= .OZZ 'ZZZ + .$ZZZZ+ .ZZZZ IZZZ ZZZ$ + .ZZZZZ' .ZZZZ' .ZZZ$ ?ZZZ + .ZZZZZZ' .OZZZ? ?ZZZ 'ZZZ$ + .?ZZZZZZ' .ZZZZ? .ZZZ? 'ZZZO + .+ZZZZZZ?' .7ZZZZ' .ZZZZ :ZZZZ + .ZZZZZZ$' .?ZZZZZ' .~ZZZZ 'ZZZZ. + + + NNNNN $NNNN+ + NNNNN $NNNN+ + NNNNN $NNNN+ + NNNNN $NNNN+ + NNNNN $NNNN+ + =NNNNNNNNND$ NNNNN DDDDDD: $NNNN+ DDDDDN NDDNNNNNNNN, + NNNNNNNNNNNNND NNNNN DNNNNN $NNNN+ 8NNNNN= :NNNNNNNNNNNNNN + NNNNN$ DNNNNN NNNNN $NNNNN~ $NNNN+ NNNNNN NNNNN, :NNNNN+ + ?DN~ NNNNN NNNNN MNNNNN $NNNN+:NNNNN7 $ND =NNNNN + DNNNNN NNNNNDNNNN$ $NNNNDNNNNN :DNNNNN + ZNDNNNNNNNNND NNNNNNNNNND, $NNNNNNNNNNN DNDNNNNNNNNNN + NNNNNNNDDINNNNN NNNNNNNNNNND $NNNNNNNNNNND ONNNNNNND8+NNNNN + :NNNND NNNNN NNNNNN DNNNN, $NNNNNO 7NNNND NNNNNO :NNNNN + DNNNN NNNNN NNNNN DNNNN $NNNN+ 8NNNNN NNNNN $NNNNN + DNNNNO NNNNNN NNNNN NNNNN $NNNN+ NNNNN$ NNNND, ,NNNNND + NNNNNNDDNNNNNNNN NNNNN =NNNNN $NNNN+ DNNNN? DNNNNNNDNNNNNNNND + NNNNNNNNN NNNN$ NNNNN 8NNNND $NNNN+ NNNNN= ,DNNNNNNND NNNNN$ + +============================================================================== +""") println(" Running version " + Config.VERSION) println("==================================================") } From 44fb8bff7d91e9b15c4daa68f83624ede0655b35 Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Mon, 9 May 2011 21:26:17 +1200 Subject: [PATCH 02/15] Rework dist yet again --- project/build/AkkaDistProject.scala | 227 +++++++++++++++++++++++++++ project/build/AkkaProject.scala | 30 +++- project/build/DocParentProject.scala | 4 + 3 files changed, 260 insertions(+), 1 deletion(-) create mode 100644 project/build/AkkaDistProject.scala diff --git a/project/build/AkkaDistProject.scala b/project/build/AkkaDistProject.scala new file mode 100644 index 0000000000..440d337f86 --- /dev/null +++ b/project/build/AkkaDistProject.scala @@ -0,0 +1,227 @@ +/** + * Copyright (C) 2009-2011 Scalable Solutions AB + */ + +import sbt._ + +trait AkkaDistBaseProject extends DefaultProject { + def distOutputPath: Path + def distLibPath: Path + def distSrcPath: Path + def distDocPath: Path + def dist: Task +} + +trait AkkaDistProject extends AkkaDistBaseProject { + def distName: String + + val distFullName = distName + "-" + version + val distOutputBasePath = outputPath / "dist" + val distOutputPath = (distOutputBasePath ##) / distFullName + val distScalaLibPath = distOutputPath / "lib" + val distBinPath = distOutputPath / "bin" + val distConfigPath = distOutputPath / "config" + val distDeployPath = distOutputPath / "deploy" + val distLibPath = distOutputPath / "lib" / "akka" + val distSrcPath = distOutputPath / "src" / "akka" + val distDocPath = distOutputPath / "doc" / "akka" + val distDocJarsPath = distDocPath / "api" / "jars" + val distSharePath = Path.userHome / ".ivy2" / "dist" / distFullName + val distArchiveName = distFullName + ".zip" + val distArchive = (distOutputBasePath ##) / distArchiveName + + def distConfigSources = info.projectPath / "config" * "*" + def distScriptSources = info.projectPath / "scripts" * "*" + + lazy val distExclusiveProperty = systemOptional[Boolean]("dist.exclusive", false) + + def distExclusive = distExclusiveProperty.value + + def scalaDependency = if (distExclusive) Path.emptyPathFinder else buildLibraryJar + + def allProjectDependencies = topologicalSort.dropRight(1) + + def distDependencies = { + allProjectDependencies.flatMap( p => p match { + case adp: AkkaDistBaseProject => Some(adp) + case _ => None + }) + } + + def distDependencyJarNames = { + val jarNames = distDependencies.flatMap { dist => + (dist.distLibPath ** "*.jar").get.map(_.name) ++ + (dist.distSrcPath ** "*.jar").get.map(_.name) ++ + (dist.distDocPath ** "*.jar").get.map(_.name) + } + Set(jarNames: _*) + } + + def distClasspath = runClasspath + + def filterOutExcludes(paths: PathFinder) = { + if (distExclusive) { + val exclude = distDependencyJarNames + def include(path: Path) = !exclude(path.name) + paths.filter(include) + } else paths + } + + def dependencyJars(filter: Path => Boolean) = distClasspath.filter(filter) + + def isJar(path: Path) = path.name.endsWith(".jar") + + def isSrcJar(path: Path) = isJar(path) && path.name.contains("-sources") + + def isDocJar(path: Path) = isJar(path) && path.name.contains("-docs") + + def isClassJar(path: Path) = isJar(path) && !isSrcJar(path) && !isDocJar(path) + + def projectDependencies = allProjectDependencies -- distDependencies + + def projectDependencyJars(f: PackagePaths => Path) = { + Path.lazyPathFinder { + projectDependencies.flatMap( p => p match { + case pp: PackagePaths => Some(f(pp)) + case _ => None + }) + } + } + + def distLibs = filterOutExcludes(dependencyJars(isClassJar) +++ projectDependencyJars(_.jarPath)) + + def distSrcJars = filterOutExcludes(dependencyJars(isSrcJar) +++ projectDependencyJars(_.packageSrcJar)) + + def distDocJars = filterOutExcludes(dependencyJars(isDocJar) +++ projectDependencyJars(_.packageDocsJar)) + + def distShareSources = (distOutputPath ##) ** "*" + + lazy val dist = (distAction dependsOn (distBase, `package`, packageSrc, packageDocs) + describedAs("Create a distribution.")) + + def distAction = task { + copyFiles(scalaDependency, distScalaLibPath) orElse + copyFiles(distLibs, distLibPath) orElse + copyFiles(distSrcJars, distSrcPath) orElse + copyFiles(distDocJars, distDocJarsPath) orElse + copyFiles(distConfigSources, distConfigPath) orElse + copyScripts(distScriptSources, distBinPath) orElse + copyPaths(distShareSources, distSharePath) orElse + FileUtilities.zip(List(distOutputPath), distArchive, true, log) + } + + lazy val distBase = distBaseAction dependsOn (distClean) describedAs "Create the dist base." + + def distBaseAction = task { + if (!distExclusive) { + distDependencies.map( dist => { + val allFiles = (dist.distOutputPath ##) ** "*" + copyPaths(allFiles, distOutputPath) + }).foldLeft(None: Option[String])(_ orElse _) + } else None + } + + def distDependencyTasks: Seq[ManagedTask] = distDependencies.map(_.dist) + + lazy val distClean = (distCleanAction dependsOn (distDependencyTasks: _*) + describedAs "Clean the dist target dir.") + + def distCleanAction = task { + FileUtilities.clean(distOutputPath, log) orElse + FileUtilities.clean(distSharePath, log) + } + + def copyFiles(from: PathFinder, to: Path): Option[String] = { + if (from.get.isEmpty) None + else FileUtilities.copyFlat(from.get, to, log).left.toOption + } + + def copyPaths(from: PathFinder, to: Path): Option[String] = { + if (from.get.isEmpty) None + else FileUtilities.copy(from.get, to, log).left.toOption + } + + def copyScripts(from: PathFinder, to: Path): Option[String] = { + from.get.map { script => + val target = to / script.name + FileUtilities.copyFile(script, target, log) orElse + setExecutable(target, script.asFile.canExecute) + }.foldLeft(None: Option[String])(_ orElse _) + } + + def setExecutable(target: Path, executable: Boolean): Option[String] = { + val success = target.asFile.setExecutable(executable, false) + if (success) None else Some("Couldn't set permissions of " + target) + } + + override def disableCrossPaths = true + + def doNothing = task { None } + override def compileAction = doNothing + override def testCompileAction = doNothing + override def testAction = doNothing + override def packageAction = doNothing + override def publishLocalAction = doNothing + override def deliverLocalAction = doNothing + override def publishAction = doNothing + override def deliverAction = doNothing +} + +trait AkkaDistDocProject extends AkkaDistProject { + def distDocName = distName + + def findDocParent(project: Project): DocParentProject = project.info.parent match { + case Some(dpp: DocParentProject) => dpp + case Some(p: Project) => findDocParent(p) + case _ => error("Parent project is not a DocParentProject") + } + + def docParent = findDocParent(this) + + override def distAction = super.distAction dependsOn (distApi, distRstDocs) + + val apiSources = (docParent.docOutputPath ##) ** "*" + val apiPath = distDocPath / "api" / "html" / distDocName + + lazy val distApi = task { + copyPaths(apiSources, apiPath) + } dependsOn (distBase, docParent.doc) + + val rstDocsPath = docParent.info.projectPath / "akka-docs" + + lazy val rstDocs = task { + import Process._ + log.info("Building docs...") + val exitCode = ((new java.lang.ProcessBuilder("make", "clean", "html", "pdf")) directory rstDocsPath.asFile) ! log + if (exitCode > 0) Some("Failed to build docs.") else None + } + + val rstDocsBuildPath = rstDocsPath / "_build" + val rstDocsHtmlSources = (rstDocsBuildPath / "html" ##) ** "*" + val rstDocsPdfSources = (rstDocsBuildPath / "latex" ##) ** "*.pdf" + + val rstDocsOutputPath = distDocPath / "docs" + val rstDocsHtmlPath = rstDocsOutputPath / "html" / distDocName + val rstDocsPdfPath = rstDocsOutputPath / "pdf" + + lazy val distRstDocs = task { + copyPaths(rstDocsHtmlSources, rstDocsHtmlPath) orElse + copyPaths(rstDocsPdfSources, rstDocsPdfPath) + } dependsOn (distBase, rstDocs) +} + +/* + * For wiring together akka and akka-modules. + */ +trait AkkaDistSharedProject extends AkkaDistBaseProject { + def distName: String + + val distFullName = distName + "-" + version + val distOutputPath = Path.userHome / ".ivy2" / "dist" / distFullName + + val distLibPath = distOutputPath / "lib" / "akka" + val distSrcPath = distOutputPath / "src" / "akka" + val distDocPath = distOutputPath / "doc" / "akka" + + lazy val dist = task { None } +} diff --git a/project/build/AkkaProject.scala b/project/build/AkkaProject.scala index 640f88d1c4..e7f5f14acd 100644 --- a/project/build/AkkaProject.scala +++ b/project/build/AkkaProject.scala @@ -10,7 +10,7 @@ import sbt._ import sbt.CompileOrder._ import spde._ -class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with ExecProject with DocParentProject { +class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with ExecProject with DocParentProject { akkaParent => // ------------------------------------------------------------------------------------------------------------------- // Compile settings @@ -444,6 +444,34 @@ class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with Exec publishTask(publishIvyModule, releaseConfiguration) dependsOn (deliver, publishLocal, makePom) } } + + // ------------------------------------------------------------------------------------------------------------------- + // 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 + + class AkkaActorsDistProject(info: ProjectInfo) extends DefaultProject(info) with AkkaDistDocProject { + def distName = "akka-actors" + override def distDocName = "akka" + } + + class AkkaCoreDistProject(info: ProjectInfo)extends DefaultProject(info) with AkkaDistProject { + def distName = "akka-core" + } + } } trait OsgiProject extends BNDPlugin { self: DefaultProject => diff --git a/project/build/DocParentProject.scala b/project/build/DocParentProject.scala index ebe339ab2f..8200273ea1 100644 --- a/project/build/DocParentProject.scala +++ b/project/build/DocParentProject.scala @@ -1,3 +1,7 @@ +/** + * Copyright (C) 2009-2011 Scalable Solutions AB + */ + import sbt._ trait DocParentProject extends ParentProject { From 1e87f138cdb86bf7a94e07ac84eeff9556c814c0 Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Mon, 9 May 2011 21:47:36 +1200 Subject: [PATCH 03/15] Don't deliver akka dist project --- project/build/AkkaProject.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project/build/AkkaProject.scala b/project/build/AkkaProject.scala index e7f5f14acd..a03d1ddde0 100644 --- a/project/build/AkkaProject.scala +++ b/project/build/AkkaProject.scala @@ -204,7 +204,10 @@ class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with Exec override def artifacts = Set(Artifact(artifactID, "pom", "pom")) - override def deliverProjectDependencies = super.deliverProjectDependencies.toList - akka_samples.projectID - akka_tutorials.projectID + override def deliverProjectDependencies = (super.deliverProjectDependencies.toList + - akka_samples.projectID + - akka_tutorials.projectID + - akkaDist.projectID) // ------------------------------------------------------------------------------------------------------------------- // Build release From 692820e73449132b583548b8c8576f7c95191fe7 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Mon, 9 May 2011 17:05:28 +0200 Subject: [PATCH 04/15] Fixing #846 --- akka-docs/additional/index.rst | 2 +- akka-docs/additional/{recipes.rst => recipies.rst} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename akka-docs/additional/{recipes.rst => recipies.rst} (100%) diff --git a/akka-docs/additional/index.rst b/akka-docs/additional/index.rst index f36b5ce7cd..7398db601b 100644 --- a/akka-docs/additional/index.rst +++ b/akka-docs/additional/index.rst @@ -7,7 +7,7 @@ Additional Information add-on-modules articles benchmarks - recipes + recipies external-sample-projects companies-using-akka third-party-integrations diff --git a/akka-docs/additional/recipes.rst b/akka-docs/additional/recipies.rst similarity index 100% rename from akka-docs/additional/recipes.rst rename to akka-docs/additional/recipies.rst From 48f2ceef3e6776f08fd14e475497b8d4a48f7303 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Mon, 9 May 2011 17:06:28 +0200 Subject: [PATCH 05/15] Adding some docs to AllForOne and OneForOne --- .../main/scala/akka/config/SupervisionConfig.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/akka-actor/src/main/scala/akka/config/SupervisionConfig.scala b/akka-actor/src/main/scala/akka/config/SupervisionConfig.scala index 6b66f3415d..ee4f93280f 100644 --- a/akka-actor/src/main/scala/akka/config/SupervisionConfig.scala +++ b/akka-actor/src/main/scala/akka/config/SupervisionConfig.scala @@ -46,6 +46,12 @@ object Supervision { if (maxNrOfRetries < 0) None else Some(maxNrOfRetries), if (withinTimeRange < 0) None else Some(withinTimeRange)) } + /** + * Restart all actors linked to the same supervisor when one fails, + * trapExit = which Throwables should be intercepted + * maxNrOfRetries = the number of times an actor is allowed to be restarted + * withinTimeRange = millisecond time window for maxNrOfRetries, negative means no window + */ case class AllForOneStrategy(override val trapExit: List[Class[_ <: Throwable]], maxNrOfRetries: Option[Int] = None, withinTimeRange: Option[Int] = None) extends FaultHandlingStrategy(trapExit) { @@ -68,6 +74,12 @@ object Supervision { if (maxNrOfRetries < 0) None else Some(maxNrOfRetries), if (withinTimeRange < 0) None else Some(withinTimeRange)) } + /** + * Restart an actor when it fails + * trapExit = which Throwables should be intercepted + * maxNrOfRetries = the number of times an actor is allowed to be restarted + * withinTimeRange = millisecond time window for maxNrOfRetries, negative means no window + */ case class OneForOneStrategy(override val trapExit: List[Class[_ <: Throwable]], maxNrOfRetries: Option[Int] = None, withinTimeRange: Option[Int] = None) extends FaultHandlingStrategy(trapExit) { From b72b455f60607b2f6456be576d86e8eeb4f85c11 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Mon, 9 May 2011 17:06:37 +0200 Subject: [PATCH 06/15] Removing unused imports --- akka-actor/src/main/scala/akka/routing/Pool.scala | 2 -- 1 file changed, 2 deletions(-) diff --git a/akka-actor/src/main/scala/akka/routing/Pool.scala b/akka-actor/src/main/scala/akka/routing/Pool.scala index 5a906df851..c95a80b0fc 100644 --- a/akka-actor/src/main/scala/akka/routing/Pool.scala +++ b/akka-actor/src/main/scala/akka/routing/Pool.scala @@ -5,7 +5,6 @@ package akka.routing import akka.actor.{Actor, ActorRef, PoisonPill} -import java.util.concurrent.TimeUnit /** * Actor pooling @@ -47,7 +46,6 @@ trait ActorPool { */ trait DefaultActorPool extends ActorPool { this: Actor => import ActorPool._ - import collection.mutable.LinkedList import akka.actor.MaximumNumberOfRestartsWithinTimeRangeReached protected var _delegates = Vector[ActorRef]() From b30a1643572f938a7f626abb102b0bab3c8f790a Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Mon, 9 May 2011 17:52:30 +0200 Subject: [PATCH 07/15] Removing logging.rst and servlet.rst and moving the guice-integration.rst into the Java section --- .../{pending => java}/guice-integration.rst | 8 ++-- akka-docs/java/index.rst | 1 + akka-docs/pending/logging.rst | 4 -- akka-docs/pending/servlet.rst | 41 ------------------- 4 files changed, 6 insertions(+), 48 deletions(-) rename akka-docs/{pending => java}/guice-integration.rst (93%) delete mode 100644 akka-docs/pending/logging.rst delete mode 100644 akka-docs/pending/servlet.rst diff --git a/akka-docs/pending/guice-integration.rst b/akka-docs/java/guice-integration.rst similarity index 93% rename from akka-docs/pending/guice-integration.rst rename to akka-docs/java/guice-integration.rst index 6392bddfd3..de00b701cb 100644 --- a/akka-docs/pending/guice-integration.rst +++ b/akka-docs/java/guice-integration.rst @@ -45,6 +45,8 @@ Retrieve the external Guice dependency -------------------------------------- The external dependency can be retrieved like this: -``_ -Ext ext = manager.getExternalDependency(Ext.class); -``_ + +.. code-block:: java + + Ext ext = manager.getExternalDependency(Ext.class); + diff --git a/akka-docs/java/index.rst b/akka-docs/java/index.rst index 54b2adf201..1d09b3e437 100644 --- a/akka-docs/java/index.rst +++ b/akka-docs/java/index.rst @@ -17,3 +17,4 @@ Java API fault-tolerance dispatchers routing + guice-integration diff --git a/akka-docs/pending/logging.rst b/akka-docs/pending/logging.rst deleted file mode 100644 index 833f2f419b..0000000000 --- a/akka-docs/pending/logging.rst +++ /dev/null @@ -1,4 +0,0 @@ -Logging -======= - -Logging has been removed. See the `Event Handler `_. diff --git a/akka-docs/pending/servlet.rst b/akka-docs/pending/servlet.rst deleted file mode 100644 index 6859657a72..0000000000 --- a/akka-docs/pending/servlet.rst +++ /dev/null @@ -1,41 +0,0 @@ -Akka Servlet -============ - -= - -Module stability: **STABLE** - -Akka has a servlet; ‘se.scalablesolutions.akka.comet.AkkaServlet’ that can use to deploy your Akka-based application in an external Servlet container. All you need to do is to add the servlet to the ‘web.xml’, set ‘$AKKA_HOME’ to the root of the distribution (needs the ‘$AKKA_HOME/config/*’ files) and add the JARs in the ‘$AKKA_HOME/lib’ to your classpath (or put them in the ‘WEB-INF/lib’ directory in the WAR file). - -Also, you need to add the Akka initialize/cleanup listener in web.xml - -.. code-block:: xml - - - ... - - se.scalablesolutions.akka.servlet.Initializer - - ... - - -And to support REST actors and/or comet actors, you need to add the following servlet declaration: - -``_ - -... - - Akka - - se.scalablesolutions.akka.comet.AkkaServlet - - se.scalablesolutions.akka.rest.AkkaServlet - - - * - Akka - -... - - -``_ From 867dc0ffc7d12aab640c360e5291ae783ddb1156 Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Tue, 10 May 2011 09:57:57 +1200 Subject: [PATCH 08/15] Change the automatic release branch to avoid conflicts --- project/scripts/release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/scripts/release b/project/scripts/release index 4fa1cef623..2fd97d8693 100644 --- a/project/scripts/release +++ b/project/scripts/release @@ -1,4 +1,4 @@ -sh git checkout -b release-{{release.arg1}} +sh git checkout -b releasing-{{release.arg1}} clean script find-replace.sh {{project.version}} {{release.arg1}} script find-replace.sh //[[:space:]]*release:[[:space:]]* From a6f8a9f3ce33de42b0657d385761570a0e2c446b Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Tue, 10 May 2011 12:32:38 +1200 Subject: [PATCH 09/15] Include docs and api in release process --- project/build/AkkaProject.scala | 35 +++++++++++-- ...kkaDistProject.scala => DistProject.scala} | 49 ++++++++----------- project/build/DocParentProject.scala | 37 +++++++++----- 3 files changed, 74 insertions(+), 47 deletions(-) rename project/build/{AkkaDistProject.scala => DistProject.scala} (82%) diff --git a/project/build/AkkaProject.scala b/project/build/AkkaProject.scala index a03d1ddde0..746f9d2f39 100644 --- a/project/build/AkkaProject.scala +++ b/project/build/AkkaProject.scala @@ -165,7 +165,7 @@ class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with Exec // Scaladocs // ------------------------------------------------------------------------------------------------------------------- - override def docProjectDependencies = dependencies.toList - akka_samples + override def apiProjectDependencies = dependencies.toList - akka_samples // ------------------------------------------------------------------------------------------------------------------- // Publishing @@ -215,7 +215,6 @@ class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with Exec val localReleasePath = outputPath / "release" / version.toString val localReleaseRepository = Resolver.file("Local Release", localReleasePath / "repository" asFile) - val localReleaseDownloads = localReleasePath / "downloads" override def otherRepositories = super.otherRepositories ++ Seq(localReleaseRepository) @@ -224,7 +223,33 @@ class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with Exec publishTask(publishIvyModule, releaseConfiguration) dependsOn (deliver, publishLocal, makePom) } - lazy val buildRelease = task { None } dependsOn publishRelease + lazy val buildRelease = task { + log.info("Built release.") + None + } dependsOn (publishRelease, releaseApi, releaseDocs, releaseDownloads) + + 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 { + val distArchive = akkaDist.akkaCoreDist.distArchive + val downloadsPath = localReleasePath / "downloads" + FileUtilities.copy(distArchive.get, downloadsPath, log).left.toOption + } dependsOn (dist) + + lazy val dist = task { None } // dummy task // ------------------------------------------------------------------------------------------------------------------- // akka-actor subproject @@ -466,12 +491,12 @@ class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with Exec override def publishAction = doNothing override def deliverAction = doNothing - class AkkaActorsDistProject(info: ProjectInfo) extends DefaultProject(info) with AkkaDistDocProject { + class AkkaActorsDistProject(info: ProjectInfo) extends DefaultProject(info) with DistDocProject { def distName = "akka-actors" override def distDocName = "akka" } - class AkkaCoreDistProject(info: ProjectInfo)extends DefaultProject(info) with AkkaDistProject { + class AkkaCoreDistProject(info: ProjectInfo)extends DefaultProject(info) with DistProject { def distName = "akka-core" } } diff --git a/project/build/AkkaDistProject.scala b/project/build/DistProject.scala similarity index 82% rename from project/build/AkkaDistProject.scala rename to project/build/DistProject.scala index 440d337f86..df6b348396 100644 --- a/project/build/AkkaDistProject.scala +++ b/project/build/DistProject.scala @@ -4,7 +4,7 @@ import sbt._ -trait AkkaDistBaseProject extends DefaultProject { +trait DistBaseProject extends DefaultProject { def distOutputPath: Path def distLibPath: Path def distSrcPath: Path @@ -12,7 +12,7 @@ trait AkkaDistBaseProject extends DefaultProject { def dist: Task } -trait AkkaDistProject extends AkkaDistBaseProject { +trait DistProject extends DistBaseProject { def distName: String val distFullName = distName + "-" + version @@ -43,7 +43,7 @@ trait AkkaDistProject extends AkkaDistBaseProject { def distDependencies = { allProjectDependencies.flatMap( p => p match { - case adp: AkkaDistBaseProject => Some(adp) + case adp: DistBaseProject => Some(adp) case _ => None }) } @@ -94,7 +94,7 @@ trait AkkaDistProject extends AkkaDistBaseProject { def distDocJars = filterOutExcludes(dependencyJars(isDocJar) +++ projectDependencyJars(_.packageDocsJar)) - def distShareSources = (distOutputPath ##) ** "*" + def distShareSources = ((distOutputPath ##) ***) lazy val dist = (distAction dependsOn (distBase, `package`, packageSrc, packageDocs) describedAs("Create a distribution.")) @@ -115,7 +115,7 @@ trait AkkaDistProject extends AkkaDistBaseProject { def distBaseAction = task { if (!distExclusive) { distDependencies.map( dist => { - val allFiles = (dist.distOutputPath ##) ** "*" + val allFiles = ((dist.distOutputPath ##) ***) copyPaths(allFiles, distOutputPath) }).foldLeft(None: Option[String])(_ orElse _) } else None @@ -167,7 +167,7 @@ trait AkkaDistProject extends AkkaDistBaseProject { override def deliverAction = doNothing } -trait AkkaDistDocProject extends AkkaDistProject { +trait DistDocProject extends DistProject { def distDocName = distName def findDocParent(project: Project): DocParentProject = project.info.parent match { @@ -178,42 +178,33 @@ trait AkkaDistDocProject extends AkkaDistProject { def docParent = findDocParent(this) - override def distAction = super.distAction dependsOn (distApi, distRstDocs) + override def distAction = super.distAction dependsOn (distApi, distDocs) - val apiSources = (docParent.docOutputPath ##) ** "*" + val apiSources = ((docParent.apiOutputPath ##) ***) val apiPath = distDocPath / "api" / "html" / distDocName lazy val distApi = task { copyPaths(apiSources, apiPath) - } dependsOn (distBase, docParent.doc) + } dependsOn (distBase, docParent.api) - val rstDocsPath = docParent.info.projectPath / "akka-docs" + val docsBuildPath = docParent.docsPath / "_build" + val docsHtmlSources = ((docsBuildPath / "html" ##) ***) + val docsPdfSources = (docsBuildPath / "latex" ##) ** "*.pdf" - lazy val rstDocs = task { - import Process._ - log.info("Building docs...") - val exitCode = ((new java.lang.ProcessBuilder("make", "clean", "html", "pdf")) directory rstDocsPath.asFile) ! log - if (exitCode > 0) Some("Failed to build docs.") else None - } + val docsOutputPath = distDocPath / "docs" + val docsHtmlPath = docsOutputPath / "html" / distDocName + val docsPdfPath = docsOutputPath / "pdf" - val rstDocsBuildPath = rstDocsPath / "_build" - val rstDocsHtmlSources = (rstDocsBuildPath / "html" ##) ** "*" - val rstDocsPdfSources = (rstDocsBuildPath / "latex" ##) ** "*.pdf" - - val rstDocsOutputPath = distDocPath / "docs" - val rstDocsHtmlPath = rstDocsOutputPath / "html" / distDocName - val rstDocsPdfPath = rstDocsOutputPath / "pdf" - - lazy val distRstDocs = task { - copyPaths(rstDocsHtmlSources, rstDocsHtmlPath) orElse - copyPaths(rstDocsPdfSources, rstDocsPdfPath) - } dependsOn (distBase, rstDocs) + lazy val distDocs = task { + copyPaths(docsHtmlSources, docsHtmlPath) orElse + copyPaths(docsPdfSources, docsPdfPath) + } dependsOn (distBase, docParent.docs) } /* * For wiring together akka and akka-modules. */ -trait AkkaDistSharedProject extends AkkaDistBaseProject { +trait DistSharedProject extends DistBaseProject { def distName: String val distFullName = distName + "-" + version diff --git a/project/build/DocParentProject.scala b/project/build/DocParentProject.scala index 8200273ea1..0bb08c4879 100644 --- a/project/build/DocParentProject.scala +++ b/project/build/DocParentProject.scala @@ -5,32 +5,43 @@ import sbt._ trait DocParentProject extends ParentProject { - def docOutputPath = outputPath / "doc" / "main" / "api" + def apiOutputPath = outputPath / "doc" / "main" / "api" - def docProjectDependencies = topologicalSort.dropRight(1) + def apiProjectDependencies = topologicalSort.dropRight(1) - def docMainSources = - docProjectDependencies.map { + def apiMainSources = + apiProjectDependencies.map { case sp: ScalaPaths => sp.mainSources case _ => Path.emptyPathFinder }.foldLeft(Path.emptyPathFinder)(_ +++ _) - def docCompileClasspath = - docProjectDependencies.map { + def apiCompileClasspath = + apiProjectDependencies.map { case bsp: BasicScalaProject => bsp.compileClasspath case _ => Path.emptyPathFinder }.foldLeft(Path.emptyPathFinder)(_ +++ _) - def docLabel = "main" + def apiLabel = "main" - def docMaxErrors = 100 + def apiMaxErrors = 100 - def docOptions: Seq[String] = Seq.empty + def apiOptions: Seq[String] = Seq.empty - lazy val doc = docAction describedAs ("Create combined scaladoc for all subprojects") + lazy val api = apiAction describedAs ("Create combined scaladoc for all subprojects.") - def docAction = task { - val scaladoc = new Scaladoc(docMaxErrors, buildCompiler) - scaladoc(docLabel, docMainSources.get, docCompileClasspath.get, docOutputPath, docOptions, log) + def apiAction = task { + val scaladoc = new Scaladoc(apiMaxErrors, buildCompiler) + scaladoc(apiLabel, apiMainSources.get, apiCompileClasspath.get, apiOutputPath, apiOptions, log) + } + + val docsPath = info.projectPath / "akka-docs" + + lazy val docs = docsAction describedAs ("Create the reStructuredText documentation.") + + def docsAction = task { + import Process._ + log.info("Building docs...") + val exitCode = ((new java.lang.ProcessBuilder("make", "clean", "html", "pdf")) directory docsPath.asFile) ! log + if (exitCode > 0) Some("Failed to build docs.") else None } } From a769fb3640dacf297cda8c56aae019eb90785330 Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Tue, 10 May 2011 14:09:34 +1200 Subject: [PATCH 10/15] Update header in html docs --- akka-docs/_sphinx/static/logo.png | Bin 7499 -> 7305 bytes akka-docs/_sphinx/themes/akka/layout.html | 8 ++++---- .../_sphinx/themes/akka/static/akka.css_t | 7 +++++-- akka-docs/conf.py | 3 --- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/akka-docs/_sphinx/static/logo.png b/akka-docs/_sphinx/static/logo.png index a6bc9c3b98ed53f4c76165a2a52034a67e5d6ab0..558dfed6eb6d2ef0677478a00c546f0b4a484916 100644 GIT binary patch literal 7305 zcmeAS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*7Ym%{@TY(3g4G<*w>eVfq}u()z4*} HQ$iB}ON*{e diff --git a/akka-docs/_sphinx/themes/akka/layout.html b/akka-docs/_sphinx/themes/akka/layout.html index db443c3fe5..15d7a9b951 100644 --- a/akka-docs/_sphinx/themes/akka/layout.html +++ b/akka-docs/_sphinx/themes/akka/layout.html @@ -38,11 +38,11 @@ {%- else %} {%- if logo -%} - + {%- endif -%} -

- {{ shorttitle|e }}

-

{{ title|striptags|e }}

+

+ {{ shorttitle|e }}

+

Version {{ version|e }}

{%- endif %} {%- endblock %} diff --git a/akka-docs/_sphinx/themes/akka/static/akka.css_t b/akka-docs/_sphinx/themes/akka/static/akka.css_t index f05e86bb6a..146ba31623 100644 --- a/akka-docs/_sphinx/themes/akka/static/akka.css_t +++ b/akka-docs/_sphinx/themes/akka/static/akka.css_t @@ -112,13 +112,16 @@ div.header h2 { font-size: 1.3em; font-weight: normal; letter-spacing: 1px; - text-transform: uppercase; - color: #aaa; + color: {{ theme_headingcolor }}; border: 0; margin-top: -3px; padding: 0; } +div.header img.leftlogo { + float: left; +} + div.header img.rightlogo { float: right; } diff --git a/akka-docs/conf.py b/akka-docs/conf.py index 712a3d10c8..f6a0c67069 100644 --- a/akka-docs/conf.py +++ b/akka-docs/conf.py @@ -28,9 +28,6 @@ show_authors = True # -- Options for HTML output --------------------------------------------------- html_theme = 'akka' -html_theme_options = { - 'full_logo': 'true' - } html_theme_path = ['_sphinx/themes'] html_title = 'Akka Documentation' From 5e63ebc36ea6b92ee9da61acb173c10a7e23a72a Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Tue, 10 May 2011 14:30:00 +1200 Subject: [PATCH 11/15] Fix new api task --- project/build/DocParentProject.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project/build/DocParentProject.scala b/project/build/DocParentProject.scala index 0bb08c4879..1e7bf0266c 100644 --- a/project/build/DocParentProject.scala +++ b/project/build/DocParentProject.scala @@ -27,13 +27,15 @@ trait DocParentProject extends ParentProject { def apiOptions: Seq[String] = Seq.empty - lazy val api = apiAction describedAs ("Create combined scaladoc for all subprojects.") + lazy val api = apiAction dependsOn (doc) describedAs ("Create combined scaladoc for all subprojects.") def apiAction = task { val scaladoc = new Scaladoc(apiMaxErrors, buildCompiler) scaladoc(apiLabel, apiMainSources.get, apiCompileClasspath.get, apiOutputPath, apiOptions, log) } + lazy val doc = task { None } // dummy task + val docsPath = info.projectPath / "akka-docs" lazy val docs = docsAction describedAs ("Create the reStructuredText documentation.") From c581e4be28f5696c2cc7a70f42ae4b6b6880f339 Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Tue, 10 May 2011 14:40:05 +1200 Subject: [PATCH 12/15] Update loader banner and version --- .../src/main/scala/akka/util/AkkaLoader.scala | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/akka-actor/src/main/scala/akka/util/AkkaLoader.scala b/akka-actor/src/main/scala/akka/util/AkkaLoader.scala index e6ebc28c3d..c780cb48f3 100644 --- a/akka-actor/src/main/scala/akka/util/AkkaLoader.scala +++ b/akka-actor/src/main/scala/akka/util/AkkaLoader.scala @@ -65,29 +65,29 @@ class AkkaLoader { .?ZZZZZZ' .ZZZZ? .ZZZ? 'ZZZO .+ZZZZZZ?' .7ZZZZ' .ZZZZ :ZZZZ .ZZZZZZ$' .?ZZZZZ' .~ZZZZ 'ZZZZ. - - - NNNNN $NNNN+ - NNNNN $NNNN+ - NNNNN $NNNN+ - NNNNN $NNNN+ - NNNNN $NNNN+ - =NNNNNNNNND$ NNNNN DDDDDD: $NNNN+ DDDDDN NDDNNNNNNNN, - NNNNNNNNNNNNND NNNNN DNNNNN $NNNN+ 8NNNNN= :NNNNNNNNNNNNNN - NNNNN$ DNNNNN NNNNN $NNNNN~ $NNNN+ NNNNNN NNNNN, :NNNNN+ - ?DN~ NNNNN NNNNN MNNNNN $NNNN+:NNNNN7 $ND =NNNNN - DNNNNN NNNNNDNNNN$ $NNNNDNNNNN :DNNNNN - ZNDNNNNNNNNND NNNNNNNNNND, $NNNNNNNNNNN DNDNNNNNNNNNN - NNNNNNNDDINNNNN NNNNNNNNNNND $NNNNNNNNNNND ONNNNNNND8+NNNNN - :NNNND NNNNN NNNNNN DNNNN, $NNNNNO 7NNNND NNNNNO :NNNNN - DNNNN NNNNN NNNNN DNNNN $NNNN+ 8NNNNN NNNNN $NNNNN - DNNNNO NNNNNN NNNNN NNNNN $NNNN+ NNNNN$ NNNND, ,NNNNND - NNNNNNDDNNNNNNNN NNNNN =NNNNN $NNNN+ DNNNN? DNNNNNNDNNNNNNNND + + + NNNNN $NNNN+ + NNNNN $NNNN+ + NNNNN $NNNN+ + NNNNN $NNNN+ + NNNNN $NNNN+ + =NNNNNNNNND$ NNNNN DDDDDD: $NNNN+ DDDDDN NDDNNNNNNNN, + NNNNNNNNNNNNND NNNNN DNNNNN $NNNN+ 8NNNNN= :NNNNNNNNNNNNNN + NNNNN$ DNNNNN NNNNN $NNNNN~ $NNNN+ NNNNNN NNNNN, :NNNNN+ + ?DN~ NNNNN NNNNN MNNNNN $NNNN+:NNNNN7 $ND =NNNNN + DNNNNN NNNNNDNNNN$ $NNNNDNNNNN :DNNNNN + ZNDNNNNNNNNND NNNNNNNNNND, $NNNNNNNNNNN DNDNNNNNNNNNN + NNNNNNNDDINNNNN NNNNNNNNNNND $NNNNNNNNNNND ONNNNNNND8+NNNNN + :NNNND NNNNN NNNNNN DNNNN, $NNNNNO 7NNNND NNNNNO :NNNNN + DNNNN NNNNN NNNNN DNNNN $NNNN+ 8NNNNN NNNNN $NNNNN + DNNNNO NNNNNN NNNNN NNNNN $NNNN+ NNNNN$ NNNND, ,NNNNND + NNNNNNDDNNNNNNNN NNNNN =NNNNN $NNNN+ DNNNN? DNNNNNNDNNNNNNNND NNNNNNNNN NNNN$ NNNNN 8NNNND $NNNN+ NNNNN= ,DNNNNNNND NNNNN$ ============================================================================== -""") - println(" Running version " + Config.VERSION) - println("==================================================") + Running version %s +============================================================================== +""".format(Config.VERSION)) } } From 8dec4bcbc415d80dd1b1907d9bc099437c4fb65a Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Tue, 10 May 2011 16:37:31 +1200 Subject: [PATCH 13/15] Update tutorials and include source in the distribution --- .../intro/getting-started-first-java.rst | 95 +++++++++++-------- .../getting-started-first-scala-eclipse.rst | 58 ++++++----- .../intro/getting-started-first-scala.rst | 70 ++++++++------ akka-tutorials/akka-tutorial-first/README | 7 ++ akka-tutorials/akka-tutorial-first/pom.xml | 4 +- .../project/build.properties | 5 + .../project/build/Project.scala | 3 + .../project/plugins/Plugins.scala | 6 ++ .../java/akka/tutorial/first/java/Pi.java | 25 ----- .../src/main/scala/Pi.scala | 26 ----- akka-tutorials/akka-tutorial-second/README | 7 ++ akka-tutorials/akka-tutorial-second/pom.xml | 43 +++++++++ .../project/build.properties | 5 + .../project/build/Project.scala | 3 + .../project/plugins/Plugins.scala | 6 ++ .../java/akka/tutorial/java/second/Pi.java | 25 ----- .../src/main/scala/Pi.scala | 26 ----- project/build/AkkaProject.scala | 23 ++++- 18 files changed, 243 insertions(+), 194 deletions(-) create mode 100644 akka-tutorials/akka-tutorial-first/README create mode 100644 akka-tutorials/akka-tutorial-first/project/build.properties create mode 100644 akka-tutorials/akka-tutorial-first/project/build/Project.scala create mode 100644 akka-tutorials/akka-tutorial-first/project/plugins/Plugins.scala create mode 100644 akka-tutorials/akka-tutorial-second/README create mode 100644 akka-tutorials/akka-tutorial-second/pom.xml create mode 100644 akka-tutorials/akka-tutorial-second/project/build.properties create mode 100644 akka-tutorials/akka-tutorial-second/project/build/Project.scala create mode 100644 akka-tutorials/akka-tutorial-second/project/plugins/Plugins.scala diff --git a/akka-docs/intro/getting-started-first-java.rst b/akka-docs/intro/getting-started-first-java.rst index 32e8f36672..920f64521f 100644 --- a/akka-docs/intro/getting-started-first-java.rst +++ b/akka-docs/intro/getting-started-first-java.rst @@ -37,7 +37,7 @@ To check out the code using Git invoke the following:: $ git clone git://github.com/jboner/akka.git -Then you can navigate down to the tutorial:: +Then you can navigate down to the tutorial:: $ cd akka/akka-tutorials/akka-tutorial-first @@ -58,39 +58,49 @@ You can test your installation by invoking ``java``:: Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326) Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode) + Downloading and installing Akka ------------------------------- -To build and run the tutorial sample from the command line, you have to download Akka. If you prefer to use SBT to build and run the sample then you can skip this section and jump to the next one. +To build and run the tutorial sample from the command line, you have to download +Akka. If you prefer to use SBT to build and run the sample then you can skip +this section and jump to the next one. -Let's get the ``akka-1.1`` distribution of Akka core (not Akka Modules) from `http://akka.io/downloads `_. Once you have downloaded the distribution unzip it in the folder you would like to have Akka installed in, in my case I choose to install it in ``/Users/jboner/tools/``, simply by unzipping it to this directory. +Let's get the ``akka-actors-1.1.zip`` distribution of Akka from +http://akka.io/downloads/ which includes everything we need for this +tutorial. Once you have downloaded the distribution unzip it in the folder you +would like to have Akka installed in. In my case I choose to install it in +``/Users/jboner/tools/``, simply by unzipping it to this directory. -You need to do one more thing in order to install Akka properly: set the ``AKKA_HOME`` environment variable to the root of the distribution. In my case I'm opening up a shell, navigating down to the distribution, and setting the ``AKKA_HOME`` variable:: +You need to do one more thing in order to install Akka properly: set the +``AKKA_HOME`` environment variable to the root of the distribution. In my case +I'm opening up a shell, navigating down to the distribution, and setting the +``AKKA_HOME`` variable:: - $ cd /Users/jboner/tools/akka-1.1 + $ cd /Users/jboner/tools/akka-actors-1.1 $ export AKKA_HOME=`pwd` $ echo $AKKA_HOME - /Users/jboner/tools/akka-1.1 + /Users/jboner/tools/akka-actors-1.1 The distribution looks like this:: - $ ls -l - total 16944 - drwxr-xr-x 7 jboner staff 238 Apr 6 11:15 . - drwxr-xr-x 28 jboner staff 952 Apr 6 11:16 .. - drwxr-xr-x 17 jboner staff 578 Apr 6 11:16 deploy - drwxr-xr-x 26 jboner staff 884 Apr 6 11:16 dist - drwxr-xr-x 3 jboner staff 102 Apr 6 11:15 lib_managed - -rwxr-xr-x 1 jboner staff 8674105 Apr 6 11:15 scala-library.jar - drwxr-xr-x 4 jboner staff 136 Apr 6 11:16 scripts + $ ls -1 + config + doc + lib + src -- In the ``dist`` directory we have the Akka JARs, including sources and docs. -- In the ``lib_managed/compile`` directory we have Akka's dependency JARs. -- In the ``deploy`` directory we have the sample JARs. -- In the ``scripts`` directory we have scripts for running Akka. -- Finally ``scala-library.jar`` is the JAR for the latest Scala distribution that Akka depends on. +- In the ``config`` directory we have the Akka conf files. +- In the ``doc`` directory we have the documentation, API, doc JARs, and also + the source files for the tutorials. +- In the ``lib`` directory we have the Scala and Akka JARs. +- In the ``src`` directory we have the source JARs for Akka. -The only JAR we will need for this tutorial (apart from the ``scala-library.jar`` JAR) is the ``akka-actor-1.1.jar`` JAR in the ``dist`` directory. This is a self-contained JAR with zero dependencies and contains everything we need to write a system using Actors. + +The only JAR we will need for this tutorial (apart from the +``scala-library.jar`` JAR) is the ``akka-actor-1.1.jar`` JAR in the ``lib/akka`` +directory. This is a self-contained JAR with zero dependencies and contains +everything we need to write a system using Actors. Akka is very modular and has many JARs for containing different features. The core distribution has seven modules: @@ -102,7 +112,10 @@ Akka is very modular and has many JARs for containing different features. The co - ``akka-slf4j-1.1.jar`` -- SLF4J Event Handler Listener for logging with SLF4J - ``akka-testkit-1.1.jar`` -- Toolkit for testing Actors -We also have Akka Modules containing add-on modules outside the core of Akka. You can download the Akka Modules distribution from TODO. It contains Akka core as well. We will not be needing any modules there today, but for your information the module JARs are these: +We also have Akka Modules containing add-on modules outside the core of +Akka. You can download the Akka Modules distribution from TODO. It contains Akka +core as well. We will not be needing any modules there today, but for your +information the module JARs are these: - ``akka-kernel-1.1.jar`` -- Akka microkernel for running a bare-bones mini application server (embeds Jetty etc.) - ``akka-amqp-1.1.jar`` -- AMQP integration @@ -112,6 +125,7 @@ We also have Akka Modules containing add-on modules outside the core of Akka. Yo - ``akka-spring-1.1.jar`` -- Spring framework integration - ``akka-osgi-dependencies-bundle-1.1.jar`` -- OSGi support + Downloading and installing Maven -------------------------------- @@ -178,7 +192,7 @@ We also need to edit the ``pom.xml`` build file. Let's add the dependency we nee Akka Akka Maven2 Repository - http://www.scalablesolutions.se/akka/repository/ + http://akka.io/repository/ @@ -695,35 +709,42 @@ Before we package it up and run it, let's take a look at the full code now, with } } + Run it as a command line application ------------------------------------ -To build and run the tutorial from the command line, you need to have the Scala library JAR on the classpath. +If you have not typed in (or copied) the code for the tutorial as +``$AKKA_HOME/tutorial/akka/tutorial/first/java/Pi.java`` then now is the +time. When that's done open up a shell and step in to the Akka distribution +(``cd $AKKA_HOME``). -Scala can be downloaded from `http://www.scala-lang.org/downloads `_. Browse there and download the Scala 2.9.0.RC1 release. If you pick the ``tgz`` or ``zip`` distribution then just unzip it where you want it installed. If you pick the IzPack Installer then double click on it and follow the instructions. +First we need to compile the source file. That is done with Java's compiler +``javac``. Our application depends on the ``akka-actor-1.1.jar`` and the +``scala-library.jar`` JAR files, so let's add them to the compiler classpath +when we compile the source:: -The ``scala-library.jar`` resides in the ``scala-2.9.0.RC1/lib`` directory. Copy that to your project directory. + $ javac -cp lib/scala-library.jar:lib/akka/akka-actor-1.1.jar tutorial/akka/tutorial/first/java/Pi.java -If you have not typed in (or copied) the code for the tutorial as ``$AKKA_HOME/tutorial/akka/tutorial/first/java/Pi.java`` then now is the time. When that's done open up a shell and step in to the Akka distribution (``cd $AKKA_HOME``). - -First we need to compile the source file. That is done with Java's compiler ``javac``. Our application depends on the ``akka-actor-1.1.jar`` and the ``scala-library.jar`` JAR files, so let's add them to the compiler classpath when we compile the source:: - - $ javac -cp dist/akka-actor-1.1.jar:scala-library.jar tutorial/Pi.scala - -When we have compiled the source file we are ready to run the application. This is done with ``java`` but yet again we need to add the ``akka-actor-1.1.jar`` and the ``scala-library.jar`` JAR files to the classpath as well as the classes we compiled ourselves:: +When we have compiled the source file we are ready to run the application. This +is done with ``java`` but yet again we need to add the ``akka-actor-1.1.jar`` +and the ``scala-library.jar`` JAR files to the classpath as well as the classes +we compiled ourselves:: $ java \ - -cp dist/akka-actor-1.1.jar:scala-library.jar:tutorial \ + -cp lib/scala-library.jar:lib/akka/akka-actor-1.1.jar:tutorial \ akka.tutorial.java.first.Pi - AKKA_HOME is defined as [/Users/jboner/src/akka-stuff/akka-core] - loading config from [/Users/jboner/src/akka-stuff/akka-core/config/akka.conf]. + AKKA_HOME is defined as [/Users/jboner/tools/akka-actors-1.1] + loading config from [/Users/jboner/tools/akka-actors-1.1/config/akka.conf]. Pi estimate: 3.1435501812459323 Calculation time: 822 millis Yippee! It is working. -If you have not defined the ``AKKA_HOME`` environment variable then Akka can't find the ``akka.conf`` configuration file and will print out a ``Can’t load akka.conf`` warning. This is ok since it will then just use the defaults. +If you have not defined the ``AKKA_HOME`` environment variable then Akka can't +find the ``akka.conf`` configuration file and will print out a ``Can’t load +akka.conf`` warning. This is ok since it will then just use the defaults. + Run it inside Maven ------------------- diff --git a/akka-docs/intro/getting-started-first-scala-eclipse.rst b/akka-docs/intro/getting-started-first-scala-eclipse.rst index b4380490ef..f34cfb75f3 100644 --- a/akka-docs/intro/getting-started-first-scala-eclipse.rst +++ b/akka-docs/intro/getting-started-first-scala-eclipse.rst @@ -43,39 +43,49 @@ You can test your installation by invoking ``java``:: Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326) Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode) + Downloading and installing Akka ------------------------------- -To build and run the tutorial sample from the command line, you have to download Akka. If you prefer to use SBT to build and run the sample then you can skip this section and jump to the next one. +To build and run the tutorial sample from the command line, you have to download +Akka. If you prefer to use SBT to build and run the sample then you can skip +this section and jump to the next one. -Let's get the ``akka-1.1`` distribution of Akka core (not Akka Modules) from `http://akka.io/downloads `_. Once you have downloaded the distribution unzip it in the folder you would like to have Akka installed in, in my case I choose to install it in ``/Users/jboner/tools/``, simply by unzipping it to this directory. +Let's get the ``akka-actors-1.1.zip`` distribution of Akka from +http://akka.io/downloads/ which includes everything we need for this +tutorial. Once you have downloaded the distribution unzip it in the folder you +would like to have Akka installed in. In my case I choose to install it in +``/Users/jboner/tools/``, simply by unzipping it to this directory. -You need to do one more thing in order to install Akka properly: set the ``AKKA_HOME`` environment variable to the root of the distribution. In my case I'm opening up a shell, navigating down to the distribution, and setting the ``AKKA_HOME`` variable:: +You need to do one more thing in order to install Akka properly: set the +``AKKA_HOME`` environment variable to the root of the distribution. In my case +I'm opening up a shell, navigating down to the distribution, and setting the +``AKKA_HOME`` variable:: - $ cd /Users/jboner/tools/akka-1.1 + $ cd /Users/jboner/tools/akka-actors-1.1 $ export AKKA_HOME=`pwd` $ echo $AKKA_HOME - /Users/jboner/tools/akka-1.1 + /Users/jboner/tools/akka-actors-1.1 The distribution looks like this:: - $ ls -l - total 16944 - drwxr-xr-x 7 jboner staff 238 Apr 6 11:15 . - drwxr-xr-x 28 jboner staff 952 Apr 6 11:16 .. - drwxr-xr-x 17 jboner staff 578 Apr 6 11:16 deploy - drwxr-xr-x 26 jboner staff 884 Apr 6 11:16 dist - drwxr-xr-x 3 jboner staff 102 Apr 6 11:15 lib_managed - -rwxr-xr-x 1 jboner staff 8674105 Apr 6 11:15 scala-library.jar - drwxr-xr-x 4 jboner staff 136 Apr 6 11:16 scripts + $ ls -1 + config + doc + lib + src -- In the ``dist`` directory we have the Akka JARs, including sources and docs. -- In the ``lib_managed/compile`` directory we have Akka's dependency JARs. -- In the ``deploy`` directory we have the sample JARs. -- In the ``scripts`` directory we have scripts for running Akka. -- Finally ``scala-library.jar`` is the JAR for the latest Scala distribution that Akka depends on. +- In the ``config`` directory we have the Akka conf files. +- In the ``doc`` directory we have the documentation, API, doc JARs, and also + the source files for the tutorials. +- In the ``lib`` directory we have the Scala and Akka JARs. +- In the ``src`` directory we have the source JARs for Akka. -The only JAR we will need for this tutorial (apart from the ``scala-library.jar`` JAR) is the ``akka-actor-1.1.jar`` JAR in the ``dist`` directory. This is a self-contained JAR with zero dependencies and contains everything we need to write a system using Actors. + +The only JAR we will need for this tutorial (apart from the +``scala-library.jar`` JAR) is the ``akka-actor-1.1.jar`` JAR in the ``lib/akka`` +directory. This is a self-contained JAR with zero dependencies and contains +everything we need to write a system using Actors. Akka is very modular and has many JARs for containing different features. The core distribution has seven modules: @@ -84,10 +94,13 @@ Akka is very modular and has many JARs for containing different features. The co - ``akka-remote-1.1.jar`` -- Remote Actors - ``akka-stm-1.1.jar`` -- STM (Software Transactional Memory), transactors and transactional datastructures - ``akka-http-1.1.jar`` -- Akka Mist for continuation-based asynchronous HTTP and also Jersey integration -- ``akka-slf4j-1.1.jar`` -- SLF4J Event Handler Listener +- ``akka-slf4j-1.1.jar`` -- SLF4J Event Handler Listener for logging with SLF4J - ``akka-testkit-1.1.jar`` -- Toolkit for testing Actors -We also have Akka Modules containing add-on modules outside the core of Akka. You can download the Akka Modules distribution from TODO. It contains Akka core as well. We will not be needing any modules there today, but for your information the module JARs are these: +We also have Akka Modules containing add-on modules outside the core of +Akka. You can download the Akka Modules distribution from TODO. It contains Akka +core as well. We will not be needing any modules there today, but for your +information the module JARs are these: - ``akka-kernel-1.1.jar`` -- Akka microkernel for running a bare-bones mini application server (embeds Jetty etc.) - ``akka-amqp-1.1.jar`` -- AMQP integration @@ -97,6 +110,7 @@ We also have Akka Modules containing add-on modules outside the core of Akka. Yo - ``akka-spring-1.1.jar`` -- Spring framework integration - ``akka-osgi-dependencies-bundle-1.1.jar`` -- OSGi support + Downloading and installing the Scala IDE for Eclipse ---------------------------------------------------- diff --git a/akka-docs/intro/getting-started-first-scala.rst b/akka-docs/intro/getting-started-first-scala.rst index 07cfec7548..b6e5fca400 100644 --- a/akka-docs/intro/getting-started-first-scala.rst +++ b/akka-docs/intro/getting-started-first-scala.rst @@ -58,39 +58,49 @@ You can test your installation by invoking ``java``:: Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326) Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode) + Downloading and installing Akka ------------------------------- -To build and run the tutorial sample from the command line, you have to download Akka. If you prefer to use SBT to build and run the sample then you can skip this section and jump to the next one. +To build and run the tutorial sample from the command line, you have to download +Akka. If you prefer to use SBT to build and run the sample then you can skip +this section and jump to the next one. -Let's get the ``akka-1.1`` distribution of Akka core (not Akka Modules) from `http://akka.io/downloads `_. Once you have downloaded the distribution unzip it in the folder you would like to have Akka installed in, in my case I choose to install it in ``/Users/jboner/tools/``, simply by unzipping it to this directory. +Let's get the ``akka-actors-1.1.zip`` distribution of Akka from +http://akka.io/downloads/ which includes everything we need for this +tutorial. Once you have downloaded the distribution unzip it in the folder you +would like to have Akka installed in. In my case I choose to install it in +``/Users/jboner/tools/``, simply by unzipping it to this directory. -You need to do one more thing in order to install Akka properly: set the ``AKKA_HOME`` environment variable to the root of the distribution. In my case I'm opening up a shell, navigating down to the distribution, and setting the ``AKKA_HOME`` variable:: +You need to do one more thing in order to install Akka properly: set the +``AKKA_HOME`` environment variable to the root of the distribution. In my case +I'm opening up a shell, navigating down to the distribution, and setting the +``AKKA_HOME`` variable:: - $ cd /Users/jboner/tools/akka-1.1 + $ cd /Users/jboner/tools/akka-actors-1.1 $ export AKKA_HOME=`pwd` $ echo $AKKA_HOME - /Users/jboner/tools/akka-1.1 + /Users/jboner/tools/akka-actors-1.1 The distribution looks like this:: - $ ls -l - total 16944 - drwxr-xr-x 7 jboner staff 238 Apr 6 11:15 . - drwxr-xr-x 28 jboner staff 952 Apr 6 11:16 .. - drwxr-xr-x 17 jboner staff 578 Apr 6 11:16 deploy - drwxr-xr-x 26 jboner staff 884 Apr 6 11:16 dist - drwxr-xr-x 3 jboner staff 102 Apr 6 11:15 lib_managed - -rwxr-xr-x 1 jboner staff 8674105 Apr 6 11:15 scala-library.jar - drwxr-xr-x 4 jboner staff 136 Apr 6 11:16 scripts + $ ls -1 + config + doc + lib + src -- In the ``dist`` directory we have the Akka JARs, including sources and docs. -- In the ``lib_managed/compile`` directory we have Akka's dependency JARs. -- In the ``deploy`` directory we have the sample JARs. -- In the ``scripts`` directory we have scripts for running Akka. -- Finally ``scala-library.jar`` is the JAR for the latest Scala distribution that Akka depends on. +- In the ``config`` directory we have the Akka conf files. +- In the ``doc`` directory we have the documentation, API, doc JARs, and also + the source files for the tutorials. +- In the ``lib`` directory we have the Scala and Akka JARs. +- In the ``src`` directory we have the source JARs for Akka. -The only JAR we will need for this tutorial (apart from the ``scala-library.jar`` JAR) is the ``akka-actor-1.1.jar`` JAR in the ``dist`` directory. This is a self-contained JAR with zero dependencies and contains everything we need to write a system using Actors. + +The only JAR we will need for this tutorial (apart from the +``scala-library.jar`` JAR) is the ``akka-actor-1.1.jar`` JAR in the ``lib/akka`` +directory. This is a self-contained JAR with zero dependencies and contains +everything we need to write a system using Actors. Akka is very modular and has many JARs for containing different features. The core distribution has seven modules: @@ -99,10 +109,13 @@ Akka is very modular and has many JARs for containing different features. The co - ``akka-remote-1.1.jar`` -- Remote Actors - ``akka-stm-1.1.jar`` -- STM (Software Transactional Memory), transactors and transactional datastructures - ``akka-http-1.1.jar`` -- Akka Mist for continuation-based asynchronous HTTP and also Jersey integration -- ``akka-slf4j-1.1.jar`` -- SLF4J Event Handler Listener +- ``akka-slf4j-1.1.jar`` -- SLF4J Event Handler Listener for logging with SLF4J - ``akka-testkit-1.1.jar`` -- Toolkit for testing Actors -We also have Akka Modules containing add-on modules outside the core of Akka. You can download the Akka Modules distribution from TODO. It contains Akka core as well. We will not be needing any modules there today, but for your information the module JARs are these: +We also have Akka Modules containing add-on modules outside the core of +Akka. You can download the Akka Modules distribution from TODO. It contains Akka +core as well. We will not be needing any modules there today, but for your +information the module JARs are these: - ``akka-kernel-1.1.jar`` -- Akka microkernel for running a bare-bones mini application server (embeds Jetty etc.) - ``akka-amqp-1.1.jar`` -- AMQP integration @@ -112,6 +125,7 @@ We also have Akka Modules containing add-on modules outside the core of Akka. Yo - ``akka-spring-1.1.jar`` -- Spring framework integration - ``akka-osgi-dependencies-bundle-1.1.jar`` -- OSGi support + Downloading and installing Scala -------------------------------- @@ -171,9 +185,7 @@ Now we need to create a project definition using our Akka SBT plugin. We do that import sbt._ - class TutorialOneProject(info: ProjectInfo) extends DefaultProject(info) with AkkaProject { - val akkaRepo = "Akka Repo" at "http://akka.io/repository" - } + class TutorialOneProject(info: ProjectInfo) extends DefaultProject(info) with AkkaProject The magic is in mixing in the ``AkkaProject`` trait. @@ -507,15 +519,15 @@ If you have not typed in (or copied) the code for the tutorial as ``$AKKA_HOME/t First we need to compile the source file. That is done with Scala's compiler ``scalac``. Our application depends on the ``akka-actor-1.1.jar`` JAR file, so let's add that to the compiler classpath when we compile the source:: - $ scalac -cp dist/akka-actor-1.1.jar tutorial/Pi.scala + $ scalac -cp lib/akka/akka-actor-1.1.jar tutorial/Pi.scala When we have compiled the source file we are ready to run the application. This is done with ``java`` but yet again we need to add the ``akka-actor-1.1.jar`` JAR file to the classpath, and this time we also need to add the Scala runtime library ``scala-library.jar`` and the classes we compiled ourselves:: $ java \ - -cp dist/akka-actor-1.1.jar:scala-library.jar:tutorial \ + -cp lib/scala-library.jar:lib/akka/akka-actor-1.1.jar:. \ akka.tutorial.first.scala.Pi - AKKA_HOME is defined as [/Users/jboner/src/akka-stuff/akka-core] - loading config from [/Users/jboner/src/akka-stuff/akka-core/config/akka.conf]. + AKKA_HOME is defined as [/Users/jboner/tools/akka-actors-1.1] + loading config from [/Users/jboner/tools/akka-actors-1.1/config/akka.conf]. Pi estimate: 3.1435501812459323 Calculation time: 858 millis diff --git a/akka-tutorials/akka-tutorial-first/README b/akka-tutorials/akka-tutorial-first/README new file mode 100644 index 0000000000..f4b42f631f --- /dev/null +++ b/akka-tutorials/akka-tutorial-first/README @@ -0,0 +1,7 @@ +================ + First Tutorial +================ + +This is the source code for the first tutorial. + +See the Akka Documentation for information about this tutorial. diff --git a/akka-tutorials/akka-tutorial-first/pom.xml b/akka-tutorials/akka-tutorial-first/pom.xml index e6b1758877..b3e9f7319c 100644 --- a/akka-tutorials/akka-tutorial-first/pom.xml +++ b/akka-tutorials/akka-tutorial-first/pom.xml @@ -8,7 +8,7 @@ akka.tutorial.first.java akka-tutorial-first-java jar - 1.0-SNAPSHOT + 1.2-SNAPSHOT http://akka.io @@ -23,7 +23,7 @@ Akka Akka Maven2 Repository - http://www.scalablesolutions.se/akka/repository/ + http://akka.io/repository/ diff --git a/akka-tutorials/akka-tutorial-first/project/build.properties b/akka-tutorials/akka-tutorial-first/project/build.properties new file mode 100644 index 0000000000..bcee7b19c1 --- /dev/null +++ b/akka-tutorials/akka-tutorial-first/project/build.properties @@ -0,0 +1,5 @@ +project.organization=akka.tutorial.first.scala +project.name=akka-tutorial-first-scala +project.version=1.2-SNAPSHOT +build.scala.versions=2.9.0.RC3 +sbt.version=0.7.6.RC0 diff --git a/akka-tutorials/akka-tutorial-first/project/build/Project.scala b/akka-tutorials/akka-tutorial-first/project/build/Project.scala new file mode 100644 index 0000000000..975f2ce970 --- /dev/null +++ b/akka-tutorials/akka-tutorial-first/project/build/Project.scala @@ -0,0 +1,3 @@ +import sbt._ + +class TutorialOneProject(info: ProjectInfo) extends DefaultProject(info) with AkkaProject diff --git a/akka-tutorials/akka-tutorial-first/project/plugins/Plugins.scala b/akka-tutorials/akka-tutorial-first/project/plugins/Plugins.scala new file mode 100644 index 0000000000..aa263a988e --- /dev/null +++ b/akka-tutorials/akka-tutorial-first/project/plugins/Plugins.scala @@ -0,0 +1,6 @@ +import sbt._ + +class Plugins(info: ProjectInfo) extends PluginDefinition(info) { + val akkaRepo = "Akka Repo" at "http://akka.io/repository" + val akkaPlugin = "se.scalablesolutions.akka" % "akka-sbt-plugin" % "1.2-SNAPSHOT" +} diff --git a/akka-tutorials/akka-tutorial-first/src/main/java/akka/tutorial/first/java/Pi.java b/akka-tutorials/akka-tutorial-first/src/main/java/akka/tutorial/first/java/Pi.java index 24264b52a7..bb081af751 100644 --- a/akka-tutorials/akka-tutorial-first/src/main/java/akka/tutorial/first/java/Pi.java +++ b/akka-tutorials/akka-tutorial-first/src/main/java/akka/tutorial/first/java/Pi.java @@ -18,31 +18,6 @@ import akka.routing.UntypedLoadBalancer; import java.util.concurrent.CountDownLatch; -/** - * First part in Akka tutorial for Java. - *

- * Calculates Pi. - *

- * Run on command line: - *

- *   $ cd akka-1.1
- *   $ export AKKA_HOME=`pwd`
- *   $ javac -cp dist/akka-actor-1.2-SNAPSHOT.jar:scala-library.jar akka/tutorial/first/java/Pi.java
- *   $ java -cp dist/akka-actor-1.2-SNAPSHOT.jar:scala-library.jar:. akka.tutorial.first.java.Pi
- *   $ ...
- * 
- *

- * Run it in Maven: - *

- *   $ mvn
- *   > scala:console
- *   > val pi = new akka.tutorial.first.java.Pi
- *   > pi.calculate(4, 10000, 10000)
- *   > ...
- * 
- * - * @author Jonas Bonér - */ public class Pi { public static void main(String[] args) throws Exception { diff --git a/akka-tutorials/akka-tutorial-first/src/main/scala/Pi.scala b/akka-tutorials/akka-tutorial-first/src/main/scala/Pi.scala index 6164ae00cb..51fcfac45d 100644 --- a/akka-tutorials/akka-tutorial-first/src/main/scala/Pi.scala +++ b/akka-tutorials/akka-tutorial-first/src/main/scala/Pi.scala @@ -12,32 +12,6 @@ import Routing._ import System.{currentTimeMillis => now} import java.util.concurrent.CountDownLatch -/** - * First part in Akka tutorial. - *

- * Calculates Pi. - *

- * Run on command line: - *

- *   $ cd akka-1.1
- *   $ export AKKA_HOME=`pwd`
- *   $ scalac -cp dist/akka-actor-1.2-SNAPSHOT.jar Pi.scala
- *   $ java -cp dist/akka-actor-1.2-SNAPSHOT.jar:scala-library.jar:. akka.tutorial.first.scala.Pi
- *   $ ...
- * 
- *

- * Run it in SBT: - *

- *   $ sbt
- *   > update
- *   > console
- *   > akka.tutorial.first.scala.Pi.calculate(nrOfWorkers = 4, nrOfElements = 10000, nrOfMessages = 10000)
- *   > ...
- *   > :quit
- * 
- * - * @author Jonas Bonér - */ object Pi extends App { calculate(nrOfWorkers = 4, nrOfElements = 10000, nrOfMessages = 10000) diff --git a/akka-tutorials/akka-tutorial-second/README b/akka-tutorials/akka-tutorial-second/README new file mode 100644 index 0000000000..ed31bbca22 --- /dev/null +++ b/akka-tutorials/akka-tutorial-second/README @@ -0,0 +1,7 @@ +================= + Second Tutorial +================= + +This is the source code for the second tutorial. + +See the Akka Documentation for information about this tutorial. diff --git a/akka-tutorials/akka-tutorial-second/pom.xml b/akka-tutorials/akka-tutorial-second/pom.xml new file mode 100644 index 0000000000..cf7c46fd3b --- /dev/null +++ b/akka-tutorials/akka-tutorial-second/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + + akka-tutorial-second-java + akka.tutorial.second.java + akka-tutorial-second-java + jar + 1.2-SNAPSHOT + http://akka.io + + + + se.scalablesolutions.akka + akka-actor + 1.2-SNAPSHOT + + + + + + Akka + Akka Maven2 Repository + http://akka.io/repository/ + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + + + + + diff --git a/akka-tutorials/akka-tutorial-second/project/build.properties b/akka-tutorials/akka-tutorial-second/project/build.properties new file mode 100644 index 0000000000..ae73049d36 --- /dev/null +++ b/akka-tutorials/akka-tutorial-second/project/build.properties @@ -0,0 +1,5 @@ +project.organization=akka.tutorial.second.scala +project.name=akka-tutorial-second-scala +project.version=1.2-SNAPSHOT +build.scala.versions=2.9.0.RC3 +sbt.version=0.7.6.RC0 diff --git a/akka-tutorials/akka-tutorial-second/project/build/Project.scala b/akka-tutorials/akka-tutorial-second/project/build/Project.scala new file mode 100644 index 0000000000..1d0b230149 --- /dev/null +++ b/akka-tutorials/akka-tutorial-second/project/build/Project.scala @@ -0,0 +1,3 @@ +import sbt._ + +class TutorialTwoProject(info: ProjectInfo) extends DefaultProject(info) with AkkaProject diff --git a/akka-tutorials/akka-tutorial-second/project/plugins/Plugins.scala b/akka-tutorials/akka-tutorial-second/project/plugins/Plugins.scala new file mode 100644 index 0000000000..aa263a988e --- /dev/null +++ b/akka-tutorials/akka-tutorial-second/project/plugins/Plugins.scala @@ -0,0 +1,6 @@ +import sbt._ + +class Plugins(info: ProjectInfo) extends PluginDefinition(info) { + val akkaRepo = "Akka Repo" at "http://akka.io/repository" + val akkaPlugin = "se.scalablesolutions.akka" % "akka-sbt-plugin" % "1.2-SNAPSHOT" +} diff --git a/akka-tutorials/akka-tutorial-second/src/main/java/akka/tutorial/java/second/Pi.java b/akka-tutorials/akka-tutorial-second/src/main/java/akka/tutorial/java/second/Pi.java index 1829428f5b..c8b47f46a2 100644 --- a/akka-tutorials/akka-tutorial-second/src/main/java/akka/tutorial/java/second/Pi.java +++ b/akka-tutorials/akka-tutorial-second/src/main/java/akka/tutorial/java/second/Pi.java @@ -20,31 +20,6 @@ import akka.routing.InfiniteIterator; import akka.routing.Routing.Broadcast; import akka.routing.UntypedLoadBalancer; -/** - * Second part in Akka tutorial for Java. - *

- * Calculates Pi. - *

- * Run on command line: - *

- *   $ cd akka-1.1
- *   $ export AKKA_HOME=`pwd`
- *   $ javac -cp dist/akka-actor-1.2-SNAPSHOT.jar:scala-library.jar akka/tutorial/java/second/Pi.java
- *   $ java -cp dist/akka-actor-1.2-SNAPSHOT.jar:scala-library.jar:. akka.tutorial.java.second.Pi
- *   $ ...
- * 
- *

- * Run it in Maven: - *

- *   $ mvn
- *   > scala:console
- *   > val pi = new akka.tutorial.java.second.Pi
- *   > pi.calculate(4, 10000, 10000)
- *   > ...
- * 
- * - * @author Jonas Bonér - */ public class Pi { public static void main(String[] args) throws Exception { diff --git a/akka-tutorials/akka-tutorial-second/src/main/scala/Pi.scala b/akka-tutorials/akka-tutorial-second/src/main/scala/Pi.scala index f671605359..ff4b8d9c4a 100644 --- a/akka-tutorials/akka-tutorial-second/src/main/scala/Pi.scala +++ b/akka-tutorials/akka-tutorial-second/src/main/scala/Pi.scala @@ -13,32 +13,6 @@ import akka.dispatch.Future import System.{currentTimeMillis => now} -/** - * Second part in Akka tutorial. - *

- * Calculates Pi. - *

- * Run on command line: - *

- *   $ cd akka-1.1
- *   $ export AKKA_HOME=`pwd`
- *   $ scalac -cp dist/akka-actor-1.2-SNAPSHOT.jar Pi.scala
- *   $ java -cp dist/akka-actor-1.2-SNAPSHOT.jar:scala-library.jar:. akka.tutorial.second.Pi
- *   $ ...
- * 
- *

- * Run it in SBT: - *

- *   $ sbt
- *   > update
- *   > console
- *   > akka.tutorial.second.Pi.calculate(nrOfWorkers = 4, nrOfElements = 10000, nrOfMessages = 10000)
- *   > ...
- *   > :quit
- * 
- * - * @author Jonas Bonér - */ object Pi extends App { calculate(nrOfWorkers = 4, nrOfElements = 10000, nrOfMessages = 10000) diff --git a/project/build/AkkaProject.scala b/project/build/AkkaProject.scala index 746f9d2f39..bab3658c35 100644 --- a/project/build/AkkaProject.scala +++ b/project/build/AkkaProject.scala @@ -244,9 +244,9 @@ class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with Exec } dependsOn (docs) lazy val releaseDownloads = task { - val distArchive = akkaDist.akkaCoreDist.distArchive + val distArchives = akkaDist.akkaActorsDist.distArchive +++ akkaDist.akkaCoreDist.distArchive val downloadsPath = localReleasePath / "downloads" - FileUtilities.copy(distArchive.get, downloadsPath, log).left.toOption + FileUtilities.copy(distArchives.get, downloadsPath, log).left.toOption } dependsOn (dist) lazy val dist = task { None } // dummy task @@ -494,6 +494,25 @@ class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with Exec class AkkaActorsDistProject(info: ProjectInfo) extends DefaultProject(info) with DistDocProject { def distName = "akka-actors" override def distDocName = "akka" + + override def distConfigSources = (akkaParent.info.projectPath / "config") * "*" + + override def distAction = super.distAction dependsOn (distTutorials) + + 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) } class AkkaCoreDistProject(info: ProjectInfo)extends DefaultProject(info) with DistProject { From 5856860061ed881e5e29fcf29f3b6add26aac87c Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Tue, 10 May 2011 18:49:33 +1200 Subject: [PATCH 14/15] Rework modular dist and include in release build --- project/build/AkkaProject.scala | 10 ++++- project/build/DistProject.scala | 65 ++++++++++++++++----------------- 2 files changed, 39 insertions(+), 36 deletions(-) diff --git a/project/build/AkkaProject.scala b/project/build/AkkaProject.scala index bab3658c35..497c1cac1d 100644 --- a/project/build/AkkaProject.scala +++ b/project/build/AkkaProject.scala @@ -226,7 +226,7 @@ class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with Exec lazy val buildRelease = task { log.info("Built release.") None - } dependsOn (publishRelease, releaseApi, releaseDocs, releaseDownloads) + } dependsOn (publishRelease, releaseApi, releaseDocs, releaseDownloads, releaseDist) lazy val releaseApi = task { val apiSources = ((apiOutputPath ##) ***) @@ -249,6 +249,12 @@ class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with Exec FileUtilities.copy(distArchives.get, downloadsPath, log).left.toOption } dependsOn (dist) + 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) + lazy val dist = task { None } // dummy task // ------------------------------------------------------------------------------------------------------------------- @@ -495,7 +501,7 @@ class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with Exec def distName = "akka-actors" override def distDocName = "akka" - override def distConfigSources = (akkaParent.info.projectPath / "config") * "*" + override def distConfigSources = (akkaParent.info.projectPath / "config" ##) * "*" override def distAction = super.distAction dependsOn (distTutorials) diff --git a/project/build/DistProject.scala b/project/build/DistProject.scala index df6b348396..5286d582d0 100644 --- a/project/build/DistProject.scala +++ b/project/build/DistProject.scala @@ -30,14 +30,17 @@ trait DistProject extends DistBaseProject { val distArchiveName = distFullName + ".zip" val distArchive = (distOutputBasePath ##) / distArchiveName - def distConfigSources = info.projectPath / "config" * "*" - def distScriptSources = info.projectPath / "scripts" * "*" + val distExclusiveOutputBasePath = distOutputBasePath / "exclusive" + val distExclusiveOutputPath = (distExclusiveOutputBasePath ##) / distFullName + val distExclusiveArchive = (distExclusiveOutputBasePath ##) / distArchiveName - lazy val distExclusiveProperty = systemOptional[Boolean]("dist.exclusive", false) + def distConfigSources = ((info.projectPath / "config" ##) ***) + def distScriptSources = ((info.projectPath / "scripts" ##) ***) - def distExclusive = distExclusiveProperty.value + def distAlwaysExclude(path: Path) = path.name == "scala-library.jar" + def distAlwaysInclude(path: Path) = distConfigSources.get.toList.map(_.name).contains(path.name) - def scalaDependency = if (distExclusive) Path.emptyPathFinder else buildLibraryJar + def scalaDependency = buildLibraryJar def allProjectDependencies = topologicalSort.dropRight(1) @@ -48,25 +51,8 @@ trait DistProject extends DistBaseProject { }) } - def distDependencyJarNames = { - val jarNames = distDependencies.flatMap { dist => - (dist.distLibPath ** "*.jar").get.map(_.name) ++ - (dist.distSrcPath ** "*.jar").get.map(_.name) ++ - (dist.distDocPath ** "*.jar").get.map(_.name) - } - Set(jarNames: _*) - } - def distClasspath = runClasspath - def filterOutExcludes(paths: PathFinder) = { - if (distExclusive) { - val exclude = distDependencyJarNames - def include(path: Path) = !exclude(path.name) - paths.filter(include) - } else paths - } - def dependencyJars(filter: Path => Boolean) = distClasspath.filter(filter) def isJar(path: Path) = path.name.endsWith(".jar") @@ -88,11 +74,11 @@ trait DistProject extends DistBaseProject { } } - def distLibs = filterOutExcludes(dependencyJars(isClassJar) +++ projectDependencyJars(_.jarPath)) + def distLibs = dependencyJars(isClassJar) +++ projectDependencyJars(_.jarPath) - def distSrcJars = filterOutExcludes(dependencyJars(isSrcJar) +++ projectDependencyJars(_.packageSrcJar)) + def distSrcJars = dependencyJars(isSrcJar) +++ projectDependencyJars(_.packageSrcJar) - def distDocJars = filterOutExcludes(dependencyJars(isDocJar) +++ projectDependencyJars(_.packageDocsJar)) + def distDocJars = dependencyJars(isDocJar) +++ projectDependencyJars(_.packageDocsJar) def distShareSources = ((distOutputPath ##) ***) @@ -100,25 +86,36 @@ trait DistProject extends DistBaseProject { describedAs("Create a distribution.")) def distAction = task { + def exclusiveDist = { + val excludePaths = (distDependencies.map(p => ((p.distOutputPath ##) ***)) + .foldLeft(Path.emptyPathFinder)(_ +++ _)) + val excludeRelativePaths = excludePaths.get.toList.map(_.relativePath) + val allDistPaths = ((distOutputPath ##) ***) + val includePaths = allDistPaths.filter(path => { + distAlwaysInclude(path) || !(distAlwaysExclude(path) || excludeRelativePaths.contains(path.relativePath)) + }) + copyPaths(includePaths, distExclusiveOutputPath) orElse + FileUtilities.zip(List(distExclusiveOutputPath), distExclusiveArchive, true, log) + } + copyFiles(scalaDependency, distScalaLibPath) orElse copyFiles(distLibs, distLibPath) orElse copyFiles(distSrcJars, distSrcPath) orElse copyFiles(distDocJars, distDocJarsPath) orElse - copyFiles(distConfigSources, distConfigPath) orElse + copyPaths(distConfigSources, distConfigPath) orElse copyScripts(distScriptSources, distBinPath) orElse copyPaths(distShareSources, distSharePath) orElse - FileUtilities.zip(List(distOutputPath), distArchive, true, log) + FileUtilities.zip(List(distOutputPath), distArchive, true, log) orElse + exclusiveDist } lazy val distBase = distBaseAction dependsOn (distClean) describedAs "Create the dist base." def distBaseAction = task { - if (!distExclusive) { - distDependencies.map( dist => { - val allFiles = ((dist.distOutputPath ##) ***) - copyPaths(allFiles, distOutputPath) - }).foldLeft(None: Option[String])(_ orElse _) - } else None + distDependencies.map( dist => { + val allFiles = ((dist.distOutputPath ##) ***) + copyPaths(allFiles, distOutputPath) + }).foldLeft(None: Option[String])(_ orElse _) } def distDependencyTasks: Seq[ManagedTask] = distDependencies.map(_.dist) @@ -138,7 +135,7 @@ trait DistProject extends DistBaseProject { def copyPaths(from: PathFinder, to: Path): Option[String] = { if (from.get.isEmpty) None - else FileUtilities.copy(from.get, to, log).left.toOption + else FileUtilities.copy(from.get, to, true, log).left.toOption } def copyScripts(from: PathFinder, to: Path): Option[String] = { From aa706a4e1b4a4262035dec6951722421b5be2321 Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Tue, 10 May 2011 19:35:24 +1200 Subject: [PATCH 15/15] Update tutorial sbt defs to match main project --- akka-tutorials/akka-tutorial-first/project/build.properties | 4 ++-- akka-tutorials/akka-tutorial-second/project/build.properties | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/akka-tutorials/akka-tutorial-first/project/build.properties b/akka-tutorials/akka-tutorial-first/project/build.properties index bcee7b19c1..e4ff105728 100644 --- a/akka-tutorials/akka-tutorial-first/project/build.properties +++ b/akka-tutorials/akka-tutorial-first/project/build.properties @@ -1,5 +1,5 @@ -project.organization=akka.tutorial.first.scala -project.name=akka-tutorial-first-scala +project.organization=se.scalablesolutions.akka +project.name=akka-tutorial-first project.version=1.2-SNAPSHOT build.scala.versions=2.9.0.RC3 sbt.version=0.7.6.RC0 diff --git a/akka-tutorials/akka-tutorial-second/project/build.properties b/akka-tutorials/akka-tutorial-second/project/build.properties index ae73049d36..0b21be843f 100644 --- a/akka-tutorials/akka-tutorial-second/project/build.properties +++ b/akka-tutorials/akka-tutorial-second/project/build.properties @@ -1,5 +1,5 @@ -project.organization=akka.tutorial.second.scala -project.name=akka-tutorial-second-scala +project.organization=se.scalablesolutions.akka +project.name=akka-tutorial-second project.version=1.2-SNAPSHOT build.scala.versions=2.9.0.RC3 sbt.version=0.7.6.RC0