【发布时间】:2019-04-02 04:45:06
【问题描述】:
我有一个 SBT 项目,我在 build.sbt 中添加了解析器。现在,我没有在 build.sbt 文件中添加解析器,而是尝试放入一个新文件 resolvers.sbt。
但是如果我在单独的文件中制作解析器,SBT 将无法找到工件。但是,我可以在启动 SBT 时看到消息,即我的 resolvers.sbt 正在考虑中。
如果我将解析器添加到.sbt 目录中的全局文件中,它就会被解析。
sbt 版本:1.2.6
有没有其他人遇到过同样的问题?
build.sbt
import sbt.Credentials
name := "sbt-sample"
version := "0.1"
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
"com.reactore" %% "reactore-infra" % "1.0.0.0-DEV-SNAPSHOT"
)
resolvers.sbt
credentials += Credentials("Artifactory Realm", "192.168.1.120", "yadu", "password")
resolvers ++= Seq(
"Reactore-snapshots" at "http://192.168.1.120:8182/artifactory/libs-snapshot-local"
)
SBT 日志
sbt:sbt-sample> reload
[info] Loading settings for project global-plugins from idea.sbt ...
[info] Loading global plugins from /home/administrator/.sbt/1.0/plugins
[info] Loading settings for project sbt-sample-build from resolvers.sbt ...
[info] Loading project definition from /home/administrator/source/poc/sbt-sample/project
[info] Loading settings for project sbt-sample from build.sbt ...
[info] Set current project to sbt-sample (in build file:/home/administrator/source/poc/sbt-sample/)
【问题讨论】: