Installing Scalactic

Scalactic 3.0.1 (the latest release for 2.10.0+, 2.11.0+, and 2.12.0-M5)

The Scalactic 3.0.1 artifacts are available via the Sonatype OSS Maven repository and mirrored on Maven central.


To include Scalactic 3.0.1 in your sbt project:

1. Add these lines to your build file:

libraryDependencies += "org.scalactic" %% "scalactic" % "3.0.1"

2. We also recommend you also include the SuperSafe Community Edition Scala compiler plugin, which will flag errors in your Scalactic code at compile time, by first adding this line to ~/.sbt/0.13/global.sbt:

resolvers += "Artima Maven Repository" at "http://repo.artima.com/releases"

3. Then adding the following line to project/plugins.sbt:

addSbtPlugin("com.artima.supersafe" % "sbtplugin" % "1.1.2")

You are off and running! As a next step, visit the Getting Started section of the user guide.


To include Scalactic 3.0.1 in your Maven project:

1. Add the following dependencies to your pom.xml:

<dependency>
  <groupId>org.scalactic</groupId>
  <artifactId>scalactic_2.11</artifactId>
  <version>3.0.1</version>
</dependency>

2. We also recommend you also include the SuperSafe Community Edition Scala compiler plugin, which will flag errors in your Scalactic code at compile time, by adding the following lines to your pom.xml:

<repositories>
    <repository>
        <id>artima</id>
        <name>Artima Maven Repository</name>
        <url>http://repo.artima.com/releases</url>
    </repository>
</repositories>
<plugin>
    <groupId>net.alchim31.maven</groupId>
    <artifactId>scala-maven-plugin</artifactId>
    <configuration>
        <compilerPlugins>
            <compilerPlugin>
                <groupId>com.artima.supersafe</groupId>
                <artifactId>supersafe_2.11.7</artifactId>
                <version>1.1.2</version>
            </compilerPlugin>
        </compilerPlugins>
    </configuration>
    <executions>
        ...
    </executions>
</plugin>

Note: You need to use the exact Scala version in the artifactId, because compiler plugin depends on compiler API that's not binary compatible between Scala minor releases.

You are off and running! As a next step, visit the Getting Started section of the user guide.


If you don't have it already, you'll also need Scala. You can use any 2.10 or 2.11 release, which you can get from here:


Older Releases of ScalaTest and Scalactic

For information on older releases, please visit the Older Releases page.

Scalactic is brought to you by Bill Venners, with contributions from several other folks. It is sponsored by Artima, Inc.
ScalaTest is free, open-source software released under the Apache 2.0 license.

Copyright © 2009-2016 Artima, Inc. All Rights Reserved.

artima