In my project , there is a spring XML config that utilizes ehcache to cache method returns.
xml snippet :
http://www.springmodules.org/schema/ehcache http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd
<ehcache:config configLocation="classpath:ehcache.xml"/>
<ehcache:proxy id="explainRetriever" refId="explainRetrieverImpl">
<ehcache:caching methodName="get*" cacheName="explainCache"/>
</ehcache:proxy>
but in runtime , server complains it cannot find definitions of http://www.springmodules.org/schema/ehcache , I know I have to add "spring-modules-cache.jar" to WEB-INF/lib directory.
But my project is maintained by maven , if I add "spring-modules-cache" to the runtime dependency , it will bring a lot of dependencies to my WAR file , filling my WAR with a lot of unnecessary jars. I just need one declaration in it , not all of its dependencies ...
Is there any way to tell maven not to include its dependencies to the project ?
Or ... another way , when packaging WAR , just copy another prepared spring-modules-cache.jar to WEB-INF/lib , how to do this ? Thanks !