# Java maven build completes successfully but .m2 local repository is not getting cached

**URL:** <https://travis-ci.community/t/java-maven-build-completes-successfully-but-m2-local-repository-is-not-getting-cached/4380>\
**Category:** Java\
**Tags:** caching\
**Created:** [July 25, 2019, 5:26am UTC](https://travis-ci.community/t/java-maven-build-completes-successfully-but-m2-local-repository-is-not-getting-cached/4380 "2019-07-25T05:26:17Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [July 26, 2019, 8:37am UTC](https://travis-ci.community/t/java-maven-build-completes-successfully-but-m2-local-repository-is-not-getting-cached/4380/5 "2019-07-26T08:37:55Z")

</div>

Related:

> [@Skip travis build if certain condition is met](https://travis-ci.community/t/skip-travis-build-if-certain-condition-is-met/2531):
>
> Is there any way to kill travis build process & exit with status 0 so it will be marked as succeeded? Basically what I’m trying to do here is skip the entire build pipeline if certain condition is met. That condition is, “if files in /abc directory change only then trigger travis else skip it”, so I am using git diff to check if files changed in the /abc directory. I checked there is an option in travis wherein if you include [skip ci] in your commit message then it skips the CI. But I cannot us…

---

_[View the full topic](https://travis-ci.community/t/java-maven-build-completes-successfully-but-m2-local-repository-is-not-getting-cached/4380)._
