ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Trump" <>
Subject RE: question about multiple projects env
Date Fri, 22 May 2009 16:59:13 GMT
Hi Aleksey,
What are the exact values of ${version} and ${integr-version} from your publish targets? 

Also, can you share your ivysettings file?  How your resolvers are configured could make a
big difference in which version gets chosen.


From: Alex Zhukov []
Sent: Mon 5/18/2009 1:33 PM
Subject: Ivy: question about multiple projects env

Hello all,

I already posted this question on ivy-users list but got no answer. Please, can
you help me with that?

have tried to repeat the example of using Ivy in multiple projects environment
similar to what is given in ivy tutorial (,
but with a small modification, but it did not work. I would like to ask you if
my changes should work and there is a bug in ivy or if I am doing something
wrong and should do it differently. So here you go.

have multi-project dir with two subdirectories representing two modules,
modules are named 'first' and 'second'. Where module second depends on artifact
produced by module 'first'. I have set build.xml, common/common.xml similar to
the tutorial.

artifact depends on public artifacts only:


org="commons-cli" name="commons-cli" rev="1.0"


artifact depends on 'first' and public artifacts:


name="first" rev="1.0"

org="commons-collections" name="commons-collections"
rev="3.1" conf="core->default" />


here, as
you can see, is the difference from the tutorial. I want artifact 'second'
depend on 'first', but want to be flexible in the way of the actual version of
'first'. I want to be able to make changes to 'first' and build 'second' with
these changes, but, at the same time, if needed be able to build second with
official version of 'first'. To accomplish that I have two resolve targets set

name="resolve" description="official artifacts">

<mkdir dir="${lib.dir}"/>

<ivy:resolve file="${ivy.file}"/>

<ivy:retrieve pattern="${lib.dir}/[artifact]-[revision].[ext]" />


name="integr-resolve" description="integration artifacts">

<mkdir dir="${lib.dir}"/>

<ivy:resolve file="${ivy.file}" resolveMode="dynamic"/>

<ivy:retrieve pattern="${lib.dir}/[artifact]-[revision].[ext]" />


and two
publish targets:


<ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"

resolver="official" status="release"




<ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"

resolver="intergr" status="integration"



where ${integr-version}
is build with ivy:buildnumber and ${version} is read from

So now
the problem I observe is that if I publish integration version of 'first'
locally with status='integration' and have official version of 'first' in the repository
with status='release' ivy always picks up the official version. It looks like
ivy:resolve is ignoring the status of the published artifact it tries to
resolve, (well, at least I thought that ivy will look at the status and take it
into account).

I admit
that I may approach the problem in the wrong way and there is the right way to
do it, but that is what I came up with and would really appreciate any
suggestions on this mater.

Thank you.


HotmailĀ® has a new way to see what's up with your friends. Check it out.
HotmailĀ® has a new way to see what's up with your friends.

View raw message