I looks to me as I was able to work around the issue. After a long-day debug session in maven I figured out how to enable the inclusion of transitive dependencies on WAR dependencies.
I changed apache-maven-2.0.9/lib/maven-2.0.9-uber.jar/META-INF/plexus/components.xml which obviously configures the plexus container and its components.
Changing <includeDependendies/> from true to false for WAR artifacts causes Maven to not consider dependencies from WAR artifacts to be already included in the WAR artifact itself. Instead they are properly resolved including a proper dependency resolution. I'll attach an sample overlay project so that this is reproducible for others.
Using the following section in the overlay build itself leads to an empty WEB-INF/lib for the overlay.
This in combination with the above <includesDependencies/> change means: an overlay's WEB-INF/lib is populated with all transitive dependencies from scratch. Be aware that I only exclude JAR dependencies here for now.
Does that make sense ? Feedback appreciated. Personally I would consider this to be the expected default behaviour (compatibility-issues aside) and would love to see that behaviour in a newer release (either default behaviour or a configuration option somewhere). Right now everyone here has to apply these settings manually in their maven installation which is ok for now (but not in the long term).
Someone can give feedback on the consequences and side-effects of the above change ? Do we break something here in this respect in other places ?