1、自动生成build.sbt文件
$sbt
>set name := "anjsoft" (:= 表示 sbt.Setting["name"]="anjsoft")
>session save
2、
ModuleID = groupId % artifact % version % configuration
"org.specs2" %% "specs2" % "1.6.1" % "test" 返回的类型为 ModuleID ,查更多关于依赖库的方法到 http://harrah.github.io/xsbt/latest/api/#sbt.ModuleID
3、所有增加到lib目录的jar文件被加到classpath中,在 compile ,test, run, console...可用
4、
libraryDependencies += groupID % artifactID % revision
% configuration (+= 看到加号 就到示左边是 Seq[] ,具休这里是 Seq[ModuleID])
5 、增加一个
dependency resolver
resolvers += "Repository name" at "http://the-repository/
releases"
增加本地maven repo
resolvers += "Local Mvn Repository" at
"file://"+Path.userHome.absolutePath+"/.m2/repository"
解决冲突
libraryDependencies += "slinky" % "slinky" % "2.1" from "http://slinky2.googlecode.com/svn/artifacts/2.1/ slinky.jar"
Sbt does not resolve dependencies with classifier: https://github.com/harrah/xsbt/issues/285
intransitive()