ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Not Zippy <>
Subject Re: Publish Retrieve without incrementing versions
Date Mon, 23 Jan 2012 16:41:42 GMT
I have 6  projects dependent on each other. I setup the dependency in ivy
based on a property so I can change them dynamicly like
<dependency conf="hidden->hidden" org="foo" name="project.a"

then the property is specified elsewhere (in the ant script or eclipse)
like project.a.rev=latest.integration
"latest.integration" means always use the latest builds local or remote

So if I want to change this dependency to a particular release all I need
to do is change the property
(Note the wild card allows the revision to be unspecific)

Does that help ?

On Mon, Jan 23, 2012 at 8:30 AM, John Sokel <> wrote:

> I have spent the entire weekend trying to make ivy work for me and ivy
> seems to be fundamentally opposed to what I want to do.  A quick
> background:
> - I have 5 different projects, with a varying level of dependencies (A,B
> dep on C; B,C dep on D, all dep on E).
> - I have 3 different builds going with our CI server: trunk, QA branch,
> PROD branch
> - At any time a developer can run one of these 3 active branches (or all
> three)
> - I want to publish each artifact with up to 3 versions: trunk, qa, prod.
>  No number scheme desired.
>  Example: A-trunk.jar A-qa.jar A-prod.jar, B-trunk.jar B-qa.jar
> B-prod.jar, etc.
> - I want the dependent projects to get the last built artifact that was
> published.
> I went through the tutorials, and played with the example projects, and I
> cannot get this to work.  Basically the problem is that IVY seems to be
> numeric version dependent, and will not retrieve the same version even
> though a new artifact has been published.  Once the dependent artifact has
> been resolved and retrieved, it is cached and will never be overwritten
> unless the version changes.  Therefore the users of that artifact will
> never get the latest instance.
> I know the sample projects solve this by adding a unique build number, or a
> timestamp based version, but this causes a tremendous amount of stale
> artifacts to lie around.  Plus when resolved, it does not automatically
> clean up older versions that were retrieved, so I would need to put clean
> up tasks in all of my build files.   This is evident in the
> depender/dependee example.  With every build/publish of dependee (say 3
> times), depender will copy the latest dependee-n.jar into its lib directory
> without cleaning up the old ones. So it is left with the following in the
> lib dir:
> $ cd /opt/apache-ivy-2.2.0/src/example/dependence/depender/lib
> $ ls -l
> -rw-r--r--  1 jsokel  staff  169763 Nov 22  2005 commons-lang-2.0.jar
> -rw-r--r--  1 jsokel  staff    1511 Jan 22 16:02 dependee-1.jar
> -rw-r--r--  1 jsokel  staff    1511 Jan 22 16:06 dependee-2.jar
> -rw-r--r--  1 jsokel  staff    1511 Jan 22 16:07 dependee-3.jar
> So for me:
> - Old artifacts are completely irrelevant
> - We build many times per day so I dont want all the old jars/wars piling
> up in the local repo or the resolved lib dir
> - I dont want to perform all these cleanup tasks (especially since I dont
> necessarily know the past version numbers)
> - I want resolve/retrieve to just get the latest instance if the publish
> time changed.
> Is this possible?  Various settings seem to imply this is possible, but in
> all of my testing I could not get the cache to update without a version
> number change.  I was about to change it to write directly into the cache,
> rather than the local directory, but it seemed wrong since I was now making
> the updates for ivy.
> Thanks in advance for any help,
> John

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message