2014-01-20 53 views
0

我設法讓這個東西工作一次,但它再次打破..加入第三個斜線不再幫助。在Windows上對此的支持不知何故中斷。定義本地maven回購SBT

我在build.scala

val localM2Repo = "Local Maven Repository" at "file:///" + Path.userHome + "/.m2/repository" 

當我嘗試編譯:

[warn] ==== Local Maven Repository: tried 
[warn] file:///C:/Users/tomaszk/.m2/repository/mcloud-integration-git/mcloud-integration-git-parent/1.0.1-SNAPSHOT/mcloud-integration-git-parent-1.0.1-SNAPSHOT.pom 

所以我檢查文件是否與斯卡拉REPL存在:

val u = new java.net.URI("file:///C:/Users/tomaszk/.m2/repository/mcloud-integration-git/mcloud-integration-git-parent/1.0.1-SNAPSHOT/mcloud-integration-git-parent-1.0.1-SNAPSHOT.pom") 
val f = new java.io.File(u) 
f.exists 

res26: Boolean = true 

什麼可能是失敗的原因?

+0

你可以在「file://」+ Path.userHome.absolutePath +「/.m2/repository」''試試看嗎?''本地Maven倉庫?請注意使用'.absolutePath'和只有兩個斜線。 –

回答

0

好吧,我有這個跑步。

無法解析的工件在.ivy2文件夾中引用。爲什麼?我不知道。剛剛看到sbt記錄了它無法刪除.ivy2文件夾中舊版本的artefact。

因此,我刪除了整個.ivy2文件夾,然後SBT拿起了沒有問題的罐子。

我試圖重現它,但沒有運氣,所以我不能發射一張票不幸。