I just need one dependent module , but don't need its dependencies (Maven)
Posted
by smallufo
on Stack Overflow
See other posts from Stack Overflow
or by smallufo
Published on 2010-06-01T23:23:52Z
Indexed on
2010/06/01
23:33 UTC
Read the original article
Hit count: 252
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 !
© Stack Overflow or respective owner