Friday, July 23, 2010

using sbt to setup a project

Following up the earlier Scala post, now that I've actually had a chance to try sbt and talk to others about using it.
Following the instruction here: sbt-setup
you don't even need to install Scala - it evaluates dependencies and installs it for you. That's nice and just what you'd expect it to be capable of!

That said, I'm not yet convinced it will work well with existing Maven repositories, as it has its own lib_managed directory too.
Because it's Ivy-based, it also does not work directly with Maven plug-ins.
But you can start with a POM and it will build and run it.
The Scala interpreter allows direct access to the Spring context.
I'm told that if using Scala 2.8.0 you can work correctly with the nested annotations in a Hibernate-JPA project, but I haven't seen this actually happen yet.

In short, I think its probably still not a seamless integration into a legacy project, but it does appear that it could be used to integrate with and provide a new way to build a project with existing code. Further experimentation remains.

1 comment:

Unknown said...

further note:
- sbt does use the local maven repository, but it also copies the artifacts into the managed directory. this was claimed because of a need for control over the artifacts, but i'm not sure entirely why.

for now, i think the best approach is to build new artifacts with sbt and then integrate those into legacy systems.