> -----Original Message-----
> From: Brett Porter [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 15, 2005 1:48 AM
> To: Maven Developers List
> Subject: Re: maven and ivy
>
>
> Michal Maczka wrote:
>
> > Group Dependencies (aka composite artifacts) is the feature which
> > enables to define a single dependency on multiple artifacts.
> >
> > Depenedecny Group is the feature which allows to logically group
> > dependencies in poms and for example
> > mark some dependencies as optional.
> >
> > I do believe that the first feature is actually very useful and not
> > at all against maven's philosophy and it
> > can eliminate completly the need of having "dependency
> groups". Simply
> > if we take hiberante as example
> > hibernate team can publish just one jar and multiple poms - for
> > example: hibernate-full.3.0.pom, hibernate-minimal-3.0.pom,
> > hibernate-jcs.3.0.pom etc. Those poms will list the
> dependecies which
> > are needed in diffrent cirumstances.
> > Of couse jars like hibernate-full.3.0.jar will not exists.
>
> Michal, I'm confused. You seem to be talking about the latter, not the
> first one.
>
> I think splitting the pom of an artifact is a very bad idea,
> especially
> if those jars don't exist.
I also think that splitting the pom of artifact into some group is a bad
idea. But group (composite)
dependencies are about something else. They provide useful shortcut method
for including multiple artifacts in projects
via declaration of just a single dependency.
With help of them for example I can create a pom which will contain a list
of all known (or preferred) wagon providers.
<model>
<modelVersion>4.0.0</modelVersion>
<artifactId>my-favourite-wagons</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<dependendcies>
here will go: http-wagon, scp-wagon, ftp-wagon, etc
<dependendcies>
</model>
I can deploy it to the repository as /xx/yy/my-favourite-wagons-1.0.pom
Then if I wanted to include all those wagons in some project I simply could
do something like:
<dependency>
<groupId>xx.yy<groupId>
<artifactId>my-favourite-wagons<artifactId>
<type>composite<type> (or simply type = pom)
<version>1.0</version>
<dependency>
and have all those wagons included in my project
Of course my-favourite-wagons-1.0.jar does not really make sense so it won't
exist.
But really what happens here is an aggregation not splitting.
If I understood this is more or less what happens in ivy and what ivy module
are about. They used example of Spring Framework,
which provides very many jars and it will be usefull to have a possibility
of creating multiple "views" over that selection.
For example if you were using spring (core), hibernate and tapestry in
multiple projects in your company you could create
a pom which contain appropiate entries, which describe that selection and
import it to any project via declararation of single composite dependency.
Other useful example: say that you are working with j2ee and you have to add
to your projects: servlatapi, jms, jta, ejb etc.
With help of group dependecies you could create pom like j2ee-1.3.pom,
j2ee-1.4 pom which will include all required jars in appropiate versions.
(forget that they are not in the repository :-/)
reagrds
Michal
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]