我正在嘗試在我的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