maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@multitask.com.au
Subject Re: Recursive dependencies
Date Thu, 03 Apr 2003 01:12:11 GMT
The plan is for 1.0 to be able to specify a dependency on a POM 
(project.xml file for another project), and have Maven automatically 
flatten the dependencies.

If someone wants to step up and start coding it, I'd be happy to help.
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


Alex Arnell <alex@bravenet.com> wrote on 03/04/2003 04:39:45 AM:

> 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> 
> -- 
> Alex Arnell
> Bravenet Web Services (www.bravenet.com)
> Software Engineer
> (Java Guru)
> (250) 954-0856 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


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


Mime
View raw message