Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

In build pipelines, how to access private maven dependency hosted on artifactory

My project has some maven dependencies that are hosted on Jfrog Artifactory. On our development machines, we have configured settings.xml file to access Artifactory with credentials to download those dependencies.

Now, we want to make use of build pipelines offered by bitbucket. But how can we configure bitbucket such that it can access those dependencies from Artifactory while generating build?

1 answer

0 votes

Hi @Abhishek Sharma,

On your development machines, are these credentials stored in the settings.xml file?

In Bitbucket Cloud, it is possible to configure environment variables for your builds. You can do that either on the workspace level (from workspace Settings > Workspace variables) and these variables will be available for all repos of the workspace, or on the repository level (from Repository settings > Repository variables), and these variables will be available for this repo only.

You can create variables for the credentials (you can make them Secured when you defined them, so that their value won't be visible in the build log) and then use them in the settings.xml file of your repo. E.g. if you have defined a variable named PASSWORD, you can reference it in the file as ${PASSWORD}

You can read more about user-defined variables here:

Is this something that works for you?

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
Community showcase
Published in Bitbucket

⭐ Calling all Bitbucket and DevOps experts: Special showcase opportunity ⭐

Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...

1,481 views 4 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you