There was a similar discussion back in early 2006 (related to MWAR-73).
Imho, there are 3 different situations which may occur:
1.) We get a WAR file as a dependency which is not built with maven and contains all needed dependencies in WEB-INF/lib.
In this case, we must not evaluate and use the transitive dependencies we get from this WAR (usually this WAR will not have transitive dependencies at all)
This is the current behavior of the maven-war-plugin
2.) We get a WAR file as a dependency which is built with maven and does not contain transitive dependencies in WEB-INF/lib.
So we could easily take all transitive dependencies and tie them together in the freshly packaged WEB-INF/lib
3.) A mixture between 1.) and 2.) We get a WAR file as a dependency which is built with maven and contains all needed dependencies in WEB-INF/lib
In this case, there should be a switch to enable transitive dependency resolution and automatically ignoring all jars in WEB-INF/lib which fits any of the dependencies (otherwise we would end up having different versions of the same jar in WEB-INF/lib).
If we find any depending WAR having an attached classes artifact (as of this Jira), we should skip the WEB-INF/classes of those WARs in the war:overlay