Oh, that's actually not too bad.  I hope other more experienced folks would
be willing to correct me if I am wrong, but this seems fairly
straightforward.

You would use ivy:retrieve twice in your ANT script to get the libraries
from your local cache, and the pattern you use inside there will dictate how
they get copied into your other dist directory,

like this (note the "-[revision]" in the first one, and how it's missing in
the second, as well as the conf names):

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


This will retrieve the files without adding the revision numbers on them,
even if the files have revision numbers in your cache, and this works
because your ivy:resolve step used the ivy.xml file to obtain the
dependencies already.

So for instance, in your example, foo-1.2.jar in conf1 will get copied out
to the conf1 directory as foo-1.2.jar and
bar.so will get copied out to the conf2 directory.

You can read more about this here:
http://ant.apache.org/ivy/history/trunk/use/retrieve.html

Does that work?


On Thu, Jun 30, 2011 at 12:11 PM, teknokrat <igor.apte...@nomura.com> wrote:

> Shaka Tard <shakatard@...> writes:
>
> >
> > Teknocrat,
> >
> > First, are you saying you need to see both jars, for instance, like this?
> >
> > commons-lang.jar
> > commons-lang-1.6.10.jar
>
> no, I want some jars going into conf1 as foo-1.2.jar and others going into
> conf2 as bar.so
>
> I am doing JNI and using ivy to store some binary libs. I would like those
> artifacts to be stripped of their version numbers otherwise our make files
> break.
>
>

Reply via email to