我使用安全的Maven服务器来获取项目的依赖项,并将其添加到我的build.sbt文件中:
resolvers ++= Seq("scalaz-bintray" at "https://dl.bintray.com/scalaz/releases",
"pexxlab" at "https://nexus.pexxlab.xyz/repository/maven-snapshots/")
credentials += Credentials("Sonatype Nexus Repository Manager", "nexus.pexxlab.xyz", "username", "password")
现在这在我不是唯一开发人员的项目中并不理想,因为我不想在Git存储库中获取我的凭据。
有没有办法用像Maven这样的单独文件给我的凭据呢?
答案 0 :(得分:0)
最简单的方法是在全局设置中使用凭据(http://www.scala-sbt.org/0.13/docs/Global-Settings.html)。
基本全局配置文件
应该应用于所有项目的设置可以进入 〜/ .sbt / 0.13 / global.sbt(或〜/ .sbt / 0.13中带有.sbt的任何文件 延伸)。