Installing Scalactic

Scalactic 3.2.19 (the latest release for Scala 2.10.0+, 2.11.0+, 2.12.0+ 2.13.0+, and 3.0.0+)

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


To include Scalactic 3.2.19 in your sbt project:

1. Add these lines to your build file:

libraryDependencies += "org.scalactic" %% "scalactic" % "3.2.19"
If you're using 3.x version and scala-js, you should use %%% instead in your project:
libraryDependencies += "org.scalactic" %%% "scalactic" % "3.2.19"

2. If you're using 3.x version, we also recommend you also include the SuperSafe Community Edition Scala compiler plugin for Scala 2.x (not supported for Scala 3.x), which will flag errors in your Scalactic code at compile time, by first adding this line to ~/.sbt/0.13/global.sbt for sbt sbt 0.13.x and ~/.sbt/1.0/global.sbt for sbt 1.x:

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

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

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

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


To include Scalactic 3.2.19 in your Maven project:

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

<dependency>
  <groupId>org.scalactic</groupId>
  <artifactId>scalactic_3</artifactId>
  <version>3.2.19</version>
</dependency>

2. If you're using 3.x version, we also recommend you also include the SuperSafe Community Edition Scala compiler plugin for Scala 2.x (not supported for Scala 3.x), 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>https://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.13.14</artifactId>
                <version>1.1.12</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, 2.11, or 2.12 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-2024 Artima, Inc. All Rights Reserved.

artima