I am using the maven exec plugin to run a simple java class. This java class loads a text file. Following the maven way, I have my text file inside:
src/main/resources
upon compilation, the resources ends up in:
target/classes
with the compiled sources. When I try to run:
maven exec:java
I get:
Caused by: java.io.FileNotFoundException: text.txt (The system cannot find the file specified)
This error goes away if I place text.txt in the ${basedir}, however this is not right because it is not following maven standards. Is there a way to configure this?