Even with cache enable dependencies are always downloaded

Hello, I'm using bitbucket pipelines to build my project, the thing is even though I'm using the config


- step:
- maven
- docker version
- mvn clean package verify -Dmaven.docker.plugin.skip=true -s settings.xml
- elasticsearch

for some reason the maven dependencies still being downloaded every time this increase a lot the build time, I'm understanding the feature wrong? should my built time decrease in at least 30% after enabling the maven cache?

1 answer

0 votes

Hi @Eric Santos do Nascimento,

At the end of a successful build Pipelines will capture the dependencies store in the specified location. Since you referenced 'maven' it will look in location '~/.m2/repository' 

Given that it does not seem to work for you, could you try putting this at the end of your script in your bitbucket-pipelines.yml to see if anything is inside that default local maven repository: 

- cd ~/.m2/repository
- ls

Another thing you could check is what the default configured local maven repository is: 

mvn help:evaluate -Dexpression=settings.localRepository | grep -v '\[INFO\]'

I hope this helps.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

631 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot