Disable google-maven-central


Recently, I noticed that java maven builds on travis implicitly started using google-maven-central (https://travis-ci.org/pragmatic-objects/oo-memoized/builds/592956800). However, I also noticed that google-maven-central is really slow when it comes to syncing the changes from official source. And it really frustrates me: I see my artifact deployed in http://repo1.maven.org/maven2, I see it in search via mvnrepository.com, but the builds that are dependent on it keep failing for hours since the moment of deployment.

I’d like to switch my builds back to official maven central. Is there an option for that? I’d be grateful for any advice, though an option that doesn’t involve touching configs on project side would be more preferrable.


I want this too. Google’s mirror of Maven Central is taking too long to sync with the upstream.

Update: To get around the Google mirror, you can set the real Maven central as a mirror in a settings.xml file and pass that to the mvn command with -s. For an example: https://github.com/ksclarke/vertx-super-s3/blob/master/src/test/resources/settings.xml#L21 and https://github.com/ksclarke/vertx-super-s3/blob/master/.travis.yml#L17

1 Like

Since you are in control of the build environment to a large extent, you should be able to manually specify the server for Maven to use.

If you are using the gcs maven mirror it’s now at most 2h behind maven-central and syncs 12 times / day.
Be sure to have updated URL as described in: https://maven-central.storage-download.googleapis.com/index.html

      <name>GCS Maven Central mirror</name>
1 Like

note: I really do think travis should change the path it is using now, as for example on the same google host, the basepath /repos/central/data is out of date whereas what @lesv mentioned above /maven2 is not.

That or if google can explain or somehow make these paths act the same knowing travis uses the /repos/central/data one.

https://maven-central.storage-download.googleapis.com/repos/central/data/com/github/eirslett/frontend-maven-plugin/1.9.1/frontend-maven-plugin-1.9.1.pom is 404 (at the moment)

https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/1.9.1/frontend-maven-plugin-1.9.1.pom is fine

https://maven-central.storage-download.googleapis.com/maven2/com/github/eirslett/frontend-maven-plugin/1.9.1/frontend-maven-plugin-1.9.1.pom is also fine

@adriancole - my understanding is that you need to clear your build-cache to get the new path to take effect.

Agreed. Yep, if anyone runs into this, clear the build cache and you won’t need to override the .settings file.

Thanks for the help.