The compiled JAR contains both the main.xml and an empty test-override.xml.
For some of my testing I'd like to use a different test-override.xml that should be placed somewhere in the file system (or into [app_folder]/spring), so the testers can easily modify it w/o rebuilding the app or modifying the JAR.
How can I achieve this? I tried manipulating the classpath (by using -cp) but my app still using the empty XML from the JAR.
I'd welcome you to CodeRanch, but you've been a member a long time. So congrats on your first post!
The crux of the problem is that "classpath:/spring/main.xml" and "classpath:/spring/test-override.xml" are hardcoded. For the main.xml, you are already instantiating in Java code. You can change the Java code to get the value from a property file, system property, etc and point to any file you want. For the test-override one, you can still change the xml to refer to a value that comes from a property file. If you host that property file outside your jar, you make it easy to change.