sbt 0.11.2:仅对依赖项使用企业 nexus 存储库 [英] sbt 0.11.2: use only corporate nexus repository for dependencies
问题描述
我正在尝试设置一个使用类型安全堆栈安装的 sbt 实例,以便仅将我的私有 nexus 存储库用于所有依赖项.
I am trying to setup an sbt instance installed with the typesafe stack to only use my private nexus repository for all of the dependencies.
但是无论我怎么尝试,依赖项都是从 http://repo.typesafe.com 下载的/typesafe/releases.我尝试了很多解决方案,尤其是在此处解释的那些,这里和此处.
But no matter what I try, the dependencies are downloaded from http://repo.typesafe.com/typesafe/releases. I have tried many solutions and especially the ones explained here, here and here.
我什至尝试更改 sbt-launch.jar 中的 sbt.boot.properties 但没有成功.类型安全堆栈中是否有一些特殊的东西可以防止在这方面更改 sbt 行为?
I have even tried to change the sbt.boot.properties inside the sbt-launch.jar but with no luck. Is there something special in the typesafe stack that prevents from changing the sbt behavior in that respect?
顺便说一句,我想对所有东西都使用nexus + local,而不仅仅是项目依赖:依赖、插件、sbt需要下载的所有东西.
By the way, I want to use the nexus + local for everything, not just project dependencies: dependencies, plugins, everything that sbt needs to download.
推荐答案
检查您是否已清除以下文件夹 ~/.sbt 的内容,因为它可能包含对类型安全解析器的引用.
Check that you have cleared the contents of the following folder ~/.sbt , as it might contain references to a typesafe resolver.
在您的 Build.scala 或任何 .sbt 文件(插件或构建)中,确保您的所有解析器现在都指向您的 nexus 存储库.
In your Build.scala or any .sbt file (plugins or build) , make sure all your resolvers now point to your nexus repository.
确保您的 sbt 启动脚本如下所示:
Make sure your sbt launch script looks like this:
java -Dsbt.boot.properties=sbt.boot.properties -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m -Xmx512M -Xss2M -jar dirname $0
/sbt-launch.jar "$@"
java -Dsbt.boot.properties=sbt.boot.properties -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m -Xmx512M -Xss2M -jar dirname $0
/sbt-launch.jar "$@"
如果这不起作用,请告诉我.
Let me know if this does not work out.
克里希南
这篇关于sbt 0.11.2:仅对依赖项使用企业 nexus 存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!