Migrating from Maven to SBT
All the tips above had the issue for me that properties were not resolved, and as we make heavy use of the dependencyManagement from parent poms, I was hoping for something that actually could fully understand maven. I whipped together a simplistic scriptlet that outputs the dependencies from maven and just takes the top level items and then does a simple regex for the group, artifact, version, and scope (the artifact type is ignored)
mvn dependency:tree | grep "] +" | perl -pe 's/.*\s([\w\.\-]+):([\w\.\-]+):\w+:([\w\.\-]+):(\w+).*/libraryDependencies += "$1" % "$2" % "$3" % "$4"\n /'
I piped this directly to project/build.sbt. The sample output is (remember to keep empty spaces between sbt lines)
libraryDependencies += "org.springframework" % "spring-core" % "3.1.0.RELEASE" % "compile"
libraryDependencies += "se.scalablesolutions.akka" % "akka-actor" % "1.3.1" % "compile"
libraryDependencies += "se.scalablesolutions.akka" % "akka-spring" % "1.3.1" % "compile"
Converter is far too strong a term for this hack, but I wrote a script to take a block of <dependencies>
and output SBT style deps: http://gist.github.com/388334