ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Scokart" <gscok...@gmail.com>
Subject RE: Dependency Sets
Date Thu, 01 Feb 2007 16:09:26 GMT
In ivy, there is no 'inheritance' feature like in maven.  I think it is what
you want.

But what you can still do is to have a single module 'common-dep-module'
that contains dependencies to all the modules that you want to include:

<dependencies>
        <dependency org="org" name="module1" rev="ver" />
        <dependency org="org" name="module2" rev="ver" />
        <dependency org="org" name="module3" rev="ver" />
        <dependency org="org" name="module4" rev="ver" />
        <dependency org="org" name="module5" rev="ver" />
</dependencies>


By doing that, you reduce the list to only one :
<dependencies>
        <dependency org="org" name="common-dep-module" rev="ver" />
</dependencies>

It should produce the same result.

Gilles


-----Original Message-----
From: Mark_Melvin@amis.com [mailto:Mark_Melvin@amis.com] 
Sent: donderdag 1 februari 2007 16:56
To: ivy-user@incubator.apache.org
Subject: Dependency Sets

Hi There,

I'm new to Ivy and still trying to determine whether or not it will work 
for our shop.  I think it will, but I have some key questions I need to 
answer still.  It could be I just do not fully understand all of Ivy yet, 
but I was wondering the following:

Say for instance that I have a whole pile of projects that are going to 
depend on the same group of dependencies.  For instance, if I had the 
following in my Ivy repository (we'll be running a local one):

org/module1-ver.jar
org/module2-ver.jar
org/module3-ver.jar
org/module4-ver.jar
org/module5-ver.jar


And I have many projects which all depend on all 5 of these modules, and a 
whole pile of other projects that depend on a subset - say only module3, 
4, and 5.  Would I have to write this out in my Ivy files for every single 
project?  For instance:

    <dependencies>
        <dependency org="org" name="module1" rev="ver" />
        <dependency org="org" name="module2" rev="ver" />
        <dependency org="org" name="module3" rev="ver" />
        <dependency org="org" name="module4" rev="ver" />
        <dependency org="org" name="module5" rev="ver" />
    </dependencies>

...in each of my many projects, and:

    <dependencies>
        <dependency org="org" name="module3" rev="ver" />
        <dependency org="org" name="module4" rev="ver" />
        <dependency org="org" name="module5" rev="ver" />
    </dependencies>

...in the rest of my projects?  Or is there a way to create a common group 
of dependencies that I can reference with an ID so that I do not have to 
maintain this manually?  Obviously this isn't too bad for this simple 
example, but you can imagine if I had hundreds of .jars in a single 
"runtime" that a bunch of other projects depended on.  I would not want to 
have to specify these each time. 
By the way, I realize that you can use patterns to do a dependency 
"include", which may work, but could be just as tedious if I had to come 
up with a seriously complex regular expression (or set of regular 
expressions) and duplicate them across many projects that all had the same 
group of dependencies.

Or am I missing an easy solution here?

Thanks in advance,
Mark.

AMI Semiconductor - "Silicon Solutions for the Real World"
NOTICE: 
This electronic message contains information that may be confidential or
privileged. The information is intended for the use of the individual or
entity named above. If you are not the intended recipient, please be aware
that any disclosure, copying, distribution or use of the contents of this
information is prohibited. If you received this electronic message in error,
please notify the sender and delete the copy you received.


Mime
View raw message