I'm late to this conversation but I wanted to point out that the accepted answer here seems to imply that the maven credentials are stored in a settings.xml file in the source code repository.
This is a security risk as you should never store credentials in source code repos.
Instead, you should store your credentials in BitBucket Pipelines Secure Environment Variables and then substitute them into a settings.xml file during your build step.
We created a guide that demonstrates how to do this as part of getting pipelines setup with maven repositories in a professional, secure manner.
For anyone coming along seeking an example please check it out:
That's how you update settings.xml in your local Maven repo, but we are talking about the remote settings.xml file that Bitbucket uses on the docker container when running mvn commands. At this point, I am guessing that the this files is a part of the maven:3.3.3 docker image listed in bitbucket-pipelines.yml
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
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