I have a maven project that loads an xslt file and executes the transformation along with other processing on the result. Normally when the user runs the application, the us
If you put a file foo.txt inside src/test/resources/, you can open this via:
foo.txt
src/test/resources/
// try-with-resource (Java 1.7) try (InputStream is = getClass().getClassLoader().getResourceAsStream("foo.txt")) { // do something with is... }
You can also take a look at the maven-resources-plugin.