内容简介:翻译自:https://stackoverflow.com/questions/16400877/local-dependencies-resolved-by-sbt-but-not-by-play-framework
我正在尝试使用banana-RDF,一个本地发布的库(使用SBT的本地发布)来自Play!框架项目,但是当从Play的控制台运行编译时,想要的库没有被解析,当从SBT的控制台使用编译时,一切都很顺利.
我发现这种行为非常奇怪,因为Play使用SBT来解决依赖关系.顺便说一句,我在我的Play项目中使用了0.12.3版本的SBT.
我在使用Play编译时遇到的错误非常基本:
[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
任何人都可以解释这里发生的事情吗?先感谢您.
问题是SBT的publish-local将你的库发布到〜/ .ivy2 / local,而Play似乎有他的ivy2本地存储库指针指向他自己的安装文件夹的ivy2存储库(你的/home_local/.installedSoftware/play-2.1. 1 /存储库/本地).
您可以将此解析器添加到Play的Build.scala中:
resolvers += Resolver.file("Local repo", file(System.getProperty("user.home") + "/.ivy2/local"))(Resolver.ivyStylePatterns)
翻译自:https://stackoverflow.com/questions/16400877/local-dependencies-resolved-by-sbt-but-not-by-play-framework
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Spark大数据分析技术与实战
董轶群、曹正凤、赵仁乾、王安 / 电子工业出版社 / 2017-7 / 59.00
Spark作为下一代大数据处理引擎,经过短短几年的飞跃式发展,正在以燎原之势席卷业界,现已成为大数据产业中的一股中坚力量。 《Spark大数据分析技术与实战》着重讲解了Spark内核、Spark GraphX、Spark SQL、Spark Streaming和Spark MLlib的核心概念与理论框架,并提供了相应的示例与解析。 《Spark大数据分析技术与实战》共分为8章,其中前4......一起来看看 《Spark大数据分析技术与实战》 这本书的介绍吧!