在Play 2 SBT项目中包括Lucene nightly jar

时间:2012-03-02 02:19:53

标签: playframework sbt

我正在使用使用SBT的Play 2 Framework,并且我正在尝试在我的项目中包含Lucene nightly jar。我已将以下内容添加到我的plugins.sbt:

resolvers ++= Seq(
    DefaultMavenRepository,
    Resolver.url("Play", url("http://download.playframework.org/ivy-releases/"))(Resolver.ivyStylePatterns),
    "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/",
    "Lucence Snapshot Repository" at "https://builds.apache.org/job/Lucene-Solr-Maven-trunk/lastSuccessfulBuild/artifact/maven_artifacts/"
)

然而,它找不到罐子。它似乎甚至没有检查新的存储库:

[warn]  module not found: org.apache.lucene#lucene-analyzers-common;4.0-SNAPSHOT       
[warn] ==== local: tried
[warn]   /usr/local/users/bmccann/Play20/framework/../repository/local/org.apache.lucene/lucene-    analyzers-common/4.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/apache/lucene/lucene-analyzers-common/4.0-SNAPSHOT/lucene-analyzers-common-4.0-SNAPSHOT.pom
[warn] ==== Typesafe Snapshots Repository: tried
[warn]   http://repo.typesafe.com/typesafe/snapshots/org/apache/lucene/lucene-analyzers-common/4.0-SNAPSHOT/lucene-analyzers-common-4.0-SNAPSHOT.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common/4.0-SNAPSHOT/lucene-analyzers-common-4.0-SNAPSHOT.pom
[warn] ==== Scala-Tools Maven2 Repository: tried
[warn]   http://scala-tools.org/repo-releases/org/apache/lucene/lucene-analyzers-common/4.0-SNAPSHOT/lucene-analyzers-common-4.0-SNAPSHOT.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::                           
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.apache.lucene#lucene-analyzers-common;4.0-SNAPSHOT: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::

SBT是否对我需要重置的这些回购进行了一些缓存?它可以不处理https回购吗?我无法弄清楚这里发生了什么。是否有其他人能够将jar包含在他们的项目中?

3 个答案:

答案 0 :(得分:0)

您确定网址

https://builds.apache.org/job/Lucene-Solr-Maven-trunk/lastSuccessfulBuild/artifact/maven_artifacts/

是Maven存储库的正确URL吗?当我在浏览器中打开它时,我看到一个Jenkins实例,它看起来不合适......

检查周围,我只找到稳定版本的回购,所以我觉得你需要手动下载每晚构建一个如果你想要它。不过,我可能错过了正确的存储库。

答案 1 :(得分:0)

我设法通过将此添加到Build.scala文件来添加lucene依赖项:

val appDependencies = Seq(
....
 "org.apache.lucene" % "lucene-core" % "3.0.0"
)

希望有所帮助......

答案 2 :(得分:0)

按照您发布的readme进行操作。这对我有用:

resolvers += "Apache Snapshots" at "http://repository.apache.org/snapshots/"

libraryDependencies += "org.apache.lucene" % "lucene-analyzers-common" % "4.0-SNAPSHOT"

这是输出

> compile
[info] Updating {file:/Users/eed3si9n/work/helloworld/}app...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading http://repository.apache.org/snapshots/org/apache/lucene/lucene-analyzers-common/4.0-SNAPSHOT/lucene-analyzers-common-4.0-20120918.141722-107.jar ...
[info]  [SUCCESSFUL ] org.apache.lucene#lucene-analyzers-common;4.0-SNAPSHOT!lucene-analyzers-common.jar (3647ms)
[info] downloading http://repository.apache.org/snapshots/org/apache/lucene/lucene-core/4.0-SNAPSHOT/lucene-core-4.0-20120918.141624-107.jar ...
[info]  [SUCCESSFUL ] org.apache.lucene#lucene-core;4.0-SNAPSHOT!lucene-core.jar (4295ms)
[info] Done updating.