I think that this issue can be solved in much nicer way once generic
artifact support is implemented in Maven.

Then I imagine such algorithm:


<dependency>
      <id>struts</id>
      <version>1.1-b3</version>
      <type>group</type>
</dependency>


Then Maven will do:

1) Download the POM for struts-1.1-b3.
2) Resolve  all dependencies which are listed in struts POM.
3) Merge artifacts of struts with project's own artifacts

It should be very easy to implement such functionality.

Michal


> -----Original Message-----
> From: Alex Arnell [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 02, 2003 8:40 PM
> To: Maven Users List
> Subject: Re: Recursive dependencies
>
>
> I agree with this.
>
> Instead of having a huge long list of dependecies, it would be nice if
> you could group dependecies.  Using the Struts example below you could
> have a maven structure like the following
>
>         <dependency>
>             <id>struts</id>
>             <version>1.1-b3</version>
>             <url>http://jakarta.apache.org/struts/</url>
>              <depends>
>                    <dependency>
>                          <id>commons-beanutils</id>
>                          <version>1.6.1</version>
>                    </dependency>
>                     ....
>                     <!-- more dependencies -->
>              </depends>
>         </dependency>
>
>
> This wouldn't reduce the number of depencies required to list in the
> project.xml file, but it would group them nicer so you can see exactly
> what is dependent on what, and it groups things nicely together.
>
> You could even gank the idea of a file-set from ant, except call it a
> dependency-set, allowing you to define dependency sets for re-use.  In
> this case (I cannot think of when it would be useful, but I am sure
> someone would find a place for it), you could define something like the
> following
>
> <dependency-set id="dependency.set">
>        <dependency>
>           ...
>        </dependency>
>        <dependency>
>           ....
>         </depenecency>
> </dependency-set>
>
> <dependency>
>     <id>myDependency</id>
>     ...
>     <depends>
>          <dependency refid="dependecny.set" />
>     </depends>
> </dependency>
>
> <dependency>
>     <id>myOtherDependency</id>
>     ...
>     <depends>
>          <dependency refid="dependecny.set" />
>     </depends>
> </dependency>
>
>
>
> This would allow you to define two depencies and each one would depend
> on the same thing, but instead of having to type the same depencies over
> and over, it is declared once, and referenced with the refid tag.  Also
> this would mean that the dependencies included via the refid are only
> downloaded and dealt with once.
>
>
>
>
> Jose Gonzalez Gomez wrote:
>
> >
> >    Has Maven any way to specify nested or recursive dependencies? So
> > now you must be asking what the #$@ is a recursive dependency...
> >
> >    An example: I'm just beginning to play a bit with maven, and have
> > defined my first dependencies. I'm using Struts, so I thought I should
> > put Struts in my dependencies in project.xml (I guess this is correct,
> > isn't it), so when I try to compile my project, Maven downloads
> > strtus-1.1-rc1.jar. But if you see a binary distribution of Struts
> > there are a number of other jars bundled that are needed for Struts to
> > work, so the question is, wouldn't be desirable to download them all
> > so when you package your application, you are sure that it will
> > function properly? Is there any way to do this, or do you have to put
> > by hand all those other packages/jars as dependencies in project.xml?
> >
> >    Regards
> >    Jose
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> --
> Alex Arnell
> Bravenet Web Services (www.bravenet.com)
> Software Engineer
> (Java Guru)
> (250) 954-0856
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ----------------------------------------------------------------------
> Powiedz jak wyglada komputer Twoich marzen i wygraj notebooka
> ADAX Mobile W1700X40 z Intel Pentium 4, DVD i wyjsciem TV!
> http://www.adax.pl/konkurs - ZAGRAJ!
>
>
>


----------------------------------------------------------------------
Biznesowy portal INTERIA.PL >>> http://link.interia.pl/f170c



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to