Where to store static lights (files) in a Java project?

I am testing several classes that manage files on disk. I have created some “crafted” files that I will pass to these classes. The question is, where should I save them in my directory tree? I am using Maven.

+3
source share
1 answer

It looks like they should be in src/main/resourcesif you need them at runtime, or src/test/resourcesif they are just put into tests.

This suggests that they are opaque data files without any special properties that Maven can do with anything interesting (for example, XSD schemas / SQL / script language files).

+9

Source: https://habr.com/ru/post/1768632/


All Articles