Files in main/resources in maven build aren't loaded

My application is a Java/maven application using spring boot.

I have csv files in main/resources that I read to load data when my application starts. I have other files in test/resources which are loaded as well. The files in test/resources seem to get loaded when I run a build. The files in main/resources do not. I get errors that the resource could not be loaded.

What configurations are available to load these files when running tests in the bitbucket pipeline?

The same maven build runs fine on my local machine.

1 answer

0 votes
Raul Gomis Atlassian Team Mar 28, 2018

Hi Laran,

I don't know exactly how you are accessing to the resource csv files. I recommend you use the ResourceLoader Sprint implementation to access the file. Here, you can see a tutorial on how to do it:



Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

689 views 5 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you