This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import scala.xml._ | |
| // To convert a Maven pom.xml to build.sbt: | |
| // 1) Place this code into a file called PomToSbt.scala next to pom.xml | |
| // 2) Type scala PomtoSbt.scala > build.sbt | |
| // The dependencies from pom.xml will be extracted and place into a complete build.sbt file | |
| // Because most pom.xml files only refernence non-Scala dependencies, I did not use %% | |
| val lines = (XML.load("pom.xml") \\ "dependencies") \ "dependency" map { dependency => | |
| val groupId = (dependency \ "groupId").text | |
| val artifactId = (dependency \ "artifactId").text |