Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom maven settings.xml

Mukesh Mehta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 30, 2023

I have defined a custom maven setting.xml which resides in the root directory of the repository, however when I am executing the pipeline which has this command: "- mvn -B -s settings.xml clean install", it is not referring to the custom settings.xml file. Any suggestions, what could be the issue? 

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 1, 2023

Hello @Mukesh Mehta and welcome to the Community!

When a pipeline build starts the repository is cloned into the build container and the build starts in the root directory of the cloned repository. By any chance are you changing the directory during your build, like executing a cd <new directory path>

Also, since you mentioned the file settings.xml was committed to the root of your repository, I would suggest listing the files during your pipeline to confirm if the file is indeed there : 

ls -la

You can add this command to your step's script before the mvn command.

If that still does not work, I would suggest trying to debug the build locally using docker following the instructions of Debug pipelines locally with docker as this seems to be an error with the maven config itself. Once it successfully runs locally, you can push the changes to the bitbucket repository and the pipeline should produce the same result.

Thank you, @Mukesh Mehta !

Patrik S

Mukesh Mehta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 5, 2023

Hi Pratik,

Thanks a lot for suggesting the solution. I tried debugging locally and found a problem with maven config. I was able to fix the config and it is working fine now. 

 

Thank you,

Mukesh Mehta

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
loom essentials certification, loom training, get certified in loom, atlassian certification, loom async video, video messaging skills, atlassian learning, loom for teams, online certification, loom badge, loom for business, atlassian education

Get Certified in Loom! 🧑‍🎓

Time to up your Loom game! The new Loom Essentials Certification is here! Show off your skills, learn pro tips, and get officially recognized. Perfect for taking your video messaging to the next level.

Learn more
AUG Leaders

Atlassian Community Events