Has anyone succeeded at running a static application context in Maven?
Has anyone succeeded at running a static application context in Maven?
I've used it for running tests. I load the applicationContext from the class path. If you store it in the source tree, you need to copy it across with something like:
Code:<postGoal name="java:compile"> <copy todir="${maven.build.dest}"> <fileset dir="${pom.build.sourceDirectory}"> <include name="**/*.xml"/> <include name="**/*.dtd"/> </fileset> </copy> </postGoal>
I am not sure if anyone tried the Spring context test cases with Maven but I doubt that the context is loaded only once per test run. I have opened a bug with Maven. For those who run into the same problem, you can follow it here:
http://jira.codehaus.org/browse/MPTEST-44
Let me know if I am wrong so I can change the status on Maven's JIRA.