I have a maven3 webapp (war) project that has 2 dependencies. One is a jar (ehcache) and the other a war dependency (a 3rd party lib that I have no control over).
The 3rd party war dependency has a dependency on much earlier version of ehcache which is clashing with the later version I need to use.
The following steps occur during a package of my app.
- My ehcache jar is copied to /WEB-INF/lib/
- The .war dependency which also includes ehcache is built and overlaid on top of my target
- Final .war file is created from target
No matter what I do, the war always includes the earlier version of ehcache. I've even tried writing an ant script which I execute via maven-antrun-plugin that removes the .jar file from the target directory. However, this always gets done before the .war dependency is overlaid.
Does anyone know how I can exclude/remove the earlier version of ehcache?