Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrating from Maven to SBT

As you know, SBT is compatible with Maven in some way -- SBT recognizes simple Maven POMs and can use dependencies and repositories specified in them. However, SBT wiki says that, if inline dependency is specified in SBT project definition, POM will be ignored (so using both in this case is impossible):

Maven and Ivy configurations (pom.xml and ivy.xml) are ignored when inline dependency declarations are present.

Does anyone know, if any kind of converter from Maven POM to SBT project definition exists (translating POM's XML into project definition Scala code)? I'm considering writing such script (that will help to migrate my old Scala/Maven projects to SBT), but want to know first, if this functionality already exists.

like image 460
Vasil Remeniuk Avatar asked Jun 04 '10 07:06

Vasil Remeniuk


People also ask

Is SBT better than Maven?

I recently surveyed the current state of these three tools and concluded that SBT is better suited than Maven to Scala projects' needs.

What is the difference between Maven and SBT?

Once you familiarize yourself with how one Maven project builds you automatically know how all Maven projects build saving you immense amounts of time when trying to navigate many projects. On the other hand, SBT is detailed as "An open-source build tool for Scala and Java projects".


1 Answers

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

like image 173
retronym Avatar answered Oct 07 '22 20:10

retronym