Answered my own question I think, I did it via the POM
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>src/main/webapp/WEB-INF/</
additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
However, my tests don't seem to be returning. I can see it execute the
first one, then just sit there.
On Apr 15, 2008, at 12:21 PM, Jared Blitzstein wrote:
I'm doing a demo app using JUnit 4 and Spring annotations and having
some trouble getting maven to run my tests. They launch and run
correctly in eclipse, but mvn test cannot find my xml context files
because they're not on the classpath (they're in /webapp/WEB-INF/)
and my JUnit test is using @ContextConfiguration(locations = { "/
todo-application-context.xml", "/todo-data.xml" }). I saw
maven.plugin.classpath and maven.test.classpath (though it seems
maven 1.x) and launching via "mvn test -Dmaven.plugin.classpath=/src/
main/webapp/WEB-INF/" (i've tried the absolute path too) but it's
still giving me a FileNotFound exception on my *.xml files. Any ideas?