I don't mind "managing" the dependencies at the root level, but I would leave it up to submodules to declare exactly what they need in their pom (pulling in version info from the parent). Even with that, I don't really like it that much. I usually just use properties in the root to control version numbers and make the submodules use those properties when they declare their dependencies.
On Tue, Feb 11, 2014 at 2:43 PM, Hiram Chirino <[email protected]> wrote: > I personally don't really like defining compile/runtime dependencies > in parent poms (I'm ok with testing dependencies). > > On Tue, Feb 11, 2014 at 12:43 PM, Daniel Kulp <[email protected]> wrote: >> >> While working with Art to figure out why his web console war was >> significantly smaller than mine, we determined that it comes down to what >> version of Maven you use to build. 3.0.5 includes more jars than 3.1.1. >> Looking into it, it looks like 3.1.1 is using the parent poms >> "optional=true" flags for the transitive dependencies whereas 3.0.5 is not. >> >> For example, in the parent pom, we have all the spring stuff (spring-core, >> spring-context, spring-beans, spring-aop) as "optional=true". However, >> in activemq-web, we set spring-web and spring-webmvc to optional=false. >> With 3.0.5, the transitive dependencies of spring-webmvc/spring-web then >> also get changed to optional=false. However, with 3.1.1, they don't. They >> remain optional=true and thus don't get packaged into the war. >> >> For consistency sake, I'd like to get this fixed. Two options: >> >> 1) For all the transitive deps pulled in for activemq-web, >> acttivemq-web-console, etc... add them directly to the deps in those poms >> with a optional=false flag. >> >> 2) Remove the optional=true flag from the parent pom and add it into the >> other poms where they truly are optional. Avoid the option=false >> construct. >> >> >> Thoughts? I believe #2 would be more "maven standard". >> >> -- >> Daniel Kulp >> [email protected] - http://dankulp.com/blog >> Talend Community Coder - http://coders.talend.com >> > > > > -- > Hiram Chirino > Engineering | Red Hat, Inc. > [email protected] | fusesource.com | redhat.com > skype: hiramchirino | twitter: @hiramchirino
