I've got a multi-module Maven project in Eclipse. It has one jar module, "myapp-core", and a bunch of .war modules. The core module depends on some external jars, and the war modules depend on the core.
The problem is that when I build the .war files, all of the dependencies get copied into all the WEB-INF/lib folders, so we have duplicates. The right way to solve the problem, theoretically, is to give the dependencies in myapp-core a scope of "provided". Unfortunately, when I do this all the .war modules get compile errors. And all the transitive dependencies get copied anyway!
How do set it up so the dependencies that are common across wars are excluded?
(I can't exclude all the transitive artifacts one-by-one, unfortunately. There's about 50 of them, and it's an ever-changing list.)