Maven: dependency on web module copies content of web-inf/lib

Hi,
I just debugged a problem where an unwanted library was included in the classpath of a tomcat run configuration. I think it
is a problem / bug of the maven support, but would be glad for workarounds.

The maven project has this layour:
- web module 1, includes lib-1.1.jar
- web module 2, depends on web module 1 but overrides the dependency of web module 1 with lib-2.0.jar

Currently the artifact of web module 2 deployed to tomcat contains both lib-1.1.jar and lib-2.0.jar because the whole web artifact of web module 1 is included in the other web module.

This breaks things at runtime, although it works fine at the time of development.

Is there any workaround for this? It's next to impossible to work with the project atm.

Regards,
Wallaby

Please sign in to leave a comment.