sam / doubleshot

Build and Dependency Management for mixed Java/Ruby projects.
MIT License
19 stars 22 forks source link

Add travis-ci Maven mirrors #57

Closed sam closed 12 years ago

sam commented 12 years ago

So we don't run into the occassional timeout from Central.

Since Doubleshot defaults mvn_repositories to return the URI to Central when you don't explicitly assign one, assigning the TravisCI repositories (found here: http://maven.mirrors.travis-ci.org/nexus/index.html#view-repositories) means that we'll not have Central unless we also explicitly add it.

So we should do something like the following in our Doubleshot file:

if ENV["TRAVIS"]
  mvn_repository "http://maven.mirrors.travis-ci.org/nexus/content/groups/public/"
  mvn_repository "http://maven.mirrors.travis-ci.org/nexus/content/repositories/apache/"
  mvn_repository "http://maven.mirrors.travis-ci.org/nexus/content/repositories/sonatype/"
  mvn_repository "http://maven.mirrors.travis-ci.org/nexus/content/repositories/codehaus-snapshots/"
  mvn_repository "http://maven.mirrors.travis-ci.org/nexus/content/shadows/central-m1/"
  mvn_repository "http://maven.mirrors.travis-ci.org/nexus/content/repositories/central/"
else
  mvn_repository "https://nexus.codehaus.org/content/groups/public/"
  mvn_repository "https://oss.sonatype.org/content/groups/public/"
  mvn_repository "http://mirrors.ibiblio.org/pub/mirrors/maven2"
  mvn_repository "http://repo1.maven.org/maven2"
end

Or, the else should be an end and we should always additionally add the main public repositories. If for some reason the TravisCI Nexus proves unstable.

sam commented 12 years ago

Seems to work. #60 is the cause of the current failures.