无法下载 playframework 2 的依赖弹性搜索



我正在尝试在我的Play 2应用程序中实现elasticsearch: https://github.com/cleverage/play2-elasticsearch 但是下载依赖项时遇到问题:

[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)

播放插件:

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

应用程序:

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

最新更新