Hi Laird,

Laird Nelson wrote:

> On Fri, Dec 3, 2010 at 9:36 AM, Yanko, Curtis <curt_ya...@uhc.com> wrote:
> 
>> We only declare dependencies as <dependencyManagement> items in our
>> Parent POMs and then declare *versionless* dependencies in each app so
>> they are explicit and comprehensible without having to go look somewhere
>> else (except for versioning which is all in one place too)
>>
> 
> I have often wished for the ability to simply and easily refer to a group
> of
> dependencyManagement entries with one element.  Going hand-in-hand with
> this would of course be the ability to group and name such groups within
> the
> dependencyManagement section.  So, making this up:
> 
>  <dependencyManagement>
>   <dependencyGroup>
>     <id>persistence-dependencies</id>
>     <dependency>
>       <groupId>org.apache.openjpa</groupId>
>       <artifactId>openjpa</artifactId>
>       <version>${openJpaVersion}</version>
>       <scope>test</scope>
>     </dependency>
>     <dependency>
>       <groupId>org.eclipse.persistence</groupId>
>       <artifactId>javax.persistence</artifactId>
>       <version>${eclipseLinkVersion}</version>
>       <scope>test</scope>
>     </dependency>
>     <dependency>
>       <groupId>org.eclipse.persistence</groupId>
>       <artifactId>org.eclipse.persistence.jpa</artifactId>
>       <version>${eclipseLinkVersion}</version>
>       <scope>test</scope>
>     </dependency>
>     <dependency>
>       <groupId>org.eclipse.persistence</groupId>
>       <artifactId>org.eclipse.persistence.core</artifactId>
>       <version>${eclipseLinkVersion}</version>
>       <scope>test</scope>
>     </dependency>
>     <dependency>
>       <groupId>org.hibernate</groupId>
>       <artifactId>hibernate-core</artifactId>
>       <version>${hibernateVersion}</version>
>       <scope>test</scope>
>     </dependency>
>     <dependency>
>       <groupId>org.hibernate</groupId>
>       <artifactId>hibernate-entitymanager</artifactId>
>       <version>${hibernateVersion}</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencyGroup>
> </dependencyManagement>

Declare these artifacts as deps in a project with pom packaging ...

> 
> Then, in a sub-pom:
> 
> <dependencies>
>   <dependencyGroup>
>     <id>persistence-dependencies</id>
>   </dependencyGroup>
> </dependencies>

Reference the pom artifact as compile or runtime (don't forget to set the 
type to pom).

> Otherwise, lots of copying and pasting happens!

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to