ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From teknokrat <teknok...@yahoo.com>
Subject Re: different patterns per configuration
Date Thu, 30 Jun 2011 20:52:43 GMT
Can you elaborate? Are you saying its generally better to strip version 
numbers and that this will improve performance? Can you provide an 
example please?

cheers

On 30/06/2011 19:10, Tim Brown wrote:
> Yep, the below should do it the trick.  A single resolve for both (or all)
> confs and types, then retrieve to drop the version.
>
> If you can get around stripping the version off you'll be able to eliminate
> I/O by using cachepath or cachefileset to work with artifacts directly from
> the cache.
>
> (I call this out because 99% of the build/deploy pipelines I see are I/O
> constrained).
>
>
>
> On Thu, Jun 30, 2011 at 10:44 AM, Shaka Tard<shakatard@gmail.com>  wrote:
>
>> 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.aptekar@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.
>>>
>>>
>>
>



Mime
View raw message