I’m evaluating Scala for a project I’ve recently started. The project requires processing a large number of data structures. Between Scala’s good support for parallelism and functional programming, it seems like a good fit. I’ve heard Scala brings many of the development efficiencies and expressiveness of dynamic languages, while being statically typed. It does this through a number of features, including smart type inferencing, great functional programming support, traits, and a bunch of other tricks I’m in the process of learning.
Here’s what I did to get a minimal project set up in Maven and IntelliJ IDEA:
Create a shell of a project using a Maven archetype:
mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create \ -DarchetypeGroupId=org.scala-tools.archetypes \ -DarchetypeArtifactId=scala-archetype-simple \ -DarchetypeVersion=1.1 \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=com.rps -DartifactId=scalatest
This created a project with a single Scala class, test, and a Maven POM containing the minimal dependencies and plugins.
The version of Scala generated by the archetype isn’t the most current. Just update the version in the POM:
to 2.7.6, or whatever is the version you want.
I then imported the project into IntelliJ IDEA using the excellent IDEA Maven integration. I had to add the Scala nature to the project in IDEA myself, but otherwise, everything is working.. Editing, unit tests, debugging, etc.
The IntelliJ IDEA editor support for autocomplete seems to work pretty well, but it doesn’t seem to do much detection of errors as you’re editing yet.