My application also uses Struts2 which has logic to check for duplicate classes on the classpath, and because 2 copies of the Struts2 jars are on my classpath, Struts2 fails to initialize. Specifically, I get the following Exception from Struts2:
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - wsjar:file:/C:/workspace/rad75/playground/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/struts2-example-web/WEB-INF/lib/struts2-core-2.1.6.jar!/struts-default.xml:29:72 - bean - wsjar:file:/C:/maven2/.m2/repository/org/apache/struts/struts2-core/2.1.6/struts2-core-2.1.6.jar!/struts-default.xml:29:72
I've tried tweaking the Java EE Module Dependencies (under my web project) so that the Web Libraries tab doesn't have the Maven Dependencies library checked. However, after doing this, my dependencies don't show up at all (not in .metadata/.plugins/org.eclipse.wst.server.core/tmp0 or as pointers to my local Maven repository).
Is there a way to prevent my dependencies from being copied into .metadata/.plugins/org.eclipse.wst.server.core/tmp0?
Thanks for your help.