Kompics Scala has the same prerequisites as the Java version of Kompics (cf. Getting Started), however it is recommended to build Scala projects with SBT instead of Maven, if possible. In this document use of SBT will be assumed.
Kompics Scala currently requires Scala
2.11.x and after adding the required resolvers (cf. Repositories) the SBT dependency is (for example for version
libraryDependencies += "se.sics.kompics" %% "kompics-scala" % "0.9.2-SNAPSHOT"
kompics-scala module only depends on
kompics-core from the Java API, but other Kompics modules (cf. Modules) can be included in order to use the Java API from Scala directly. For example, to add networking support, one could add the following to the SBT build file:
libraryDependencies += "se.sics.kompics.basic" % "kompics-component-netty-network" % "0.9.2-SNAPSHOT"
Java dependencies do not take the
%%, but a single
% after the organisation, since they don’t have a Scala version to include.
There is currently no special IDE support for Kompics Scala. It is recommended to use any IDE that has good Scala and SBT support. Both ScalaIDE (Eclipse) and IntelliJ IDEA should be well suited. ScalaIDE/Eclipse works best with SBT when the SBT Ecliplse Plugin is used.
Build from Sources¶
See Repositories for information on how to acquire the source code.
To clone the sources you need Git installed on your machine.
git clone git://github.com/kompics/kompics-scala.git
If you have already cloned the repository previously then you can update the code with git pull:
git pull origin master
Change into the
kompics-scala root directory and execute the following commands to build, and test a local Kompics Scala version in SBT:
sbt > test
Followed by other actions you wish to take, e.g.