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

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

Abhishek Sharma December 27, 2021

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

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 28, 2021

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

Abhishek Sharma January 19, 2022

Thanks a lot, this was helpful

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 19, 2022

You are very welcome!

Please feel free to reach out if you ever need anything else.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events