/src/main/webapp content is placed in CLASSPATH when a WAR is created and deployed, but not during JUnit tests (both in maven and in my IDE). You must load them explicitly using:
new File("src/main/webapp/xsd/<filename>.xsd");
This should work as long as the main directory of the project is the current directory during the execution of the tests. Sad, but true.
source share