Reputation: 9722
sbt downloads new version of scala compiler and the scala library for every sbt project at this location:
./project/boot/scala-2.8.1/lib/scala-library.jar
./project/boot/scala-2.8.1/lib/scala-compiler.jar
How do I make it pick up the compiler and the library from the location pointed by $SCALA_HOME?
Also, I am surprised that it's not a common requirement. Do Scala developers prefer to use a separate copies of compiler and library for every project?
I found the same request which was unanswered: http://groups.google.com/group/simple-build-tool/browse_thread/thread/9e2c7bc34253ad0f?pli=1
Thanks in advance for your help.
Upvotes: 6
Views: 1847
Reputation: 41646
Disclaimer, I don't use this myself but I was curious about whether this is possible.
Based on using a local scala instance, I defined the following project:
import sbt._
import java.io.File
class Test(info: ProjectInfo) extends DefaultProject(info) {
override def localScala =
defineScala("2.8.1-local", new File(System.getenv("SCALA_HOME"))) :: Nil
}
Then in project/build/build.properties
:
build.scala.versions=2.8.1-local
Then I can see that the console target works fine, which would suggest that it would work for compilation and running as well.
Upvotes: 4
Reputation: 67330
While I understand the concern, I would argue that using separate copies is a good thing
Did you try to ask the question again on the sbt googlegroup?
Upvotes: 3