That's just how Maven works. If A depends upon B and B depends upon C, A depends upon C transitively. It's, of course, not always this simple because there are different dependency scopes. See the matrix in http://maven.apache.org/guides/introduction/introduction-to-dependency-m echanism.html.
WAR overlays are used specifically (or should be IMHO) for servlet context resources. For classpath resources, just stick the files in a JAR and add it as a dependency. Justin -----Original Message----- From: Damon Silver [mailto:damon.sil...@diio.net] Sent: Monday, September 28, 2009 12:40 PM To: 'Maven Users List' Subject: RE: Shared log4j configuration - best practice? Can you share an example pom for such a dependent project? I.e., if A depends on B, I'm curious how A imports the dependencies from B. Currently we're accomplishing something similar to this via war overlays, but perhaps that isn't the optimal solution. Thanks, Damon -----Original Message----- From: Kalle Korhonen [mailto:kalle.o.korho...@gmail.com] Sent: Sunday, September 27, 2009 7:55 PM To: Maven Users List Subject: Re: Shared log4j configuration - best practice? Why don't you just create a submodule only containing that logging configuration (and possible other shared classpath resources) and make it a dependency of all the other modules? That's what we do. Kalle On Sun, Sep 27, 2009 at 6:27 PM, Paul Benedict <pbened...@apache.org> wrote: > Brian, it just sounds awfully complex. A simple matter such as sharing > a log4j.property at the root of a nested project shouldn't create so > much work. Any other avenue? I am glad you shared this information. > > Paul > > On Sat, Sep 26, 2009 at 10:12 PM, Brian Fox <bri...@infinity.nu> wrote: > >> Something like this approach should work: >> >> http://www.sonatype.com/people/2008/04/how-to-share-resources-across-pro ject s-in-maven/ >> >> On Sat, Sep 26, 2009 at 7:37 PM, Paul Benedict <pbened...@apache.org> >> wrote: >> > I find myself replicating the same log4j configuration in my Maven >> projects. >> > It's a typical setup I want my projects to always use. Is there any good >> way >> > to specify one in a parent POM for all child projects? Would the >> > maven-remote-resources-plugin be useful for this? >> > >> > Paul >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org