There are 3 preferred ways to install specs2:


First you need to install sbt itself then you need to add the following dependency:

libraryDependencies += "org.specs2" %% "specs2-core" % "3.8.6" % "test"

scalacOptions in Test ++= Seq("-Yrangepos")

See here to learn more about sbt dependencies.


You can install Maven from there. Once installed, you need to create a pom.xml file with the maven-scala-plugin. In the pom.xml file you can add the following dependency:

<project xmlns="" xmlns:xsi=""


Go to this page to install Gradle. You then need to install the Scala plugin and add the following to your build.gradle file:

repositories {
  maven {
     url ""

dependencies {
  testCompile "org.specs2:specs2-core_2.11:3.8.6"

Other dependencies

Depending on the specs2 features you want to use you will need to add more dependencies to your build:

Name Functionality
specs2-matcher-extra for the optional specs2 matchers
specs2-cats for the cats matchers
specs2-scalacheck to use ScalaCheck properties in specifications
specs2-mock to use Mockito matchers
specs2-analysis to use the package dependencies matcher
specs2-gwt to write given/when/then specifications
specs2-html to export specifications as html
specs2-form to create html form-like specifications
specs2-junit to run specifications as JUnit tests

Note: the specs2-core jar depends on 2 other specs2 jars:

Name Functionality
specs2-common utility classes for text, collections, xml,…
specs2-matcher common specs2 matchers. They can be used as a stand-alone library with JUnit