Update the building akka docs

This commit is contained in:
Peter Vlugter 2011-07-12 11:53:35 +12:00
parent 5b87b522e0
commit 2ec7c848b3

View file

@ -21,40 +21,35 @@ Akka uses `Git`_ and is hosted at `Github`_.
.. _Github: http://github.com
You first need Git installed on your machine. You can then clone the source
repositories:
- Akka repository from http://github.com/jboner/akka
- Akka Modules repository from http://github.com/jboner/akka-modules
repository from http://github.com/jboner/akka.
For example::
git clone git://github.com/jboner/akka.git
git clone git://github.com/jboner/akka-modules.git
If you have already cloned the repositories previously then you can update the
If you have already cloned the repository previously then you can update the
code with ``git pull``::
git pull origin master
SBT - Simple Build Tool
sbt - Simple Build Tool
=======================
Akka is using the excellent `SBT`_ build system. So the first thing you have to
do is to download and install SBT. You can read more about how to do that in the
`SBT setup`_ documentation.
Akka is using the excellent `sbt`_ build system. So the first thing you have to
do is to download and install sbt. You can read more about how to do that in the
`sbt setup`_ documentation.
.. _SBT: http://code.google.com/p/simple-build-tool
.. _SBT setup: http://code.google.com/p/simple-build-tool/wiki/Setup
.. _sbt: https://github.com/harrah/xsbt
.. _sbt setup: https://github.com/harrah/xsbt/wiki/Setup
The SBT commands that you'll need to build Akka are all included below. If you
want to find out more about SBT and using it for your own projects do read the
`SBT documentation`_.
The sbt commands that you'll need to build Akka are all included below. If you
want to find out more about sbt and using it for your own projects do read the
`sbt documentation`_.
.. _SBT documentation: http://code.google.com/p/simple-build-tool/wiki/RunningSbt
.. _sbt documentation: https://github.com/harrah/xsbt/wiki
The Akka SBT build file is ``project/build/AkkaProject.scala`` with some
properties defined in ``project/build.properties``.
The Akka sbt build file is ``project/AkkaBuild.scala``.
Building Akka
@ -65,21 +60,6 @@ First make sure that you are in the akka code directory::
cd akka
Fetching dependencies
---------------------
SBT does not fetch dependencies automatically. You need to manually do this with
the ``update`` command::
sbt update
Once finished, all the dependencies for Akka will be in the ``lib_managed``
directory under each module: akka-actor, akka-stm, and so on.
*Note: you only need to run update the first time you are building the code,
or when the dependencies have changed.*
Building
--------
@ -99,7 +79,7 @@ Publish to local Ivy repository
-------------------------------
If you want to deploy the artifacts to your local Ivy repository (for example,
to use from an SBT project) use the ``publish-local`` command::
to use from an sbt project) use the ``publish-local`` command::
sbt publish-local
@ -109,49 +89,36 @@ Publish to local Maven repository
If you want to deploy the artifacts to your local Maven repository use::
sbt publish-local publish
sbt publish
SBT interactive mode
sbt interactive mode
--------------------
Note that in the examples above we are calling ``sbt compile`` and ``sbt test``
and so on. SBT also has an interactive mode. If you just run ``sbt`` you enter
the interactive SBT prompt and can enter the commands directly. This saves
and so on, but sbt also has an interactive mode. If you just run ``sbt`` you
enter the interactive sbt prompt and can enter the commands directly. This saves
starting up a new JVM instance for each command and can be much faster and more
convenient.
For example, building Akka as above is more commonly done like this::
% sbt
[info] Building project akka 2.0-SNAPSHOT against Scala 2.9.0
[info] using AkkaParentProject with sbt 0.7.7 and Scala 2.7.7
> update
[info]
[info] == akka-actor / update ==
...
[success] Successful.
[info]
[info] Total time ...
[info] Set current project to default (in build file:/.../akka/project/plugins/)
[info] Set current project to akka (in build file:/.../akka/)
> compile
...
> test
...
SBT batch mode
sbt batch mode
--------------
It's also possible to combine commands in a single call. For example, updating,
testing, and publishing Akka to the local Ivy repository can be done with::
It's also possible to combine commands in a single call. For example, testing,
and publishing Akka to the local Ivy repository can be done with::
sbt update test publish-local
Building Akka Modules
=====================
See the Akka Modules documentation.
sbt test publish-local
.. _dependencies:
@ -159,17 +126,9 @@ See the Akka Modules documentation.
Dependencies
============
If you are managing dependencies by hand you can find the dependencies for each
module by looking in the ``lib_managed`` directories. For example, this will
list all compile dependencies (providing you have the source code and have run
``sbt update``)::
cd akka
ls -1 */lib_managed/compile
You can also look at the Ivy dependency resolution information that is created
on ``sbt update`` and found in ``~/.ivy2/cache``. For example, the
``.ivy2/cache/se.scalablesolutions.akka-akka-remote-compile.xml`` file contains
the resolution information for the akka-remote module compile dependencies. If
You can look at the Ivy dependency resolution information that is created on
``sbt update`` and found in ``~/.ivy2/cache``. For example, the
``.ivy2/cache/se.scalablesolutions.akka-akka-cluster-compile.xml`` file contains
the resolution information for the akka-cluster module compile dependencies. If
you open this file in a web browser you will get an easy to navigate view of
dependencies.