Pergunta

Since last Friday, my Play Framework apps are taking upwards of 15 minutes to compile, due to extremely long times resolving dependencies.

The dependencies reside on repo.typesafe.com, repo1.maven.org, and several others, including ones like Deadbolt, hosted on GitHub Pages (http://schaloner.github.com), so I'm not sure that it's down to a single external repo.

I can't for the life of me figure out what is causing this. Can someone give me an idea of where to start trouble-shooting?

EDIT: Further Info -- I have tested a new Play app with a new Play instance on a new virtual machine (Ubuntu 12.04) and I get the same long resolution times for adding the mysql jdbc connector from Maven 1, and Deadbolt from GitHub Pages. It seems like it's hanging on one of the repos and not timing out, but I don't know how to figure out which one. I've commented out the TypeSafe repo in the plugins.sbt file, but the problem persists. Pulling my hair out now.

EDIT 2: Bug exists in 2.0 and 2.1 branches. Cannot replicate in 2.2. For the moment, it looks like adding the published files to [Play directory]/repository/cache stops Play from trying to resolve everything every time.

Foi útil?

Solução

I think that the problem is caused by downtime at Github. My project depends on Github-hosted projects such as Deadbolt, and so I have added corresponding repositories to my Build.scala file

resolvers += Resolver.url("Objectify Play Repository (release)", url("http://schaloner.github.com/releases/"))(Resolver.ivyStylePatterns),
resolvers += Resolver.url("Objectify Play Repository (snapshot)", url("http://schaloner.github.com/snapshots/"))(Resolver.ivyStylePatterns)

What I've noticed is that Play attemps to resolve my other dependencies through this repository. For example, I have seen timeout failures to resolve apache.commons-io and htmlunit and it's transitive dependencies in the Deadbolt's github-hosted repository. In normal case such attempts would fail quickly. But when Github is slow it takes very long time to get failure response.

There should be a way to specify more precisely which repository to use for each dependency, but I'm not sure how to do that with SBT or Maven.

UPDATE

The problem has not been resolved. Here is an example of timeout error, this time on Typesafe repository

 [error] Server access Error: Connection timed out: connect url=http://repo.types
 afe.com/typesafe/releases/org/apache/commons/commons-email/1.2/commons-email-1.2
 .jar

UPDATE 2

A very similar issue has been seen before:

https://groups.google.com/forum/#!msg/play-framework/cBIkLb_WPN8/uuJIdhdtvtEJ

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top