On 6/8/07, Váry Péter <[EMAIL PROTECTED]> wrote:
If I working with jar-s, and A is transitively dependent on C, then if a new C is installed into the repository, I will get the new version. But with war - it does not count the transitive dependencies, so I does not get the changes.
Hi Peter, Aha, war dependencies are something completely different. So, as you experienced, it is always good to be as specific as possible about your problem. I assume that your module A is an ear, module B is a war, and module C is a jar? By default, the dependencies of a webapp (module B) are packaged within the war artifact itself. If you depend on that module in an ear module (A), the war artifact will simply be included, and its dependencies will not be checked. This is valid because changes in module B's dependencies would require a rebuild of the webapp in this setup. You can however make this work in the same way as you apparently expect it to do. You achieve this by depending on C in your ear and package the dependencies of module B in the ear instead. Some configuration has to be made to modify the manifest classpath of the webapp et cetera. If you have multiple modules in the ear which depend on the same dependencies (or some of them), this is the preferred configuration. Otherwise you end up with a bloated ear full of duplicate libraries. Jeroen Leenarts has written an enlightening article about this some time ago: http://blog.leenarts.net/2007/02/11/maven-2s-ear-plugin-gives-me-a-headache/ Cheers Jo