matt
matt

Reputation: 23

SBT into wrong directory

I have just started with Scala and am trying to setup the Simple Build Tool (SBT). Having followed all the instructions for running in cygwin I have it up and running but am experiencing one strange behaviour. The class files are compiled into target\scala-2.8.1\classes instead of simply target\classes. If I use a different version of scala then the directory name reflects that version.

Any reason why this happening? I am aware I can configure the build but surely this isn't the normal behaviour?

Upvotes: 2

Views: 425

Answers (1)

Arjan Blokzijl
Arjan Blokzijl

Reputation: 6888

This is the normal behaviour. sbt enables building against multiple versions of scala, as described on the wiki.

Edit Regarding the question in your comment: you can do this by overriding the outputpath method:

override def outputPath = "target"

which will compile your code into target/classes, without the scala build version. It may also be useful to check the paths page on the sbt wiki for this, as well as the ProjectPaths source code on github to see a list with all configurable options.

Upvotes: 3

Related Questions