本地依赖性由SBT解决,但不玩! 骨架(Local dependencies resolved

2019-09-02 02:30发布

我试图用香蕉RDF,本地发布的库(SBT使用的出版publish-local从播放)! 框架项目,但运行时compile从游戏控制台,使用时通缉库没有解决, compile从SBT的控制台一切顺利。

我觉得这种行为很奇怪的Play使用SBT解决依赖关系。 顺便说一句,我在我的游戏项目中使用的0.12.3版本SBT的。

与播放编译时,我得到的错误是非常基本的:

[warn]  module not found: org.w3#banana_2.10;2013_02_21-SNAPSHOT            
[warn] ==== local: tried
[warn]   /home_local/.installedSoftware/play-2.1.1/repository/local/org.w3/banana_2.10/2013_02_21-SNAPSHOT/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/w3/banana_2.10/2013_02_21-SNAPSHOT/banana_2.10-2013_02_21-SNAPSHOT.pom
[warn] ==== Typesafe Snapshots Repository: tried
[warn]   http://repo.typesafe.com/typesafe/snapshots/org/w3/banana_2.10/2013_02_21-SNAPSHOT/banana_2.10-2013_02_21-SNAPSHOT.pom
[warn] ==== Akka Snapshots: tried
[warn]   http://repo.akka.io/snapshots/org/w3/banana_2.10/2013_02_21-SNAPSHOT/banana_2.10-2013_02_21-SNAPSHOT.pom
[warn] ==== OSS117: tried
[warn]   http://oss.sonatype.org/content/repositories/snapshots/org/w3/banana_2.10/2013_02_21-SNAPSHOT/banana_2.10-2013_02_21-SNAPSHOT.pom
[warn] ==== Local Maven Repository: tried
[warn]   file:///home_local/.m2/repository/org/w3/banana_2.10/2013_02_21-SNAPSHOT/banana_2.10-2013_02_21-SNAPSHOT.pom
[warn] ==== Local SBT Repository: tried
[warn]   file:///home_local/.ivy2/local/org/w3/banana_2.10/2013_02_21-SNAPSHOT/banana_2.10-2013_02_21-SNAPSHOT.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/org/w3/banana_2.10/2013_02_21-SNAPSHOT/banana_2.10-2013_02_21-SNAPSHOT.pom

谁能解释这里发生了什么? 先感谢您。

Answer 1:

问题是,SBT的publish-local发布您的图书馆~/.ivy2/local ,而游戏似乎有他的ivy2本地仓库指向自己的安装文件夹(你的ivy2库/home_local/.installedSoftware/play-2.1.1/repository/local )。

您可以将这个解析器添加例如你玩的Build.scala

resolvers += Resolver.file("Local repo", file(System.getProperty("user.home") + "/.ivy2/local"))(Resolver.ivyStylePatterns)


文章来源: Local dependencies resolved by SBT but not by Play! Framework