mbabauer <[EMAIL PROTECTED]> writes: > I need some assistance in how to add a folder to the classpath for JUnit > testing. > > My situation is this...we use Spring to wire most of our stuff together. I > would like to have some JUnits that use a test configuration for Spring. > The Spring config file(s) are located in <root>/src/test/resources, and the > test code itself is in <root>/src/test/java. I would like the JUnit to use > the ClasspathXmlApplicationContext, which looks to the classpath for a given > XML file for context configuration, but I have not found a way to add the > <root>/src/test/resources folder to the classpath for just the 'test' phase. > I am also not sure I am going down the right path.
Hello, That's weird because the purpose of /src/test/resources is precisely to *add* those resources in the classpath of the executed tests. I do this routinely on every project. Do the target/test-classes directory contains your resources ? Do you have special config in your parent files that would change target/srcs/resources directories ? Did you run mvn -X to check the classpath used ? Regards, -- OQube < software engineering \ génie logiciel > Arnaud Bailly, Dr. \web> http://www.oqube.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]