Playframework 在Play 2 SBT项目中包括Lucene nightly jar
我正在使用Play2框架,它使用SBT,并试图在我的项目中包括Lucene nightly jar。我在plugins.sbt中添加了以下内容:Playframework 在Play 2 SBT项目中包括Lucene nightly jar,playframework,sbt,Playframework,Sbt,我正在使用Play2框架,它使用SBT,并试图在我的项目中包括Lucene nightly jar。我在plugins.sbt中添加了以下内容: resolvers ++= Seq( DefaultMavenRepository, Resolver.url("Play", url("http://download.playframework.org/ivy-releases/"))(Resolver.ivyStylePatterns), "Typesafe Reposit
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包含到他们的项目中吗?您确定URL是正确的吗
Maven存储库的URL是否正确?当我在浏览器中打开它时,我看到一个Jenkins实例,它看起来不太对劲
四处查看,我只能找到稳定版本的repo,因此我觉得如果您需要,您需要手动下载夜间构建版本。但是,我可能错过了正确的存储库。我通过将以下内容添加到Build.scala文件中,成功地添加了lucene依赖项:
val appDependencies = Seq(
....
"org.apache.lucene" % "lucene-core" % "3.0.0"
)
希望它能帮上忙。关注您发布的内容。这对我很有用:
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.
它们是由Jenkins构建的,但我很确定它仍然是一个Maven存储库。它位于一个目录结构中,与Maven所需的内容相匹配,POM文件就在那里,等等。只要满足要求,您就可以以几乎任何形式托管Maven repo。例如,我将它们视为签入somone的googlecode或该结构中的GitHub的JAR。这里有几个文件提到,每晚都是有效的Maven回购:谢谢。我正试图为Lucene 4找到答案(尽管=)