Search code examples
scalaintellij-ideascalatest

how to add scala-test support to intellij


How do I install scala-test with intellij. The video on the intellij website shows them adding a library dependency with scala-test showing up on the list. I don't have that however as I'll need to install scala-test somehow first. The quickstart on the scala website just seems to have a link to a jar file. Do I configure the IDE in some way to point to that jar file as a global library?


Solution

  • No need for a global library. Intellij IDEA supports adding libraries to your project directly from Maven. Here's how:

    1. Go to File -> Project Structure
    2. Select the Dependencies tab
    3. Click the + sign at the bottom to create a new library
    4. Choose "New Library" and seleect "From Maven" to add a new library from the public Maven repository

    This brings up a search dialog which you can use to find the Maven dependency you want. Try searching for "org.scalatest:scalatest" to get the list of scalatest libraries.