# Disable google-maven-central

**URL:** <https://travis-ci.community/t/disable-google-maven-central/5301>\
**Category:** Java\
**Created:** [October 3, 2019, 9:52am UTC](https://travis-ci.community/t/disable-google-maven-central/5301 "2019-10-03T09:52:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![skapral](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/skapral/32/4935_2.png) [@skapral](https://travis-ci.community/u/skapral)\
**Post date:** [October 3, 2019, 9:52am UTC](https://travis-ci.community/t/disable-google-maven-central/5301/1 "2019-10-03T09:52:00Z")

</div>

Hello,

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](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](http://repo1.maven.org/maven2), I see it in search via [mvnrepository.com](http://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.

---

<div class="post-metadata">

**Author:** ![ksclarke](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/ksclarke/32/1200_2.png) [@ksclarke](https://travis-ci.community/u/ksclarke)\
**Post date:** [October 8, 2019, 1:49am UTC](https://travis-ci.community/t/disable-google-maven-central/5301/2 "2019-10-08T01:49:20Z")

</div>

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](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](https://github.com/ksclarke/vertx-super-s3/blob/master/.travis.yml#L17)

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [October 8, 2019, 2:04am UTC](https://travis-ci.community/t/disable-google-maven-central/5301/3 "2019-10-08T02:04:31Z")

</div>

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.](https://maven.apache.org/guides/mini/guide-mirror-settings.html)

---

<div class="post-metadata">

**Author:** ![lesv](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/lesv/32/2140_2.png) [@lesv](https://travis-ci.community/u/lesv)\
**Post date:** [January 21, 2020, 4:11pm UTC](https://travis-ci.community/t/disable-google-maven-central/5301/4 "2020-01-21T16:11:18Z")

</div>

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](https://maven-central.storage-download.googleapis.com/index.html)

```auto
<settings>
  <mirrors>
    <mirror>
      <id>google-maven-central</id>
      <name>GCS Maven Central mirror</name>
      <url>https://maven-central.storage-download.googleapis.com/maven2/</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors>
</settings>

```

---

<div class="post-metadata">

**Author:** ![adriancole](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/adriancole/32/3686_2.png) [@adriancole](https://travis-ci.community/u/adriancole)\
**Post date:** [January 22, 2020, 1:59am UTC](https://travis-ci.community/t/disable-google-maven-central/5301/5 "2020-01-22T01:59:22Z")

</div>

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](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](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](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

---

<div class="post-metadata">

**Author:** ![lesv](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/lesv/32/2140_2.png) [@lesv](https://travis-ci.community/u/lesv)\
**Post date:** [January 22, 2020, 2:01am UTC](https://travis-ci.community/t/disable-google-maven-central/5301/6 "2020-01-22T02:01:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![adriancole](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/adriancole/32/3686_2.png) [@adriancole](https://travis-ci.community/u/adriancole)\
**Post date:** [January 22, 2020, 3:40am UTC](https://travis-ci.community/t/disable-google-maven-central/5301/7 "2020-01-22T03:40:14Z")

</div>

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.
