ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Kiesel <>
Subject Re: Different dependencies for integration, milestone, release
Date Thu, 07 Apr 2011 06:37:24 GMT
Hi Mitch,

On 24 March 2011 14:58, Mitch Gitman <> wrote:
> The best and most common approach I'm aware of for handling this is to have
> your Ivy settings including three different Ivy settings files, one for each
> stage/status. Which settings to include is determined by a property. The
> default value, and the one developers and the dev CI server would use, would
> pick up the integration Ivy settings. This property would be overridden,
> preferably by a value in a properties file under .ivy2 or elsewhere in
> user.home, for milestone and release builds.
> Note that your integration Ivy settings wouldn't just have integration Ivy
> resolvers. It would have a chain of integration, milestone, and release. The
> milestone Ivy settings would have a chain of milestone and release. The
> release Ivy settings would have just release resolvers. This is presuming
> that you've published your modules to different directories/locations--to
> different Ivy repositories, literally--depending on their status
> (preferable), or you at least have some way to distinguish between them
> based on pattern within the same repo (acceptable).

I have solved this - based on your recommendation - like this:

I have declared three different resolvers: integration, milestone,
release. Each of these exist "on it's own". I have further created
three "lookup" resolvers, which contain references to the first three:

lookup.integration -> [integration, milestone, release]
lookup.milestone -> [milestone, release]
lookup.release -> [release]

First, I run <ivy:info file="ivy.xml"/> to retrieve the current status
from ivy.xml; this automatically set's up ivy, already. Then, an ant
property's being set: "build.mode", with the value of "ivy.status"

In a subsequent step, I call <ivy:settings/> again. In the referenced
settings file, besides the mentioned three resolvers and their
corresponding "lookup" resolvers, there's the line

<settings defaultResolver="${build.mode}"/>

This does what I wanted. Thanks for the hints! :-) Btw, why I need to
do it this (seems a bit complicated) was because I found no way to
specify a resolver when doing a resolve - the only time it is possible
to specify a direct resolver is when doing <ivy:publish/>.


View raw message