Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to use maven cache for pipelines with dependencies to other bitbucket repos?

I am currently trying to set up a project which is depending on another project on bitbucket.

I can compile everything with no issue, but I want to optimize the build procedure.

The project that I am depending on is quite large and does not change that often.

I am facing an issue right now: I am cloning the project at one step defined in the pipeline file. This is working but it rebuilds and installs the artifact every time to the local repository, which is not necessary because the same version is already existing.

How can I check if the cache already includes a certain artifact before cloning & installing the same thing over and over again?

1 answer

0 votes

Hello @Andreas Schröck ,

Thank you for reaching out to Atlassian Community.

From your description, I understand you are already using caches in your pipeline. What pipeline caches essentially do is zip a given folder and upload it to our infrastructure. On the subsequent runs, this zip will be downloaded and extracted in the same exact location it was generated, but it's up to the framework/tool you are using to make use of this cache.

We provide several pre-defined cache locations for commonly used language tools, as listed in the documentation below : 

But you can also define custom cache locations if your application is looking at different folders : 

As you mentioned you are cloning another huge dependency repository that does not change often, another option is for you to build your own custom docker image that already includes that dependency, and use that image in the steps that need the dependency. Since the image will already contain the repository, you will not need to clone it every time you do your build : 

Hope that helps! Let me know in case you have any questions.

Thank you, @Andreas Schröck .

Kind regards,

Patrik S

Thx for the links!

The docker image must be on docker hub, correct?

Patrik S Atlassian Team Jun 03, 2022

Hello @Andreas Schröck ,

We support public and private Docker images including those hosted on Docker Hub, AWS, GCP, Azure and self-hosted registries accessible on the internet, so it's up to your choice where you better prefer to host your image :) 

Kind regards,

Patrik S


Is there any documentation available on how to use Azure?

Patrik S Atlassian Team Jun 07, 2022

Hello @Andreas Schröck ,

There's no specific documentation on how to use Azure, but the following example is for private registries and should apply to Azure Container Registry (ACR) as well : 

username: $USERNAME
password: $PASSWORD

You can find more details on ACR in Microsoft's documentation below : 

Thank you, @Andreas Schröck .

Patrik S

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events