Created
January 24, 2010 23:55
-
-
Save aboisvert/285523 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
Sample buildfile for akka-sample-chat (akka 0.6). | |
Save as akka-0.6/akka-samples/akka-sample-chat/Buildfile | |
Shell #1: | |
% export AKKA_HOME=... | |
% cd $AKKA_HOME | |
% java -jar dist/akka-0.6.jar | |
Shell #2: | |
% cd $REDIS_HOME | |
% ./redis-server | |
Shell #3: | |
% export AKKA_HOME=... | |
% cd $AKKA_HOME/akka-samples/akka-sample-chat | |
% buildr run | |
(wait for scala REPL to come up) | |
scala> import se.scalablesolutions.akka.sample.chat._ | |
scala> Runner.run | |
You should now see the akka-sample-chat run... | |
CHAT LOG: | |
jonas: Hi again | |
jonas: Hi there | |
=end | |
require 'buildr/scala' | |
VERSION_NUMBER = "0.6" | |
GROUP = "se.scalablesolutions.akka" | |
repositories.remote << "http://www.ibiblio.org/maven2/" | |
repositories.remote << "http://www.lag.net/repo" | |
repositories.remote << "http://multiverse.googlecode.com/svn/maven-repository/releases" | |
AKKA = group('akka-core', 'akka-comet', 'akka-util','akka-kernel', 'akka-rest', 'akka-util-java', | |
'akka-security','akka-persistence-common', 'akka-persistence-redis', | |
'akka-amqp', | |
:under=> 'se.scalablesolutions.akka', | |
:version => '0.6') | |
ASPECTJ = "org.codehaus.aspectwerkz:aspectwerkz-nodeps-jdk5:jar:2.1" | |
SBINARY = "sbinary:sbinary:jar:0.3" | |
COMMONS_IO = "commons-io:commons-io:jar:1.4" | |
CONFIGGY = "net.lag:configgy:jar:1.4.7" | |
JACKSON = group('jackson-core-asl', 'jackson-mapper-asl', | |
:under=> 'org.codehaus.jackson', | |
:version => '1.2.1') | |
MULTIVERSE = "org.multiverse:multiverse-alpha:jar:jar-with-dependencies:0.3" | |
NETTY = "org.jboss.netty:netty:jar:3.2.0.ALPHA2" | |
PROTOBUF = "com.google.protobuf:protobuf-java:jar:2.2.0" | |
REDIS = "com.redis:redisclient:jar:1.0.1" | |
SJSON = "sjson.json:sjson:jar:0.3" | |
Project.local_task "run" | |
desc "Akka Chat Sample Module" | |
define "akka-sample-chat" do | |
project.version = VERSION_NUMBER | |
project.group = GROUP | |
compile.with AKKA, CONFIGGY | |
package(:jar) | |
task "run" do | |
Java.java "scala.tools.nsc.MainGenericRunner", | |
:classpath => [ compile.dependencies, compile.target, | |
ASPECTJ, COMMONS_IO, JACKSON, NETTY, MULTIVERSE, PROTOBUF, REDIS, | |
SBINARY, SJSON], | |
:java_args => ["-server"] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment