Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add classpath to folder containing property files in Maven

I have a property file which is not located in a classpath in Maven.

Therefore I can't reach it with:

ClassLoader.getSystemClassLoader().getResourceAsStream(PROPS_FILE);

How can I add the folder containing the property file to the classpath, so it will be available during build and test of the project?

like image 531
hylton Avatar asked Oct 27 '10 12:10

hylton


1 Answers

Just add the file into the resources folder under src/main maven project. i did that and works like a charm.

hope it helps

like image 60
byteslash Avatar answered Oct 15 '22 16:10

byteslash