I have a spring unit test that extends another test located in another project (common for tests). My context file (my-context.xml) is in the same package as MyTest. The base context file ("base-context.xml") is in the same package as BaseTest. The files look like this:
@ContextConfiguration(locations = { "my-context.xml"}) public class MyTest extends BaseTest { @ContextConfiguration(locations = { "base-context.xml" }) public abstract class BaseTest extends AbstractJUnit4SpringContextTests{
Problem: BaseTest finds "base-context.xml", but MyTest receives a FileNotFoundException for "my-context.xml". If I move the BaseTest and my-context.xml files to the same package as BaseTest, everything works fine. What could be the problem?
source share