我正在使用IntelliJ IDEA Ultimate导入一个在私人Artifactory中具有一些插件的SBT项目。
[info] Resolving com.private#XXXX_X.X;X.X.X-SNAPSHOT ...
[error] Unable to find credentials for [Artifactory Realm @ artifactory-private.com].
[error] Unable to find credentials for [Artifactory Realm @ artifactory-private.com].
我确实在SBT中配置了Artifactory凭据,如果我使用sbt shell构建项目,则可以正常工作;但是,在IntelliJ中构建失败,并且无法识别凭据。有人可以帮忙吗?
更新:当插件是SNAPSHOT版本时,这似乎是唯一的问题。
非常感谢!
在sbt 1.x中,设置3个文件:
〜/ .sbt /存储库
〜/ .sbt /凭证
〜/ .sbt / 1.0 / plugins / credentials.sbt
第一个可以包含这样的内容(仅作为示例):
[repositories]
local
maven-local
my-ivy-proxy-releases1: https://<yourdomain.org>/sbt-scala/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[rev
ision]/[type]s/[artifact](-[classifier]).[ext]
my-maven-proxy-releases: https://<yourdomain.org>/maven-release/
第二个类似的东西:
realm=Artifactory Realm
host=<yourdomain.org>
user=<your_user>
password=<your_pass>
另外,您创建此文件:〜/ .sbt / 1.0 / plugins / credentials.sbt
credentials += Credentials(Path.userHome / ".sbt" / "credentials")
现在,在控制台中的项目目录中,您可以执行以下操作仅使用此存储库来编译项目。
sbt -Dsbt.override.build.repos
并且在sbt中:
VM参数:“-Dsbt.override.build.repos”
马克:-使用sbt shell[✓]进口[✓]对于构建
[✓]允许覆盖sbt版本[✓]启用sbt shell调试