OK - I think the lights are starting to turn on now. If we put them in dependency management, they are not automatically included, whereas if we put them in dependencies, they are automatically included for all children.
So if I were to write a best practice... I could say that only dependency management should be used in the parent, and dependencies should be explicitly listed on each kid. That way some of the kids don't end up with dependencies they don't really need, and we have the benefit of being able to update the version in one place. I'm leaning toward this as a best practice, because we could have a build that has 3 modules and then we add a 4th one, and if the parent had dependencies included in the pom, the 4th module automatically gets them, and maybe it didn't really want them. Thoughts? Thanks Greg, - Ole --- Greg Duffy <[EMAIL PROTECTED]> wrote: > If you use regular dependencies in the parent > project's POM, all the > subprojects inherit the dependencies. > > With a dependencyManagement section in the parent > POM, the subprojects > still have to explicitly declare a dependency in > their own POM, but > the version is inherited from its entry in the > parent's > dependencyManagement. That way, all of the > dependency versions can be > changed from the same place. > > On 12/2/06, Ole Ersoy <[EMAIL PROTECTED]> wrote: > > Oooooooooh - I get it. Thanks. > > > > Do you know if there is a benefit to > > using this instead of just > > regular dependencies? > > > > > > --- Alex Karasulu <[EMAIL PROTECTED]> wrote: > > > > > Ole Ersoy wrote: > > > > Oh - OK - Should we delete the dependencies > all > > > > together then, since the build will get them > from > > > the > > > > parent? > > > > > > > > I'm putting this in as a quality control check > in > > > the > > > > POM health check plugin. It makes sense that > > > > dependencies should be on either the parent or > the > > > > child. Have we experienced any issues with > this? > > > > > > > > > > Hmmm I think you misunderstood. A > > > dependencyManagement area is not the > > > same as having deps in the parent that are > inherited > > > by children. > > > > > > You still need the deps in the child poms. The > > > versions are taken from > > > the dep mngment region. > > > > > > HTH, > > > Alex > > > > > > > > > > --- Alex Karasulu <[EMAIL PROTECTED]> > wrote: > > > > > > > >> Ole Ersoy wrote: > > > >>> I'm testing rpm spec file generation right > on > > > >>> apache-server-main version 1.5 and noticed > the > > > >>> following in the: > > > >>> > > > >>> Requires: nlog4j = null > > > >>> > > > >>> Requires: spring-core = null > > > >>> > > > >>> Requires: spring-beans = null > > > >>> > > > >>> Requires: commons-logging = null > > > >>> > > > >>> Requires: spring-context = null > > > >>> > > > >>> So these dependencies have no corresponding > > > >> version. > > > >>> I'll have a much more complete picture of > the > > > >> whole > > > >>> build soon, but we may want to start > updating > > > >> versions > > > >>> on all the poms. > > > >>> > > > >> I think this may be due to the use of a > > > >> dependencyManagement section in > > > >> the parent which lists the versions but the > child > > > >> poms do not have a > > > >> version in the dependencies. > > > >> > > > >> Regards, > > > >> Alex > > > >>> begin:vcard > > > >> fn:Alex Karasulu > > > >> n:Karasulu;Alex > > > >> org:Apache Software Foundation;Apache > Directory > > > >> adr:;;1005 N. Marsh Wind Way;Ponte Vedra > > > >> ;FL;32082;USA > > > >> email;internet:[EMAIL PROTECTED] > > > >> title:Member, V.P. > > > >> tel;work:(904) 791-2766 > > > >> tel;fax:(904) 808-4789 > > > >> tel;home:(904) 808-4789 > > > >> tel;cell:(904) 315-4901 > > > >> note;quoted-printable:AIM: > alexokarasulu=0D=0A= > > > >> MSN: [EMAIL PROTECTED] > > > >> Yahoo!: alexkarasulu=0D=0A= > > > >> IRC: aok=0D=0A= > > > >> PGP ID: 1024D/4E1370F8 BBCC E8D8 8756 2D51 > C3D4 > > > >> 014A 3662 F96F 4E13 70F8=0D=0A= > > > >> > > > >> x-mozilla-html:FALSE > > > >> url:http://people.apache.org/~akarasulu > > > >> version:2.1 > > > >> end:vcard > > > >> > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > > > Do you Yahoo!? > > > > Everyone is raving about the all-new Yahoo! > Mail > > > beta. > > > > http://new.mail.yahoo.com > > > > > > > > > > > begin:vcard > > > fn:Alex Karasulu > > > n:Karasulu;Alex > > > org:Apache Software Foundation;Apache Directory > > > adr:;;1005 N. Marsh Wind Way;Ponte Vedra > > > ;FL;32082;USA > > > email;internet:[EMAIL PROTECTED] > > > title:Member, V.P. > > > tel;work:(904) 791-2766 > > > tel;fax:(904) 808-4789 > > > tel;home:(904) 808-4789 > > > tel;cell:(904) 315-4901 > > > note;quoted-printable:AIM: alexokarasulu=0D=0A= > > > MSN: [EMAIL PROTECTED] > > > Yahoo!: alexkarasulu=0D=0A= > > > IRC: aok=0D=0A= > > > PGP ID: 1024D/4E1370F8 BBCC E8D8 8756 2D51 > C3D4 > > > 014A 3662 F96F 4E13 70F8=0D=0A= > > > > > > x-mozilla-html:FALSE > > > url:http://people.apache.org/~akarasulu > > > version:2.1 > > > end:vcard > > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > Cheap talk? > > Check out Yahoo! Messenger's low PC-to-Phone call > rates. > > http://voice.yahoo.com > > > ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
