In a JUnit test I'm using this code to load in a test-specific config file: InputStream configFile = getClass().getResourceAsStream("config.xml");
When I run the test through eclipse, it requires the xml file to be in the same directory as the test file.
When I build the project with maven, it requires the xml to be in src/test/resources, so that is gets copied into the target/test-classes.
How can I make them both work with just one file?