[ http://jira.codehaus.org/browse/MNG-2059?page=comments#action_58274 ]
Mike Whittemore commented on MNG-2059: -------------------------------------- Yes, and I do it wherever I can. Here's why I feel the "grouping" funtionality would be beneficial: We organize our projects based on their relationships and not the relationships of their dependencies. So, for example, if projects A, B, and C are related they will have a common parent pom, and if projects X, Y, and Z are related they will have a common parent pom, and both parent poms will have a shared parent at some higher level. Projects A, B, and C though closely related, may not have the same direct dependencies. Where my suggestion comes into play is if projects A and Z both need 12 ORB dependencies, I'd like to not have to duplicate all 12 in both poms. I'd also like to not have to place them in a common parent pom as "regular" dependencies because then other projects that don't need those dependencies will inherit them. I could move A and Z under a shared parent by themselves, but then I lose the logical grouping of the projects (for example A and Z might be totally unrelated except that deep down inside they happen to both use CORBA). I feel some grouping mechanism is the best way to deal with this, but I'm definitely interested in alternate suggestion. Your suggestion is a good workaround in that it removes the duplication in the pom files, but it feels wrong to me in that it makes projects depend on things they don't truly depend on. > Add ability to depend on a group of dependencies with a single dependency > element. > ---------------------------------------------------------------------------------- > > Key: MNG-2059 > URL: http://jira.codehaus.org/browse/MNG-2059 > Project: Maven 2 > Type: New Feature > Environment: n/a > Reporter: Mike Whittemore > Priority: Minor > > > It would be convenient and reduce maintenance if Maven2 has the ability to > create a group of dependencies and then reference them via a single > dependency entry. Something like this: > In master pom: > <dependencyGroups> > <dependencyGroup> > <name>logging</name> > <dependencies> > <dependency> > <groupId>apache</groupId> > <artifactId>commons-logging</artifactId> > </dependency> > <dependency> > <groupId>apache</groupId> > <artifactId>log4j</artifactId> > </dependency> > <dependencies> > </dependencyGroup> > </dependencyGroups> > In child pom: > <dependencies> > <dependency> > <group>logging</group> > </dependency> > </dependencies> > In my particular case, we have a large software project with a large > hierarchy of sub-projects that is continually growing. Many of the projects > share the same dependencies, but do not necessarily have a parent-child > relationship. If I have several projects that need, for example, the same 12 > ORB implementation dependencies, it would be nice to declare that group of 12 > dependencies as a "group" and then reference it from each project. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
