jakob
jakob

Reputation: 6005

Not being able to download dependency elasticsearch for playframework 2

I'm trying to implement elasticsearch in my play 2 app: https://github.com/cleverage/play2-elasticsearch but I get a problem when downloading the 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")

Stacktrace:

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)

Upvotes: 2

Views: 968

Answers (1)

jakob
jakob

Reputation: 6005

Got a workaround from nboire from play2-elasticsearch project:

Download the project from github. Go to project

cd module
play compile
play publish-local

Then your other projects will download from your local instead of http://cleverage.github.com

Upvotes: 1

Related Questions