gpt4 book ai didi

module - 无法下载Play框架2的依赖项Elasticsearch

转载 作者:行者123 更新时间:2023-12-02 22:34:04 25 4
gpt4 key购买 nike

我正在尝试在我的play 2应用中实现elasticsearch:https://github.com/cleverage/play2-elasticsearch,但是在下载dependecy时遇到问题:

[warn] problem while downloading module descriptor: http://cleverage.github.com/play2-elasticsearch/releases/com.github.cleverage/elasticsearch_2.9.1/0.4/ivys/ivy.xml: Premature EOF (288ms)

play.plugins:
9000:com.github.cleverage.elasticsearch.plugin.IndexPlugin

application.conf:
elasticsearch.local=false
elasticsearch.client="192.168.0.101:9300"
elasticsearch.index.name="play2-elasticsearch"
elasticsearch.index.clazzs="models.*"
elasticsearch.index.show_request=true

Build.scala:
import sbt._
import Keys._
import PlayProject._

object ApplicationBuild extends Build {

val appName = "test"
val appVersion = "1.0-SNAPSHOT"

val appDependencies = Seq(
// Add your project dependencies here,
"mysql" % "mysql-connector-java" % "5.1.18",
"com.github.cleverage" % "elasticsearch_2.9.1" % "0.4"
)

val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
// Add your own project settings here
resolvers += Resolver.url("GitHub Play2-elasticsearch Repository", url("http://cleverage.github.com/play2-elasticsearch/releases/"))(Resolver.ivyStylePatterns)
)

}

plugins.sbt:
// Comment to get more information during initialization
logLevel := Level.Warn

// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("play" % "sbt-plugin" % "2.0.3")

堆栈跟踪:
play debug ~run
Listening for transport dt_socket at address: 9999
[info] Loading project definition from /Users/kalle/Projects/Heroku/test/project
[info] Set current project to test (in build file:/Users/kalle/Projects/Heroku/test/)

[info] Updating {file:/Users/kalle/Projects/Heroku/test/}test...
[info] Resolving org.hibernate.javax.persistence#hibernate-jpa-2.0-api;1.0.1.Fin [warn] problem while downloading module descriptor: http://cleverage.github.com/play2-elasticsearch/releases/com.github.cleverage/elasticsearch_2.9.1/0.4/ivys/ivy.xml: Premature EOF (288ms)
[warn] module not found: com.github.cleverage#elasticsearch_2.9.1;0.4
[warn] ==== local: tried
[warn] /usr/local/play-2.0.3/framework/../repository/local/com.github.cleverage/elasticsearch_2.9.1/0.4/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/com/github/cleverage/elasticsearch_2.9.1/0.4/elasticsearch_2.9.1-0.4.pom
[warn] ==== Typesafe Snapshots Repository: tried
[warn] http://repo.typesafe.com/typesafe/snapshots/com/github/cleverage/elasticsearch_2.9.1/0.4/elasticsearch_2.9.1-0.4.pom
[warn] ==== GitHub Play2-elasticsearch Repository: tried
[warn] http://cleverage.github.com/play2-elasticsearch/releases/com.github.cleverage/elasticsearch_2.9.1/0.4/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/github/cleverage/elasticsearch_2.9.1/0.4/elasticsearch_2.9.1-0.4.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.github.cleverage#elasticsearch_2.9.1;0.4: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/Users/kalle/Projects/Heroku/test/}test/*:update: sbt.ResolveException: unresolved dependency: com.github.cleverage#elasticsearch_2.9.1;0.4: not found
[warn] some of the dependencies were not recompiled properly, so classloader is not avaialable
[info] Updating {file:/Users/kalle/Projects/Heroku/test/}test...
[info] Resolving org.hibernate.javax.persistence#hibernate-jpa-2.0-api;1.0.1.Fin [warn] problem while downloading module descriptor: http://cleverage.github.com/play2-elasticsearch/releases/com.github.cleverage/elasticsearch_2.9.1/0.4/ivys/ivy.xml: Premature EOF (264ms)
[warn] module not found: com.github.cleverage#elasticsearch_2.9.1;0.4
[warn] ==== local: tried
[warn] /usr/local/play-2.0.3/framework/../repository/local/com.github.cleverage/elasticsearch_2.9.1/0.4/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/com/github/cleverage/elasticsearch_2.9.1/0.4/elasticsearch_2.9.1-0.4.pom
[warn] ==== Typesafe Snapshots Repository: tried
[warn] http://repo.typesafe.com/typesafe/snapshots/com/github/cleverage/elasticsearch_2.9.1/0.4/elasticsearch_2.9.1-0.4.pom
[warn] ==== GitHub Play2-elasticsearch Repository: tried
[warn] http://cleverage.github.com/play2-elasticsearch/releases/com.github.cleverage/elasticsearch_2.9.1/0.4/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/github/cleverage/elasticsearch_2.9.1/0.4/elasticsearch_2.9.1-0.4.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.github.cleverage#elasticsearch_2.9.1;0.4: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/Users/kalle/Projects/Heroku/test/}test/*:update: sbt.ResolveException: unresolved dependency: com.github.cleverage#elasticsearch_2.9.1;0.4: not found
1. Waiting for source changes... (press enter to interrupt)

最佳答案

从play2-elasticsearch项目的nboire获得了一种解决方法:

从github下载项目。前往专案

cd module
play compile
play publish-local

然后,您的其他项目将从本地下载而不是 http://cleverage.github.com

关于module - 无法下载Play框架2的依赖项Elasticsearch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12725759/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com