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

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

1 accepted

0 votes
Answer accepted

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,

Thanks a lot, this was helpful

You are very welcome!

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

Kind regards,

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events