CINXE.COM

Scalactic

<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>Scalactic</title> <link rel="Stylesheet" href="/assets/stylesheets/main.css" type="text/css" media="screen"/> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-19BZD1XMRV"></script> <script defer src='/assets/javascripts/gtag.js'></script> </head> <body> <div class="Container"> <!-- Top of scalactic.org 660 x 60 [async] --> <script id="adsArtimaScript" type="text/javascript" src="https://www.artima.com/assets/javascripts/4ca150665e51d0b1c3890ca1b891c507-ads.js?product=Scalactic"></script> <div id="Header"> <div id="Nav"> <a href="/">Home</a> | <a href="/quick_start">Quick Start</a> | <span><em>Install</em></span> | <a href="/user_guide">User Guide</a> | <a href="/scaladoc">Scaladoc</a> | <a href="/supersafe">SuperSafe</a> | <a href="/about">About</a> </div> <!-- Nav --> </div> <!-- Header --> <div id="body"> <div class="message"> <a class="scalatestLogo" href="./"> <img src="/assets/images/scalacticLogo.gif" width="400" height="60" alt="ScalaTest"/> </a> </div> <div style="text-align: left"> <h1>Installing Scalactic</h1> <p> <strong>Scalactic 3.2.19</strong> (the latest release for Scala 2.10.0+, 2.11.0+, 2.12.0+ 2.13.0+, and 3.0.0+) <ul> <li><a href="https://www.scalatest.org/release_notes/3.2.19">Combined Scalactic/ScalaTest 3.2.19 Release Notes</a></li> <li><a href='/scaladoc/3.2.19/org/scalactic/Or.html'>Scalactic 3.2.19 Scaladoc</a></li> </ul> <p> The <a href="https://oss.sonatype.org/content/groups/public/org/scalactic/scalactic_3/3.2.19/">Scalactic 3.2.19 artifacts</a> are available via the Sonatype OSS Maven repository and mirrored on Maven central. </p> <hr /> <!-- ############################################### --> <p> <em>To include Scalactic 3.2.19 in your <a href="https://www.scala-sbt.org"><strong>sbt</strong></a> project:</em> </p> <p> 1. Add these lines to your build file: </p> <pre class="stHighlighted"> libraryDependencies += <span class="stQuotedString">"org.scalactic"</span> %% <span class="stQuotedString">"scalactic"</span> % <span class="stQuotedString">"3.2.19"</span> </pre> If you're using 3.x version and scala-js, you should use <code>%%%</code> instead in your project: <pre class="stHighlighted"> libraryDependencies += <span class="stQuotedString">"org.scalactic"</span> %%% <span class="stQuotedString">"scalactic"</span> % <span class="stQuotedString">"3.2.19"</span> </pre> <p> 2. If you're using 3.x version, we also recommend you also include the <a href="/supersafe">SuperSafe Community Edition</a> 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 <code>~/.sbt/0.13/global.sbt</code> for sbt sbt 0.13.x and <code>~/.sbt/1.0/global.sbt</code> for sbt 1.x: </p> <pre class="stHighlighted"> resolvers += <span class="stQuotedString">"Artima Maven Repository"</span> at <span class="stQuotedString">"https://repo.artima.com/releases"</span> </pre> <p> 3. Then adding the following line to <code>project/plugins.sbt</code>: </p> <pre class="stHighlighted"> addSbtPlugin(<span class="stQuotedString">"com.artima.supersafe"</span> % <span class="stQuotedString">"sbtplugin"</span> % <span class="stQuotedString">"1.1.12"</span>) </pre> <p> You are off and running! As a next step, visit the <a href="/user_guide">Getting Started</a> section of the user guide. </p> <hr /> <!-- ############################################### --> <p> <em>To include Scalactic 3.2.19 in your <strong>Maven</strong> project</em>: </p> <p> 1. Add the following dependencies to your <code>pom.xml</code>: </p> <pre class="stHighlighted"> &lt;dependency&gt; &lt;groupId&gt;org.scalactic&lt;/groupId&gt; &lt;artifactId&gt;scalactic_3&lt;/artifactId&gt; &lt;version&gt;3.2.19&lt;/version&gt; &lt;/dependency&gt; </pre> <p> 2. If you're using 3.x version, we also recommend you also include the <a href="/supersafe">SuperSafe Community Edition</a> 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 <code>pom.xml</code>: </p> <pre class="stHighlighted"> &lt;repositories&gt; &lt;repository&gt; &lt;id&gt;artima&lt;/id&gt; &lt;name&gt;Artima Maven Repository&lt;/name&gt; &lt;url&gt;https://repo.artima.com/releases&lt;/url&gt; &lt;/repository&gt; &lt;/repositories&gt; &lt;plugin&gt; &lt;groupId&gt;net.alchim31.maven&lt;/groupId&gt; &lt;artifactId&gt;scala-maven-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;compilerPlugins&gt; &lt;compilerPlugin&gt; &lt;groupId&gt;com.artima.supersafe&lt;/groupId&gt; &lt;artifactId&gt;supersafe_2.13.14&lt;/artifactId&gt; &lt;version&gt;1.1.12&lt;/version&gt; &lt;/compilerPlugin&gt; &lt;/compilerPlugins&gt; &lt;/configuration&gt; &lt;executions&gt; ... &lt;/executions&gt; &lt;/plugin&gt; </pre> <p> <em>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.</em> </p> <p> You are off and running! As a next step, visit the <a href="/user_guide">Getting Started</a> section of the user guide. </p> <hr /> <!-- ############################################### --> <p> 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: </p> <ul> <li><a href="https://www.scala-lang.org/downloads">Download the latest Scala release</a></li> </ul> <hr style="height:5px;border:none;color:#333;background-color:#333;" /> <!-- ############################################### --> <strong>Older Releases of ScalaTest and Scalactic</strong> <p>For information on older releases, please visit the <a href="/older_releases">Older Releases</a> page.</p> </div> </div> <!-- body --> <div style="font-size: 66%; margin-top: 60px"> <p> Scalactic is brought to you by Bill Venners, with contributions from several other folks. It is sponsored by Artima, Inc.<br /> ScalaTest is free, open-source software released under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache 2.0 license</a>. </p> <p> Copyright &copy; 2009-2025 Artima, Inc. All Rights Reserved. </p> <p> <a href="http://www.artima.com" class="no_link_hover"> <img src="/assets/images/artima100Black.png" style="margin-top: 2px" width="100" height="38" alt="artima"/> </a> </p> </div> <!-- style="..." --> </div> <!-- Container --> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10