我正在尝试在我的Linux VM(CentOS)中安装SBT并具有非常严格的安全性。如何让我的本地资源库使用我的jar?
它不能访问
- http://repo.typesafe.com/typesafe/ivy-releases/
- http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/
我已经提取的SBT zip文件和bin路径添加到环境变量。
正如我所料,我无法运行SBT。
[[email protected]]$ sbt
Getting org.scala-sbt sbt 0.13.12 ...
:: problems summary ::
:::: WARNINGS
module not found: org.scala-sbt#sbt;0.13.12
==== local: tried
/home/admin/.ivy2/local/org.scala-sbt/sbt/0.13.12/ivys/ivy.xml
-- artifact org.scala-sbt#sbt;0.13.12!sbt.jar:
/home/admin/.ivy2/local/org.scala-sbt/sbt/0.13.12/jars/sbt.jar
==== Maven Central: tried
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.12/sbt-0.13.12.pom
-- artifact org.scala-sbt#sbt;0.13.12!sbt.jar:
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.12/sbt-0.13.12.jar
==== typesafe-ivy-releases: tried
https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.12/ivys/ivy.xml
==== sbt-ivy-snapshots: tried
https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/0.13.12/ivys/ivy.xml
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt#sbt;0.13.12: not found
::::::::::::::::::::::::::::::::::::::::::::::
:::: ERRORS
Server access Error: Connection timed out url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.12/sbt-0.13.12.pom
Server access Error: Connection timed out url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.12/sbt-0.13.12.jar
Server access Error: Connection timed out url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.12/ivys/ivy.xml
Server access Error: Connection timed out url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/0.13.12/ivys/ivy.xml
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13.12: not found
Error during sbt execution: Error retrieving required libraries
(see /home/admin/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.13.12
我设法让它加入资料库文件
库使用我的仓库
[repositories]
local
my-maven-proxy-releases: http://nexuspro.company.com/nexus/service/local/repositories/
然后我跑这个参数SBT命令:
sbt -Dsbt.repository.config=/sbt/conf/repositories
现在我的问题是SBT似乎使用了defa ult目录结构与我的存储库不同。
<my repository>/org/scala-sbt/sbt/0.13.12/sbt-0.13.12.jar
所以我现在的问题是如何设置SBT使用我的jar?也许强迫它使用我的罐子的绝对路径
<my repository>/sbt-0.13.12.jar
嗯如果我复制〜.ivy那么我不需要在调用sbt命令之后? – cebuseiran
你仍然需要拨打sbt来建立你的项目。但是现在sbt不需要通过网络获得依赖关系。 – thirstycrow