Version 4, last updated by Hubert Plociniczak at September 13, 2011 10:26 UTC
SBT-based build manager
One of the latest additions to the Eclipse Scala plugin is the new build manager. In comparison to our original Refined Build Manager, which is now deprecated and which was using some of the internal mechanisms of the compiler, the new one is based on the 0.10.x branch of the SBT's dependency tracking mechanisms (https://github.com/harrah/xsbt).
How to enable the SBT builder
At this moment, the SBT builder is not the default project builder. To enable, you need to select it on the 'Build Manager' tab in Project configuration (or globally, in the Scala compiler preferences).
Some of the advantages include:
- Stability - build manager is no longer prone to hitting hard-to-fix errors in the compiler. Any new bugs in the dependecy tracking mechanism will be promptly fixed due to the popularity of SBT and number of contributors
- Inter-project dependency tracking - if your project is dependent on another one, and you make a source code change in the latter that requires recompilation of some of your files then build manager will be smart enough to figure out what needs to be recompiled. With the old build manager either all project was recompiled all nothing
- Mixed Scala/Java project support
- Correct dependency tracking for libs - if any of the required jars is changed, then we triggger necessary compilation
There is not need to define your SBT project file.
The new SBT-based build manager uses only the definition provided for the project in Eclipse, similarly to the old Refined Build Manager and Java builder. So you can use it immediately.
How to use it
To enable the new build manager go to Window -> Preferences -> Scala -> Compiler -> Build Manager Tab and select sbt from the list. This will set the new build manager as a global configuration but you can easily do it for selected project by righ-clicking on a project -> Properties -> Scala Compiler -> Build Manager Tab and again sbt.
Have fun and feel free to give us feedback either on a mailing list or in bug tracker.