简体   繁体   English

我应该在Windows的哪里放置SBT 0.13.13的全局插件?

[英]Where do I put global plugins for SBT 0.13.13 on Windows?

I'm trying to use SBT behind a corporate firewall. 我正在尝试在公司防火墙后面使用SBT。 I'm required to use a password-protected Artifactory to resolve dependencies. 我需要使用受密码保护的Artifactory来解决依赖关系。

I've got a plugin file which contains the following text: 我有一个包含以下文本的插件文件:

credentials += Credentials(Path.userHome / ".sbt" / ".credentials")

I've tried this file in the following locations: 我在以下位置尝试过此文件:

  • %USERPROFILE%.sbt\\0.13\\plugins\\credentials.sbt %USERPROFILE%名.bst \\ 0.13 \\插件\\ credentials.sbt
  • %USERPROFILE%.sbt\\plugins\\credentials.sbt %USERPROFILE%名.bst \\插件\\ credentials.sbt
  • \\project\\project.sbt (added the line to an existing file) \\ project \\ project.sbt(将行添加到现有文件中)

None of them seem to have the desired effect of loading the credentials file. 他们似乎都没有加载凭据文件所需的效果。 In fact there's absolutely nothing in the sbt.last.log file which suggests that this is the correct way to load credentials. 实际上,sbt.last.log文件中绝对没有任何内容表明这是加载凭据的正确方法。

Can you help me? 你能帮助我吗?

  • How do I prove that a plugin loaded? 如何证明已加载插件? Can put some kind of log message in plugins file so that I can verify that SBT actually loaded it? 可以在插件文件中放入某种日志消息,以便我可以验证SBT是否已实际加载吗?
  • What's the correct way to get a credentials object loaded on Windows? 在Windows上加载凭据对象的正确方法是什么? Is this actually the correct way to load it? 这实际上是正确的加载方式吗?

EDIT 0 : I tried to put some garbage text in the locations above to see if I can make an error that was visible in the update.log file. 编辑0 :我试图在上面的位置放一些垃圾文本,以查看是否可以做出在update.log文件中可见的错误。 I didn't get anything. 我什么都没得到。 From that I can safely conclude that my plugins aren't getting loaded at all. 由此可以肯定地说,我的插件根本没有加载。

EDIT 1 : I've added this as an issue on SBT's issue tracker. 编辑1:我已经添加了这个作为一个问题关于SBT的问题跟踪器。

I think you need global settings , not global plugins . 我认为您需要全局设置 ,而不是全局插件 They are different. 他们是不同的。 credentials setting expression must be placed in ~/.sbt/0.13/credential.sbt equivalent on Windows. 在Windows上, credentials设置表达式必须放在~/.sbt/0.13/credential.sbt

For more details on settings and plugins, see the Getting Started guide and Global settings for the details on using global settings. 有关设置和插件的更多详细信息,请参阅《 入门指南》和“ 全局设置” ,以获取有关使用全局设置的详细信息。

Has your setup worked in previous sbt versions prior to 0.13.13, or are you saying that the version you're using is sbt 0.13.13. 您的设置是否可以在0.13.13之前的先前sbt版本中使用,或者您说的是所使用的版本是sbt 0.13.13。 I'm guessing it's the latter. 我猜是后者。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM