maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dillon <ja...@planet57.com>
Subject Grouping dependencies to share common config
Date Wed, 04 Oct 2006 19:32:41 GMT
Hi, the Geronimo project has a fairly large dependency list, may of  
which are for dependencies with the same groupId and version.  I was  
thinking it would be nice to have built in support to the pom to make  
it easier to manage these groups, with out needing to use properties.

The problem with properties is that the definition of the property is  
often far away from the dependency def, which makes it harder to look  
at the pom and see what versions are really being used (as you need  
to bounce back and forth from dependencies to properties).  And, when  
the properties are present I find that people tend to just copy  
dependencies from dependencyManagement to their child poms verbatim,  
which is not ideal and complicates the management of the versions  
even more and promotes the practice of making all versions properties  
which is not very good IMO.

What I was thinking was something along these lines:

<dependencyManagement>
     <dependencyGroups>
         <dependencyGroup>
             <groupId>org.apache.openejb</groupId>
             <version>2.2-incubating-SNAPSHOT</version>
             <dependencies>
                 <dependency>
                     <artifactId>openejb-core</artifactId>
                 </dependency>
                 <dependency>
                     <artifactId>openejb-builder</artifactId>
                 </dependency>
                 <dependency>
                     <artifactId>openejb-pkgen-builder</artifactId>
                 </dependency>
                 <dependency>
                     <artifactId>openejb-yoko</artifactId>
                 </dependency>
                 <dependency>
                     <artifactId>openejb-sunorb</artifactId>
                 </dependency>
             </dependencies>
         </dependencyGroup>
     </dependencyGroups>
</dependencyManagement>

Dependencies within the group would pickup any missing elements from  
the group.  The the above example, the groupId and version defined in  
dependencyManagement/dependencyGroups/dependencyGroup would be used  
for all dependency elements with in the group which omitted those  
elements.

I'm not sure of the exact syntax, but the basic concept would really  
be helpful for projects with a large number of dependencies.

--jason

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message